diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-12-05 12:49:53 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-12-05 12:49:53 -0500 |
commit | be307485f722be57985da979296fa37569c2a5a9 (patch) | |
tree | cff6ceeab51e5efc0825e5a8558bad4025ca6fdd /lisp/vc | |
parent | 887fa622851c7db45ccacedb1c88e13e27be5d26 (diff) | |
download | emacs-be307485f722be57985da979296fa37569c2a5a9.tar.gz |
* lisp: Prefer inlinable functions to macros.
* lisp/fringe.el (fringe-bitmap-p): Make it a plain function.
* lisp/tooltip.el (tooltip-region-active-p): Remove.
* lisp/net/shr.el (shr-char-breakable-p, shr-char-kinsoku-bol-p)
(shr-char-kinsoku-eol-p, shr-char-nospace-p): Use define-inline.
* lisp/url/url-future.el (url-future-done-p, url-future-completed-p)
(url-future-errored-p, url-future-cancelled-p):
* lisp/url/url-dav.el (url-dav-http-success-p): Use define-inline.
* lisp/vc/ediff-init.el (ediff-odd-p): Remove.
(ediff-background-face): Use cl-oddp instead.
(ediff-buffer-live-p): Make it a defsubst.
Diffstat (limited to 'lisp/vc')
-rw-r--r-- | lisp/vc/ediff-init.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 589ea454965..9669e2c2313 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -24,6 +24,8 @@ ;;; Code: +(require 'cl-lib) + ;; Start compiler pacifier (defvar ediff-metajob-name) (defvar ediff-meta-buffer) @@ -118,11 +120,8 @@ It needs to be killed when we quit the session.") (?C . ediff-buffer-C))) ;;; Macros -(defmacro ediff-odd-p (arg) - `(eq (logand ,arg 1) 1)) - -(defmacro ediff-buffer-live-p (buf) - `(and ,buf (get-buffer ,buf) (buffer-name (get-buffer ,buf)))) +(defsubst ediff-buffer-live-p (buf) + (and buf (get-buffer buf) (buffer-name (get-buffer buf)))) (defmacro ediff-get-buffer (arg) `(cond ((eq ,arg 'A) ediff-buffer-A) @@ -1456,7 +1455,7 @@ This default should work without changes." ;; The value of dif-num is always 1- the one that user sees. ;; This is why even face is used when dif-num is odd. (ediff-get-symbol-from-alist - buf-type (if (ediff-odd-p dif-num) + buf-type (if (cl-oddp dif-num) ediff-even-diff-face-alist ediff-odd-diff-face-alist) )) |