aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2001-11-27 15:52:52 +0000
committerSam Steingold2001-11-27 15:52:52 +0000
commit8a9463543d5b82409a24e23905d271cdebf70059 (patch)
tree503c81c7058491327cc13ab0eff04ed5dc6dd855
parentc6aedc9284492c790448cce23b0e5cc134885148 (diff)
downloademacs-8a9463543d5b82409a24e23905d271cdebf70059.tar.gz
emacs-8a9463543d5b82409a24e23905d271cdebf70059.zip
Converted backquote to the new style.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/ansi-color.el28
-rw-r--r--lisp/bookmark.el41
-rw-r--r--lisp/dired.el40
-rw-r--r--lisp/emacs-lisp/advice.el509
-rw-r--r--lisp/emacs-lisp/checkdoc.el24
-rw-r--r--lisp/emacs-lisp/ewoc.el16
-rw-r--r--lisp/emerge.el244
-rw-r--r--lisp/fast-lock.el90
-rw-r--r--lisp/lazy-lock.el42
-rw-r--r--lisp/mail/feedmail.el20
-rw-r--r--lisp/mouse-sel.el120
-rw-r--r--lisp/obsolete/c-mode.el168
-rw-r--r--lisp/obsolete/cplus-md.el168
-rw-r--r--lisp/progmodes/dcl-mode.el11
-rw-r--r--lisp/progmodes/idlw-shell.el57
-rw-r--r--lisp/progmodes/idlwave.el32
-rw-r--r--lisp/term/sun-mouse.el52
-rw-r--r--lisp/textmodes/artist.el24
19 files changed, 848 insertions, 848 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6d25f62ace2..c6699bf7197 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12001-11-27 Sam Steingold <sds@gnu.org>
2
3 * ansi-color.el, bookmark.el, dired.el, emerge.el, fast-lock.el
4 * lazy-lock.el, mouse-sel.el, mail/feedmail.el
5 * emacs-lisp/advice.el, emacs-lisp/checkdoc.el, emacs-lisp/ewoc.el
6 * obsolete/c-mode.el, obsolete/cplus-md.el
7 * progmodes/dcl-mode.el, progmodes/idlw-shell.el, progmodes/idlwave.el
8 * term/sun-mouse.el, textmodes/artist.el:
9 Converted backquote to the new style.
10
12001-11-27 Richard M. Stallman <rms@gnu.org> 112001-11-27 Richard M. Stallman <rms@gnu.org>
2 12
3 * cus-edit.el (custom-load-symbol): Don't always load locate-library. 13 * cus-edit.el (custom-load-symbol): Don't always load locate-library.
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index 51421add42c..0412392cd05 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -223,20 +223,20 @@ This is a good function to put in `comint-output-filter-functions'."
223 223
224 224
225(eval-when-compile 225(eval-when-compile
226 ;; We use this to preserve or protect things when modifying text 226 ;; We use this to preserve or protect things when modifying text
227 ;; properties. Stolen from lazy-lock and font-lock. Ugly!!! 227 ;; properties. Stolen from lazy-lock and font-lock. Ugly!!!
228 ;; Probably most of this is not needed? 228 ;; Probably most of this is not needed?
229 (defmacro save-buffer-state (varlist &rest body) 229 (defmacro save-buffer-state (varlist &rest body)
230 "Bind variables according to VARLIST and eval BODY restoring buffer state." 230 "Bind variables according to VARLIST and eval BODY restoring buffer state."
231 (` (let* ((,@ (append varlist 231 `(let* (,@(append varlist
232 '((modified (buffer-modified-p)) (buffer-undo-list t) 232 '((modified (buffer-modified-p)) (buffer-undo-list t)
233 (inhibit-read-only t) (inhibit-point-motion-hooks t) 233 (inhibit-read-only t) (inhibit-point-motion-hooks t)
234 before-change-functions after-change-functions 234 before-change-functions after-change-functions
235 deactivate-mark buffer-file-name buffer-file-truename)))) 235 deactivate-mark buffer-file-name buffer-file-truename)))
236 (,@ body) 236 ,@body
237 (when (and (not modified) (buffer-modified-p)) 237 (when (and (not modified) (buffer-modified-p))
238 (set-buffer-modified-p nil))))) 238 (set-buffer-modified-p nil))))
239 (put 'save-buffer-state 'lisp-indent-function 1)) 239 (put 'save-buffer-state 'lisp-indent-function 1))
240 240
241(defun ansi-color-unfontify-region (beg end &rest xemacs-stuff) 241(defun ansi-color-unfontify-region (beg end &rest xemacs-stuff)
242 "Replacement function for `font-lock-default-unfontify-region'. 242 "Replacement function for `font-lock-default-unfontify-region'.
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 6ac3c0f9d9a..3c258b2689b 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -539,21 +539,20 @@ being set. This might change someday.
539Optional second arg INFO-NODE means this bookmark is at info node 539Optional second arg INFO-NODE means this bookmark is at info node
540INFO-NODE, so record this fact in the bookmark's entry." 540INFO-NODE, so record this fact in the bookmark's entry."
541 (let ((the-record 541 (let ((the-record
542 (` ((filename . (, (bookmark-buffer-file-name))) 542 `((filename . ,(bookmark-buffer-file-name))
543 (front-context-string 543 (front-context-string
544 . (, (if (>= (- (point-max) (point)) bookmark-search-size) 544 . ,(if (>= (- (point-max) (point)) bookmark-search-size)
545 (buffer-substring-no-properties 545 (buffer-substring-no-properties
546 (point) 546 (point)
547 (+ (point) bookmark-search-size)) 547 (+ (point) bookmark-search-size))
548 nil))) 548 nil))
549 (rear-context-string 549 (rear-context-string
550 . (, (if (>= (- (point) (point-min)) bookmark-search-size) 550 . ,(if (>= (- (point) (point-min)) bookmark-search-size)
551 (buffer-substring-no-properties 551 (buffer-substring-no-properties
552 (point) 552 (point)
553 (- (point) bookmark-search-size)) 553 (- (point) bookmark-search-size))
554 nil))) 554 nil))
555 (position . (, (point))) 555 (position . ,(point)))))
556 ))))
557 556
558 ;; Now fill in the optional parts: 557 ;; Now fill in the optional parts:
559 558
@@ -661,11 +660,11 @@ affect point."
661 (ann (nth 4 record))) 660 (ann (nth 4 record)))
662 (list 661 (list
663 name 662 name
664 (` ((filename . (, filename)) 663 `((filename . ,filename)
665 (front-context-string . (, (or front-str ""))) 664 (front-context-string . ,(or front-str ""))
666 (rear-context-string . (, (or rear-str ""))) 665 (rear-context-string . ,(or rear-str ""))
667 (position . (, position)) 666 (position . ,position)
668 (annotation . (, ann))))))) 667 (annotation . ,ann)))))
669 old-list)) 668 old-list))
670 669
671 670
@@ -1347,7 +1346,7 @@ for a file, defaulting to the file defined by variable
1347 (set-buffer (let ((enable-local-variables nil)) 1346 (set-buffer (let ((enable-local-variables nil))
1348 (find-file-noselect file))) 1347 (find-file-noselect file)))
1349 (goto-char (point-min)) 1348 (goto-char (point-min))
1350 (let ((print-length nil) 1349 (let ((print-length nil)
1351 (print-level nil)) 1350 (print-level nil))
1352 (delete-region (point-min) (point-max)) 1351 (delete-region (point-min) (point-max))
1353 (bookmark-insert-file-format-version-stamp) 1352 (bookmark-insert-file-format-version-stamp)
diff --git a/lisp/dired.el b/lisp/dired.el
index d7217b60f21..bc49f0bf301 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -317,26 +317,26 @@ Subexpression 2 must end right before the \\n or \\r.")
317;; It should end with a noun that can be pluralized by adding `s'. 317;; It should end with a noun that can be pluralized by adding `s'.
318;; Return value is the number of files marked, or nil if none were marked. 318;; Return value is the number of files marked, or nil if none were marked.
319(defmacro dired-mark-if (predicate msg) 319(defmacro dired-mark-if (predicate msg)
320 (` (let (buffer-read-only count) 320 `(let (buffer-read-only count)
321 (save-excursion 321 (save-excursion
322 (setq count 0) 322 (setq count 0)
323 (if (, msg) (message "Marking %ss..." (, msg))) 323 (if ,msg (message "Marking %ss..." ,msg))
324 (goto-char (point-min)) 324 (goto-char (point-min))
325 (while (not (eobp)) 325 (while (not (eobp))
326 (if (, predicate) 326 (if ,predicate
327 (progn 327 (progn
328 (delete-char 1) 328 (delete-char 1)
329 (insert dired-marker-char) 329 (insert dired-marker-char)
330 (setq count (1+ count)))) 330 (setq count (1+ count))))
331 (forward-line 1)) 331 (forward-line 1))
332 (if (, msg) (message "%s %s%s %s%s." 332 (if ,msg (message "%s %s%s %s%s."
333 count 333 count
334 (, msg) 334 ,msg
335 (dired-plural-s count) 335 (dired-plural-s count)
336 (if (eq dired-marker-char ?\040) "un" "") 336 (if (eq dired-marker-char ?\040) "un" "")
337 (if (eq dired-marker-char dired-del-marker) 337 (if (eq dired-marker-char dired-del-marker)
338 "flagged" "marked")))) 338 "flagged" "marked"))))
339 (and (> count 0) count)))) 339 (and (> count 0) count)))
340 340
341(defmacro dired-map-over-marks (body arg &optional show-progress) 341(defmacro dired-map-over-marks (body arg &optional show-progress)
342 "Eval BODY with point on each marked line. Return a list of BODY's results. 342 "Eval BODY with point on each marked line. Return a list of BODY's results.
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index c13bff9e7cc..36ae0e33884 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -149,7 +149,7 @@
149;; generates an advised definition of the `documentation' function, and 149;; generates an advised definition of the `documentation' function, and
150;; it will enable automatic advice activation when functions get defined. 150;; it will enable automatic advice activation when functions get defined.
151;; All of this can be undone at any time with `M-x ad-stop-advice'. 151;; All of this can be undone at any time with `M-x ad-stop-advice'.
152;; 152;;
153;; If you experience any strange behavior/errors etc. that you attribute to 153;; If you experience any strange behavior/errors etc. that you attribute to
154;; Advice or to some ill-advised function do one of the following: 154;; Advice or to some ill-advised function do one of the following:
155 155
@@ -368,7 +368,7 @@
368;; If this is a problem one can always specify an interactive form in a 368;; If this is a problem one can always specify an interactive form in a
369;; before/around/after advice to gain control over argument values that 369;; before/around/after advice to gain control over argument values that
370;; were supplied interactively. 370;; were supplied interactively.
371;; 371;;
372;; Then the body forms of the various advices in the various classes of advice 372;; Then the body forms of the various advices in the various classes of advice
373;; are assembled in order. The forms of around advice L are normally part of 373;; are assembled in order. The forms of around advice L are normally part of
374;; one of the forms of around advice L-1. An around advice can specify where 374;; one of the forms of around advice L-1. An around advice can specify where
@@ -381,7 +381,7 @@
381;; whose form depends on the type of the original function. The variable 381;; whose form depends on the type of the original function. The variable
382;; `ad-return-value' will be set to its result. This variable is visible to 382;; `ad-return-value' will be set to its result. This variable is visible to
383;; all pieces of advice which can access and modify it before it gets returned. 383;; all pieces of advice which can access and modify it before it gets returned.
384;; 384;;
385;; The semantic structure of advised functions that contain protected pieces 385;; The semantic structure of advised functions that contain protected pieces
386;; of advice is the same. The only difference is that `unwind-protect' forms 386;; of advice is the same. The only difference is that `unwind-protect' forms
387;; make sure that the protected advice gets executed even if some previous 387;; make sure that the protected advice gets executed even if some previous
@@ -943,7 +943,7 @@
943;; 943;;
944;; We start by defining an innocent looking function `foo' that simply 944;; We start by defining an innocent looking function `foo' that simply
945;; adds 1 to its argument X: 945;; adds 1 to its argument X:
946;; 946;;
947;; (defun foo (x) 947;; (defun foo (x)
948;; "Add 1 to X." 948;; "Add 1 to X."
949;; (1+ x)) 949;; (1+ x))
@@ -1905,30 +1905,30 @@ current head at every iteration. If RESULT-FORM is supplied its value will
1905be returned at the end of the iteration, nil otherwise. The iteration can be 1905be returned at the end of the iteration, nil otherwise. The iteration can be
1906exited prematurely with `(ad-do-return [VALUE])'." 1906exited prematurely with `(ad-do-return [VALUE])'."
1907 (let ((expansion 1907 (let ((expansion
1908 (` (let ((ad-dO-vAr (, (car (cdr varform)))) 1908 `(let ((ad-dO-vAr ,(car (cdr varform)))
1909 (, (car varform))) 1909 ,(car varform))
1910 (while ad-dO-vAr 1910 (while ad-dO-vAr
1911 (setq (, (car varform)) (car ad-dO-vAr)) 1911 (setq ,(car varform) (car ad-dO-vAr))
1912 (,@ body) 1912 ,@body
1913 ;;work around a backquote bug: 1913 ;;work around a backquote bug:
1914 ;;(` ((,@ '(foo)) (bar))) => (append '(foo) '(((bar)))) wrong 1914 ;;(` ((,@ '(foo)) (bar))) => (append '(foo) '(((bar)))) wrong
1915 ;;(` ((,@ '(foo)) (, '(bar)))) => (append '(foo) (list '(bar))) 1915 ;;(` ((,@ '(foo)) (, '(bar)))) => (append '(foo) (list '(bar)))
1916 (, '(setq ad-dO-vAr (cdr ad-dO-vAr)))) 1916 ,'(setq ad-dO-vAr (cdr ad-dO-vAr)))
1917 (, (car (cdr (cdr varform)))))))) 1917 ,(car (cdr (cdr varform))))))
1918 ;;ok, this wastes some cons cells but only during compilation: 1918 ;;ok, this wastes some cons cells but only during compilation:
1919 (if (catch 'contains-return 1919 (if (catch 'contains-return
1920 (ad-substitute-tree 1920 (ad-substitute-tree
1921 (function (lambda (subtree) 1921 (function (lambda (subtree)
1922 (cond ((eq (car-safe subtree) 'ad-dolist)) 1922 (cond ((eq (car-safe subtree) 'ad-dolist))
1923 ((eq (car-safe subtree) 'ad-do-return) 1923 ((eq (car-safe subtree) 'ad-do-return)
1924 (throw 'contains-return t))))) 1924 (throw 'contains-return t)))))
1925 'identity body) 1925 'identity body)
1926 nil) 1926 nil)
1927 (` (catch 'ad-dO-eXiT (, expansion))) 1927 `(catch 'ad-dO-eXiT ,expansion)
1928 expansion))) 1928 expansion)))
1929 1929
1930(defmacro ad-do-return (value) 1930(defmacro ad-do-return (value)
1931 (` (throw 'ad-dO-eXiT (, value)))) 1931 `(throw 'ad-dO-eXiT ,value))
1932 1932
1933(if (not (get 'ad-dolist 'lisp-indent-hook)) 1933(if (not (get 'ad-dolist 'lisp-indent-hook))
1934 (put 'ad-dolist 'lisp-indent-hook 1)) 1934 (put 'ad-dolist 'lisp-indent-hook 1))
@@ -1944,15 +1944,15 @@ exited prematurely with `(ad-do-return [VALUE])'."
1944 (let ((saved-function (intern (format "ad-real-%s" function)))) 1944 (let ((saved-function (intern (format "ad-real-%s" function))))
1945 ;; Make sure the compiler is loaded during macro expansion: 1945 ;; Make sure the compiler is loaded during macro expansion:
1946 (require 'byte-compile "bytecomp") 1946 (require 'byte-compile "bytecomp")
1947 (` (if (not (fboundp '(, saved-function))) 1947 `(if (not (fboundp ',saved-function))
1948 (progn (fset '(, saved-function) (symbol-function '(, function))) 1948 (progn (fset ',saved-function (symbol-function ',function))
1949 ;; Copy byte-compiler properties: 1949 ;; Copy byte-compiler properties:
1950 (,@ (if (get function 'byte-compile) 1950 ,@(if (get function 'byte-compile)
1951 (` ((put '(, saved-function) 'byte-compile 1951 `((put ',saved-function 'byte-compile
1952 '(, (get function 'byte-compile))))))) 1952 ',(get function 'byte-compile))))
1953 (,@ (if (get function 'byte-opcode) 1953 ,@(if (get function 'byte-opcode)
1954 (` ((put '(, saved-function) 'byte-opcode 1954 `((put ',saved-function 'byte-opcode
1955 '(, (get function 'byte-opcode)))))))))))) 1955 ',(get function 'byte-opcode))))))))
1956 1956
1957(defun ad-save-real-definitions () 1957(defun ad-save-real-definitions ()
1958 ;; Macro expansion will hardcode the values of the various byte-compiler 1958 ;; Macro expansion will hardcode the values of the various byte-compiler
@@ -1986,16 +1986,16 @@ exited prematurely with `(ad-do-return [VALUE])'."
1986 1986
1987(defmacro ad-pushnew-advised-function (function) 1987(defmacro ad-pushnew-advised-function (function)
1988 "Add FUNCTION to `ad-advised-functions' unless its already there." 1988 "Add FUNCTION to `ad-advised-functions' unless its already there."
1989 (` (if (not (assoc (symbol-name (, function)) ad-advised-functions)) 1989 `(if (not (assoc (symbol-name ,function) ad-advised-functions))
1990 (setq ad-advised-functions 1990 (setq ad-advised-functions
1991 (cons (list (symbol-name (, function))) 1991 (cons (list (symbol-name ,function))
1992 ad-advised-functions))))) 1992 ad-advised-functions))))
1993 1993
1994(defmacro ad-pop-advised-function (function) 1994(defmacro ad-pop-advised-function (function)
1995 "Remove FUNCTION from `ad-advised-functions'." 1995 "Remove FUNCTION from `ad-advised-functions'."
1996 (` (setq ad-advised-functions 1996 `(setq ad-advised-functions
1997 (delq (assoc (symbol-name (, function)) ad-advised-functions) 1997 (delq (assoc (symbol-name ,function) ad-advised-functions)
1998 ad-advised-functions)))) 1998 ad-advised-functions)))
1999 1999
2000(defmacro ad-do-advised-functions (varform &rest body) 2000(defmacro ad-do-advised-functions (varform &rest body)
2001 "`ad-dolist'-style iterator that maps over `ad-advised-functions'. 2001 "`ad-dolist'-style iterator that maps over `ad-advised-functions'.
@@ -2003,23 +2003,23 @@ exited prematurely with `(ad-do-return [VALUE])'."
2003 BODY-FORM...) 2003 BODY-FORM...)
2004On each iteration VAR will be bound to the name of an advised function 2004On each iteration VAR will be bound to the name of an advised function
2005\(a symbol)." 2005\(a symbol)."
2006 (` (ad-dolist ((, (car varform)) 2006 `(ad-dolist (,(car varform)
2007 ad-advised-functions 2007 ad-advised-functions
2008 (, (car (cdr varform)))) 2008 ,(car (cdr varform)))
2009 (setq (, (car varform)) (intern (car (, (car varform))))) 2009 (setq ,(car varform) (intern (car ,(car varform))))
2010 (,@ body)))) 2010 ,@body))
2011 2011
2012(if (not (get 'ad-do-advised-functions 'lisp-indent-hook)) 2012(if (not (get 'ad-do-advised-functions 'lisp-indent-hook))
2013 (put 'ad-do-advised-functions 'lisp-indent-hook 1)) 2013 (put 'ad-do-advised-functions 'lisp-indent-hook 1))
2014 2014
2015(defmacro ad-get-advice-info (function) 2015(defmacro ad-get-advice-info (function)
2016 (` (get (, function) 'ad-advice-info))) 2016 `(get ,function 'ad-advice-info))
2017 2017
2018(defmacro ad-set-advice-info (function advice-info) 2018(defmacro ad-set-advice-info (function advice-info)
2019 (` (put (, function) 'ad-advice-info (, advice-info)))) 2019 `(put ,function 'ad-advice-info ,advice-info))
2020 2020
2021(defmacro ad-copy-advice-info (function) 2021(defmacro ad-copy-advice-info (function)
2022 (` (ad-copy-tree (get (, function) 'ad-advice-info)))) 2022 `(ad-copy-tree (get ,function 'ad-advice-info)))
2023 2023
2024(defmacro ad-is-advised (function) 2024(defmacro ad-is-advised (function)
2025 "Return non-nil if FUNCTION has any advice info associated with it. 2025 "Return non-nil if FUNCTION has any advice info associated with it.
@@ -2034,7 +2034,7 @@ Assumes that FUNCTION has not yet been advised."
2034 2034
2035(defmacro ad-get-advice-info-field (function field) 2035(defmacro ad-get-advice-info-field (function field)
2036 "Retrieve the value of the advice info FIELD of FUNCTION." 2036 "Retrieve the value of the advice info FIELD of FUNCTION."
2037 (` (cdr (assq (, field) (ad-get-advice-info (, function)))))) 2037 `(cdr (assq ,field (ad-get-advice-info ,function))))
2038 2038
2039(defun ad-set-advice-info-field (function field value) 2039(defun ad-set-advice-info-field (function field value)
2040 "Destructively modify VALUE of the advice info FIELD of FUNCTION." 2040 "Destructively modify VALUE of the advice info FIELD of FUNCTION."
@@ -2160,8 +2160,8 @@ Redefining advices affect the construction of an advised definition."
2160(defvar ad-activate-on-top-level t) 2160(defvar ad-activate-on-top-level t)
2161 2161
2162(defmacro ad-with-auto-activation-disabled (&rest body) 2162(defmacro ad-with-auto-activation-disabled (&rest body)
2163 (` (let ((ad-activate-on-top-level nil)) 2163 `(let ((ad-activate-on-top-level nil))
2164 (,@ body)))) 2164 ,@body))
2165 2165
2166(defun ad-safe-fset (symbol definition) 2166(defun ad-safe-fset (symbol definition)
2167 "A safe `fset' which will never call `ad-activate-internal' recursively." 2167 "A safe `fset' which will never call `ad-activate-internal' recursively."
@@ -2183,16 +2183,16 @@ Redefining advices affect the construction of an advised definition."
2183 (intern (format "ad-Orig-%s" function))) 2183 (intern (format "ad-Orig-%s" function)))
2184 2184
2185(defmacro ad-get-orig-definition (function) 2185(defmacro ad-get-orig-definition (function)
2186 (` (let ((origname (ad-get-advice-info-field (, function) 'origname))) 2186 `(let ((origname (ad-get-advice-info-field ,function 'origname)))
2187 (if (fboundp origname) 2187 (if (fboundp origname)
2188 (symbol-function origname))))) 2188 (symbol-function origname))))
2189 2189
2190(defmacro ad-set-orig-definition (function definition) 2190(defmacro ad-set-orig-definition (function definition)
2191 (` (ad-safe-fset 2191 `(ad-safe-fset
2192 (ad-get-advice-info-field function 'origname) (, definition)))) 2192 (ad-get-advice-info-field function 'origname) ,definition))
2193 2193
2194(defmacro ad-clear-orig-definition (function) 2194(defmacro ad-clear-orig-definition (function)
2195 (` (fmakunbound (ad-get-advice-info-field (, function) 'origname)))) 2195 `(fmakunbound (ad-get-advice-info-field ,function 'origname)))
2196 2196
2197 2197
2198;; @@ Interactive input functions: 2198;; @@ Interactive input functions:
@@ -2300,7 +2300,7 @@ be used to prompt for the function."
2300 2300
2301(defmacro ad-find-advice (function class name) 2301(defmacro ad-find-advice (function class name)
2302 "Find the first advice of FUNCTION in CLASS with NAME." 2302 "Find the first advice of FUNCTION in CLASS with NAME."
2303 (` (assq (, name) (ad-get-advice-info-field (, function) (, class))))) 2303 `(assq ,name (ad-get-advice-info-field ,function ,class)))
2304 2304
2305(defun ad-advice-position (function class name) 2305(defun ad-advice-position (function class name)
2306 "Return position of first advice of FUNCTION in CLASS with NAME." 2306 "Return position of first advice of FUNCTION in CLASS with NAME."
@@ -2458,11 +2458,11 @@ will clear the cache."
2458 2458
2459(defmacro ad-macrofy (definition) 2459(defmacro ad-macrofy (definition)
2460 "Take a lambda function DEFINITION and make a macro out of it." 2460 "Take a lambda function DEFINITION and make a macro out of it."
2461 (` (cons 'macro (, definition)))) 2461 `(cons 'macro ,definition))
2462 2462
2463(defmacro ad-lambdafy (definition) 2463(defmacro ad-lambdafy (definition)
2464 "Take a macro function DEFINITION and make a lambda out of it." 2464 "Take a macro function DEFINITION and make a lambda out of it."
2465 (` (cdr (, definition)))) 2465 `(cdr ,definition))
2466 2466
2467;; There is no way to determine whether some subr is a special form or not, 2467;; There is no way to determine whether some subr is a special form or not,
2468;; hence we need this list (which is probably out of date): 2468;; hence we need this list (which is probably out of date):
@@ -2492,16 +2492,16 @@ will clear the cache."
2492 2492
2493(defmacro ad-macro-p (definition) 2493(defmacro ad-macro-p (definition)
2494 ;;"non-nil if DEFINITION is a macro." 2494 ;;"non-nil if DEFINITION is a macro."
2495 (` (eq (car-safe (, definition)) 'macro))) 2495 `(eq (car-safe ,definition) 'macro))
2496 2496
2497(defmacro ad-lambda-p (definition) 2497(defmacro ad-lambda-p (definition)
2498 ;;"non-nil if DEFINITION is a lambda expression." 2498 ;;"non-nil if DEFINITION is a lambda expression."
2499 (` (eq (car-safe (, definition)) 'lambda))) 2499 `(eq (car-safe ,definition) 'lambda))
2500 2500
2501;; see ad-make-advice for the format of advice definitions: 2501;; see ad-make-advice for the format of advice definitions:
2502(defmacro ad-advice-p (definition) 2502(defmacro ad-advice-p (definition)
2503 ;;"non-nil if DEFINITION is a piece of advice." 2503 ;;"non-nil if DEFINITION is a piece of advice."
2504 (` (eq (car-safe (, definition)) 'advice))) 2504 `(eq (car-safe ,definition) 'advice))
2505 2505
2506;; Emacs/Lemacs cross-compatibility 2506;; Emacs/Lemacs cross-compatibility
2507;; (compiled-function-p is an obsolete function in Emacs): 2507;; (compiled-function-p is an obsolete function in Emacs):
@@ -2511,15 +2511,15 @@ will clear the cache."
2511 2511
2512(defmacro ad-compiled-p (definition) 2512(defmacro ad-compiled-p (definition)
2513 "Return non-nil if DEFINITION is a compiled byte-code object." 2513 "Return non-nil if DEFINITION is a compiled byte-code object."
2514 (` (or (byte-code-function-p (, definition)) 2514 `(or (byte-code-function-p ,definition)
2515 (and (ad-macro-p (, definition)) 2515 (and (ad-macro-p ,definition)
2516 (byte-code-function-p (ad-lambdafy (, definition))))))) 2516 (byte-code-function-p (ad-lambdafy ,definition)))))
2517 2517
2518(defmacro ad-compiled-code (compiled-definition) 2518(defmacro ad-compiled-code (compiled-definition)
2519 "Return the byte-code object of a COMPILED-DEFINITION." 2519 "Return the byte-code object of a COMPILED-DEFINITION."
2520 (` (if (ad-macro-p (, compiled-definition)) 2520 `(if (ad-macro-p ,compiled-definition)
2521 (ad-lambdafy (, compiled-definition)) 2521 (ad-lambdafy ,compiled-definition)
2522 (, compiled-definition)))) 2522 ,compiled-definition))
2523 2523
2524(defun ad-lambda-expression (definition) 2524(defun ad-lambda-expression (definition)
2525 "Return the lambda expression of a function/macro/advice DEFINITION." 2525 "Return the lambda expression of a function/macro/advice DEFINITION."
@@ -2551,13 +2551,13 @@ supplied to make subr arglist lookup more efficient."
2551;; Store subr-args as `((arg1 arg2 ...))' so I can distinguish 2551;; Store subr-args as `((arg1 arg2 ...))' so I can distinguish
2552;; a defined empty arglist `(nil)' from an undefined arglist: 2552;; a defined empty arglist `(nil)' from an undefined arglist:
2553(defmacro ad-define-subr-args (subr arglist) 2553(defmacro ad-define-subr-args (subr arglist)
2554 (` (put (, subr) 'ad-subr-arglist (list (, arglist))))) 2554 `(put ,subr 'ad-subr-arglist (list ,arglist)))
2555(defmacro ad-undefine-subr-args (subr) 2555(defmacro ad-undefine-subr-args (subr)
2556 (` (put (, subr) 'ad-subr-arglist nil))) 2556 `(put ,subr 'ad-subr-arglist nil))
2557(defmacro ad-subr-args-defined-p (subr) 2557(defmacro ad-subr-args-defined-p (subr)
2558 (` (get (, subr) 'ad-subr-arglist))) 2558 `(get ,subr 'ad-subr-arglist))
2559(defmacro ad-get-subr-args (subr) 2559(defmacro ad-get-subr-args (subr)
2560 (` (car (get (, subr) 'ad-subr-arglist)))) 2560 `(car (get ,subr 'ad-subr-arglist)))
2561 2561
2562(defun ad-subr-arglist (subr-name) 2562(defun ad-subr-arglist (subr-name)
2563 "Retrieve arglist of the subr with SUBR-NAME. 2563 "Retrieve arglist of the subr with SUBR-NAME.
@@ -2761,17 +2761,16 @@ element is its actual current value, and the third element is either
2761`required', `optional' or `rest' depending on the type of the argument." 2761`required', `optional' or `rest' depending on the type of the argument."
2762 (let* ((parsed-arglist (ad-parse-arglist arglist)) 2762 (let* ((parsed-arglist (ad-parse-arglist arglist))
2763 (rest (nth 2 parsed-arglist))) 2763 (rest (nth 2 parsed-arglist)))
2764 (` (list 2764 `(list
2765 (,@ (mapcar (function 2765 ,@(mapcar (function
2766 (lambda (req) 2766 (lambda (req)
2767 (` (list '(, req) (, req) 'required)))) 2767 `(list ',req ,req 'required)))
2768 (nth 0 parsed-arglist))) 2768 (nth 0 parsed-arglist))
2769 (,@ (mapcar (function 2769 ,@(mapcar (function
2770 (lambda (opt) 2770 (lambda (opt)
2771 (` (list '(, opt) (, opt) 'optional)))) 2771 `(list ',opt ,opt 'optional)))
2772 (nth 1 parsed-arglist))) 2772 (nth 1 parsed-arglist))
2773 (,@ (if rest (list (` (list '(, rest) (, rest) 'rest))))) 2773 ,@(if rest (list `(list ',rest ,rest 'rest))))))
2774 ))))
2775 2774
2776(defun ad-arg-binding-field (binding field) 2775(defun ad-arg-binding-field (binding field)
2777 (cond ((eq field 'name) (car binding)) 2776 (cond ((eq field 'name) (car binding))
@@ -2785,7 +2784,7 @@ element is its actual current value, and the third element is either
2785 2784
2786(defun ad-element-access (position list) 2785(defun ad-element-access (position list)
2787 (cond ((= position 0) (list 'car list)) 2786 (cond ((= position 0) (list 'car list))
2788 ((= position 1) (` (car (cdr (, list))))) 2787 ((= position 1) `(car (cdr ,list)))
2789 (t (list 'nth position list)))) 2788 (t (list 'nth position list))))
2790 2789
2791(defun ad-access-argument (arglist index) 2790(defun ad-access-argument (arglist index)
@@ -2814,11 +2813,11 @@ to be accessed, it returns a list with the index and name."
2814 (let ((argument-access (ad-access-argument arglist index))) 2813 (let ((argument-access (ad-access-argument arglist index)))
2815 (cond ((consp argument-access) 2814 (cond ((consp argument-access)
2816 ;; should this check whether there actually is something to set? 2815 ;; should this check whether there actually is something to set?
2817 (` (setcar (, (ad-list-access 2816 `(setcar ,(ad-list-access
2818 (car argument-access) (car (cdr argument-access)))) 2817 (car argument-access) (car (cdr argument-access)))
2819 (, value-form)))) 2818 ,value-form))
2820 (argument-access 2819 (argument-access
2821 (` (setq (, argument-access) (, value-form)))) 2820 `(setq ,argument-access ,value-form))
2822 (t (error "ad-set-argument: No argument at position %d of `%s'" 2821 (t (error "ad-set-argument: No argument at position %d of `%s'"
2823 index arglist))))) 2822 index arglist)))))
2824 2823
@@ -2830,12 +2829,12 @@ to be accessed, it returns a list with the index and name."
2830 (rest-arg (nth 2 parsed-arglist)) 2829 (rest-arg (nth 2 parsed-arglist))
2831 args-form) 2830 args-form)
2832 (if (< index (length reqopt-args)) 2831 (if (< index (length reqopt-args))
2833 (setq args-form (` (list (,@ (nthcdr index reqopt-args)))))) 2832 (setq args-form `(list ,@(nthcdr index reqopt-args))))
2834 (if rest-arg 2833 (if rest-arg
2835 (if args-form 2834 (if args-form
2836 (setq args-form (` (nconc (, args-form) (, rest-arg)))) 2835 (setq args-form `(nconc ,args-form ,rest-arg))
2837 (setq args-form (ad-list-access (- index (length reqopt-args)) 2836 (setq args-form (ad-list-access (- index (length reqopt-args))
2838 rest-arg)))) 2837 rest-arg))))
2839 args-form)) 2838 args-form))
2840 2839
2841(defun ad-set-arguments (arglist index values-form) 2840(defun ad-set-arguments (arglist index values-form)
@@ -2850,34 +2849,34 @@ The assignment starts at position INDEX."
2850 arglist index 2849 arglist index
2851 (ad-element-access values-index 'ad-vAlUeS)) 2850 (ad-element-access values-index 'ad-vAlUeS))
2852 set-forms)) 2851 set-forms))
2853 (setq set-forms 2852 (setq set-forms
2854 (cons (if (= (car argument-access) 0) 2853 (cons (if (= (car argument-access) 0)
2855 (list 'setq 2854 (list 'setq
2856 (car (cdr argument-access)) 2855 (car (cdr argument-access))
2857 (ad-list-access values-index 'ad-vAlUeS)) 2856 (ad-list-access values-index 'ad-vAlUeS))
2858 (list 'setcdr 2857 (list 'setcdr
2859 (ad-list-access (1- (car argument-access)) 2858 (ad-list-access (1- (car argument-access))
2860 (car (cdr argument-access))) 2859 (car (cdr argument-access)))
2861 (ad-list-access values-index 'ad-vAlUeS))) 2860 (ad-list-access values-index 'ad-vAlUeS)))
2862 set-forms)) 2861 set-forms))
2863 ;; terminate loop 2862 ;; terminate loop
2864 (setq arglist nil)) 2863 (setq arglist nil))
2865 (setq index (1+ index)) 2864 (setq index (1+ index))
2866 (setq values-index (1+ values-index))) 2865 (setq values-index (1+ values-index)))
2867 (if (null set-forms) 2866 (if (null set-forms)
2868 (error "ad-set-arguments: No argument at position %d of `%s'" 2867 (error "ad-set-arguments: No argument at position %d of `%s'"
2869 index arglist) 2868 index arglist)
2870 (if (= (length set-forms) 1) 2869 (if (= (length set-forms) 1)
2871 ;; For exactly one set-form we can use values-form directly,... 2870 ;; For exactly one set-form we can use values-form directly,...
2872 (ad-substitute-tree 2871 (ad-substitute-tree
2873 (function (lambda (form) (eq form 'ad-vAlUeS))) 2872 (function (lambda (form) (eq form 'ad-vAlUeS)))
2874 (function (lambda (form) values-form)) 2873 (function (lambda (form) values-form))
2875 (car set-forms)) 2874 (car set-forms))
2876 ;; ...if we have more we have to bind it to a variable: 2875 ;; ...if we have more we have to bind it to a variable:
2877 (` (let ((ad-vAlUeS (, values-form))) 2876 `(let ((ad-vAlUeS ,values-form))
2878 (,@ (reverse set-forms)) 2877 ,@(reverse set-forms)
2879 ;; work around the old backquote bug: 2878 ;; work around the old backquote bug:
2880 (, 'ad-vAlUeS))))))) 2879 ,'ad-vAlUeS)))))
2881 2880
2882(defun ad-insert-argument-access-forms (definition arglist) 2881(defun ad-insert-argument-access-forms (definition arglist)
2883 "Expands arg-access text macros in DEFINITION according to ARGLIST." 2882 "Expands arg-access text macros in DEFINITION according to ARGLIST."
@@ -3071,11 +3070,11 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
3071 ((ad-interactive-form origdef) 3070 ((ad-interactive-form origdef)
3072 (if (and (symbolp function) (get function 'elp-info)) 3071 (if (and (symbolp function) (get function 'elp-info))
3073 (interactive-form (aref (get function 'elp-info) 2)) 3072 (interactive-form (aref (get function 'elp-info) 2))
3074 (ad-interactive-form origdef))) 3073 (ad-interactive-form origdef)))
3075 ;; Otherwise we must have a subr: make it interactive if 3074 ;; Otherwise we must have a subr: make it interactive if
3076 ;; we have to and initialize required arguments in case 3075 ;; we have to and initialize required arguments in case
3077 ;; it is called interactively: 3076 ;; it is called interactively:
3078 (orig-interactive-p 3077 (orig-interactive-p
3079 (interactive-form origdef)))) 3078 (interactive-form origdef))))
3080 (orig-form 3079 (orig-form
3081 (cond ((or orig-special-form-p orig-macro-p) 3080 (cond ((or orig-special-form-p orig-macro-p)
@@ -3104,7 +3103,7 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
3104 ;; in order to do proper prompting: 3103 ;; in order to do proper prompting:
3105 `(if (interactive-p) 3104 `(if (interactive-p)
3106 (call-interactively ',origname) 3105 (call-interactively ',origname)
3107 ,(ad-make-mapped-call orig-arglist 3106 ,(ad-make-mapped-call orig-arglist
3108 advised-arglist 3107 advised-arglist
3109 origname))) 3108 origname)))
3110 ;; And now for normal functions and non-interactive subrs 3109 ;; And now for normal functions and non-interactive subrs
@@ -3126,7 +3125,7 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
3126 (ad-get-enabled-advices function 'after))))) 3125 (ad-get-enabled-advices function 'after)))))
3127 3126
3128(defun ad-assemble-advised-definition 3127(defun ad-assemble-advised-definition
3129 (type args docstring interactive orig &optional befores arounds afters) 3128 (type args docstring interactive orig &optional befores arounds afters)
3130 3129
3131 "Assembles an original and its advices into an advised function. 3130 "Assembles an original and its advices into an advised function.
3132It constructs a function or macro definition according to TYPE which has to 3131It constructs a function or macro definition according to TYPE which has to
@@ -3139,58 +3138,58 @@ should be modified. The assembled function will be returned."
3139 3138
3140 (let (before-forms around-form around-form-protected after-forms definition) 3139 (let (before-forms around-form around-form-protected after-forms definition)
3141 (ad-dolist (advice befores) 3140 (ad-dolist (advice befores)
3142 (cond ((and (ad-advice-protected advice) 3141 (cond ((and (ad-advice-protected advice)
3143 before-forms) 3142 before-forms)
3144 (setq before-forms 3143 (setq before-forms
3145 (` ((unwind-protect 3144 `((unwind-protect
3146 (, (ad-prognify before-forms)) 3145 ,(ad-prognify before-forms)
3147 (,@ (ad-body-forms 3146 ,@(ad-body-forms
3148 (ad-advice-definition advice)))))))) 3147 (ad-advice-definition advice))))))
3149 (t (setq before-forms 3148 (t (setq before-forms
3150 (append before-forms 3149 (append before-forms
3151 (ad-body-forms (ad-advice-definition advice))))))) 3150 (ad-body-forms (ad-advice-definition advice)))))))
3152 3151
3153 (setq around-form (` (setq ad-return-value (, orig)))) 3152 (setq around-form `(setq ad-return-value ,orig))
3154 (ad-dolist (advice (reverse arounds)) 3153 (ad-dolist (advice (reverse arounds))
3155 ;; If any of the around advices is protected then we 3154 ;; If any of the around advices is protected then we
3156 ;; protect the complete around advice onion: 3155 ;; protect the complete around advice onion:
3157 (if (ad-advice-protected advice) 3156 (if (ad-advice-protected advice)
3158 (setq around-form-protected t)) 3157 (setq around-form-protected t))
3159 (setq around-form 3158 (setq around-form
3160 (ad-substitute-tree 3159 (ad-substitute-tree
3161 (function (lambda (form) (eq form 'ad-do-it))) 3160 (function (lambda (form) (eq form 'ad-do-it)))
3162 (function (lambda (form) around-form)) 3161 (function (lambda (form) around-form))
3163 (ad-prognify (ad-body-forms (ad-advice-definition advice)))))) 3162 (ad-prognify (ad-body-forms (ad-advice-definition advice))))))
3164 3163
3165 (setq after-forms 3164 (setq after-forms
3166 (if (and around-form-protected before-forms) 3165 (if (and around-form-protected before-forms)
3167 (` ((unwind-protect 3166 `((unwind-protect
3168 (, (ad-prognify before-forms)) 3167 ,(ad-prognify before-forms)
3169 (, around-form)))) 3168 ,around-form))
3170 (append before-forms (list around-form)))) 3169 (append before-forms (list around-form))))
3171 (ad-dolist (advice afters) 3170 (ad-dolist (advice afters)
3172 (cond ((and (ad-advice-protected advice) 3171 (cond ((and (ad-advice-protected advice)
3173 after-forms) 3172 after-forms)
3174 (setq after-forms 3173 (setq after-forms
3175 (` ((unwind-protect 3174 `((unwind-protect
3176 (, (ad-prognify after-forms)) 3175 ,(ad-prognify after-forms)
3177 (,@ (ad-body-forms 3176 ,@(ad-body-forms
3178 (ad-advice-definition advice)))))))) 3177 (ad-advice-definition advice))))))
3179 (t (setq after-forms 3178 (t (setq after-forms
3180 (append after-forms 3179 (append after-forms
3181 (ad-body-forms (ad-advice-definition advice))))))) 3180 (ad-body-forms (ad-advice-definition advice)))))))
3182 3181
3183 (setq definition 3182 (setq definition
3184 (` ((,@ (if (memq type '(macro special-form)) '(macro))) 3183 `(,@(if (memq type '(macro special-form)) '(macro))
3185 lambda 3184 lambda
3186 (, args) 3185 ,args
3187 (,@ (if docstring (list docstring))) 3186 ,@(if docstring (list docstring))
3188 (,@ (if interactive (list interactive))) 3187 ,@(if interactive (list interactive))
3189 (let (ad-return-value) 3188 (let (ad-return-value)
3190 (,@ after-forms) 3189 ,@after-forms
3191 (, (if (eq type 'special-form) 3190 ,(if (eq type 'special-form)
3192 '(list 'quote ad-return-value) 3191 '(list 'quote ad-return-value)
3193 'ad-return-value)))))) 3192 'ad-return-value))))
3194 3193
3195 (ad-insert-argument-access-forms definition args))) 3194 (ad-insert-argument-access-forms definition args)))
3196 3195
@@ -3266,14 +3265,14 @@ should be modified. The assembled function will be returned."
3266;; a lot cheaper than reconstructing an advised definition. 3265;; a lot cheaper than reconstructing an advised definition.
3267 3266
3268(defmacro ad-get-cache-definition (function) 3267(defmacro ad-get-cache-definition (function)
3269 (` (car (ad-get-advice-info-field (, function) 'cache)))) 3268 `(car (ad-get-advice-info-field ,function 'cache)))
3270 3269
3271(defmacro ad-get-cache-id (function) 3270(defmacro ad-get-cache-id (function)
3272 (` (cdr (ad-get-advice-info-field (, function) 'cache)))) 3271 `(cdr (ad-get-advice-info-field ,function 'cache)))
3273 3272
3274(defmacro ad-set-cache (function definition id) 3273(defmacro ad-set-cache (function definition id)
3275 (` (ad-set-advice-info-field 3274 `(ad-set-advice-info-field
3276 (, function) 'cache (cons (, definition) (, id))))) 3275 ,function 'cache (cons ,definition ,id)))
3277 3276
3278(defun ad-clear-cache (function) 3277(defun ad-clear-cache (function)
3279 "Clears a previously cached advised definition of FUNCTION. 3278 "Clears a previously cached advised definition of FUNCTION.
@@ -3451,21 +3450,21 @@ advised definition from scratch."
3451 (symbol-function 'ad-make-origname)) 3450 (symbol-function 'ad-make-origname))
3452 (frozen-definition 3451 (frozen-definition
3453 (unwind-protect 3452 (unwind-protect
3454 (progn 3453 (progn
3455 ;; Make sure we construct a proper docstring: 3454 ;; Make sure we construct a proper docstring:
3456 (ad-safe-fset 'ad-make-advised-definition-docstring 3455 (ad-safe-fset 'ad-make-advised-definition-docstring
3457 'ad-make-freeze-docstring) 3456 'ad-make-freeze-docstring)
3458 ;; Make sure `unique-origname' is used as the origname: 3457 ;; Make sure `unique-origname' is used as the origname:
3459 (ad-safe-fset 'ad-make-origname (lambda (x) unique-origname)) 3458 (ad-safe-fset 'ad-make-origname (lambda (x) unique-origname))
3460 ;; No we reset all current advice information to nil and 3459 ;; No we reset all current advice information to nil and
3461 ;; generate an advised definition that's solely determined 3460 ;; generate an advised definition that's solely determined
3462 ;; by ADVICE and the current origdef of FUNCTION: 3461 ;; by ADVICE and the current origdef of FUNCTION:
3463 (ad-set-advice-info function nil) 3462 (ad-set-advice-info function nil)
3464 (ad-add-advice function advice class position) 3463 (ad-add-advice function advice class position)
3465 ;; The following will provide proper real docstrings as 3464 ;; The following will provide proper real docstrings as
3466 ;; well as a definition that will make the compiler happy: 3465 ;; well as a definition that will make the compiler happy:
3467 (ad-set-orig-definition function orig-definition) 3466 (ad-set-orig-definition function orig-definition)
3468 (ad-make-advised-definition function)) 3467 (ad-make-advised-definition function))
3469 ;; Restore the old advice state: 3468 ;; Restore the old advice state:
3470 (ad-set-advice-info function old-advice-info) 3469 (ad-set-advice-info function old-advice-info)
3471 ;; Restore functions: 3470 ;; Restore functions:
@@ -3476,17 +3475,17 @@ advised definition from scratch."
3476 (let* ((macro-p (ad-macro-p frozen-definition)) 3475 (let* ((macro-p (ad-macro-p frozen-definition))
3477 (body (cdr (if macro-p 3476 (body (cdr (if macro-p
3478 (ad-lambdafy frozen-definition) 3477 (ad-lambdafy frozen-definition)
3479 frozen-definition)))) 3478 frozen-definition))))
3480 (` (progn 3479 `(progn
3481 (if (not (fboundp '(, unique-origname))) 3480 (if (not (fboundp ',unique-origname))
3482 (fset '(, unique-origname) 3481 (fset ',unique-origname
3483 ;; avoid infinite recursion in case the function 3482 ;; avoid infinite recursion in case the function
3484 ;; we want to freeze is already advised: 3483 ;; we want to freeze is already advised:
3485 (or (ad-get-orig-definition '(, function)) 3484 (or (ad-get-orig-definition ',function)
3486 (symbol-function '(, function))))) 3485 (symbol-function ',function))))
3487 ((, (if macro-p 'defmacro 'defun)) 3486 (,(if macro-p 'defmacro 'defun)
3488 (, function) 3487 ,function
3489 (,@ body)))))))) 3488 ,@body))))))
3490 3489
3491 3490
3492;; @@ Activation and definition handling: 3491;; @@ Activation and definition handling:
@@ -3812,13 +3811,13 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation."
3812 (let* ((class (car args)) 3811 (let* ((class (car args))
3813 (name (if (not (ad-class-p class)) 3812 (name (if (not (ad-class-p class))
3814 (error "defadvice: Invalid advice class: %s" class) 3813 (error "defadvice: Invalid advice class: %s" class)
3815 (nth 1 args))) 3814 (nth 1 args)))
3816 (position (if (not (ad-name-p name)) 3815 (position (if (not (ad-name-p name))
3817 (error "defadvice: Invalid advice name: %s" name) 3816 (error "defadvice: Invalid advice name: %s" name)
3818 (setq args (nthcdr 2 args)) 3817 (setq args (nthcdr 2 args))
3819 (if (ad-position-p (car args)) 3818 (if (ad-position-p (car args))
3820 (prog1 (car args) 3819 (prog1 (car args)
3821 (setq args (cdr args)))))) 3820 (setq args (cdr args))))))
3822 (arglist (if (listp (car args)) 3821 (arglist (if (listp (car args))
3823 (prog1 (car args) 3822 (prog1 (car args)
3824 (setq args (cdr args))))) 3823 (setq args (cdr args)))))
@@ -3826,18 +3825,18 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation."
3826 (mapcar 3825 (mapcar
3827 (function 3826 (function
3828 (lambda (flag) 3827 (lambda (flag)
3829 (let ((completion 3828 (let ((completion
3830 (try-completion (symbol-name flag) ad-defadvice-flags))) 3829 (try-completion (symbol-name flag) ad-defadvice-flags)))
3831 (cond ((eq completion t) flag) 3830 (cond ((eq completion t) flag)
3832 ((assoc completion ad-defadvice-flags) 3831 ((assoc completion ad-defadvice-flags)
3833 (intern completion)) 3832 (intern completion))
3834 (t (error "defadvice: Invalid or ambiguous flag: %s" 3833 (t (error "defadvice: Invalid or ambiguous flag: %s"
3835 flag)))))) 3834 flag))))))
3836 args)) 3835 args))
3837 (advice (ad-make-advice 3836 (advice (ad-make-advice
3838 name (memq 'protect flags) 3837 name (memq 'protect flags)
3839 (not (memq 'disable flags)) 3838 (not (memq 'disable flags))
3840 (` (advice lambda (, arglist) (,@ body))))) 3839 `(advice lambda ,arglist ,@body)))
3841 (preactivation (if (memq 'preactivate flags) 3840 (preactivation (if (memq 'preactivate flags)
3842 (ad-preactivate-advice 3841 (ad-preactivate-advice
3843 function advice class position)))) 3842 function advice class position))))
@@ -3846,25 +3845,25 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation."
3846 ;; jwz's idea: Freeze the advised definition into a dumpable 3845 ;; jwz's idea: Freeze the advised definition into a dumpable
3847 ;; defun/defmacro whose docs can be written to the DOC file: 3846 ;; defun/defmacro whose docs can be written to the DOC file:
3848 (ad-make-freeze-definition function advice class position) 3847 (ad-make-freeze-definition function advice class position)
3849 ;; the normal case: 3848 ;; the normal case:
3850 (` (progn 3849 `(progn
3851 (ad-add-advice '(, function) '(, advice) '(, class) '(, position)) 3850 (ad-add-advice ',function ',advice ',class ',position)
3852 (,@ (if preactivation 3851 ,@(if preactivation
3853 (` ((ad-set-cache 3852 `((ad-set-cache
3854 '(, function) 3853 ',function
3855 ;; the function will get compiled: 3854 ;; the function will get compiled:
3856 (, (cond ((ad-macro-p (car preactivation)) 3855 ,(cond ((ad-macro-p (car preactivation))
3857 (` (ad-macrofy 3856 `(ad-macrofy
3858 (function 3857 (function
3859 (, (ad-lambdafy 3858 ,(ad-lambdafy
3860 (car preactivation))))))) 3859 (car preactivation)))))
3861 (t (` (function 3860 (t `(function
3862 (, (car preactivation))))))) 3861 ,(car preactivation))))
3863 '(, (car (cdr preactivation)))))))) 3862 ',(car (cdr preactivation)))))
3864 (,@ (if (memq 'activate flags) 3863 ,@(if (memq 'activate flags)
3865 (` ((ad-activate '(, function) 3864 `((ad-activate ',function
3866 (, (if (memq 'compile flags) t))))))) 3865 ,(if (memq 'compile flags) t))))
3867 '(, function)))))) 3866 ',function))))
3868 3867
3869 3868
3870;; @@ Tools: 3869;; @@ Tools:
@@ -3880,39 +3879,39 @@ undone on exit of this macro."
3880 (current-bindings 3879 (current-bindings
3881 (mapcar (function 3880 (mapcar (function
3882 (lambda (function) 3881 (lambda (function)
3883 (setq index (1+ index)) 3882 (setq index (1+ index))
3884 (list (intern (format "ad-oRiGdEf-%d" index)) 3883 (list (intern (format "ad-oRiGdEf-%d" index))
3885 (` (symbol-function '(, function)))))) 3884 `(symbol-function ',function))))
3886 functions))) 3885 functions)))
3887 (` (let (, current-bindings) 3886 `(let ,current-bindings
3888 (unwind-protect 3887 (unwind-protect
3889 (progn 3888 (progn
3890 (,@ (progn 3889 ,@(progn
3891 ;; Make forms to redefine functions to their 3890 ;; Make forms to redefine functions to their
3892 ;; original definitions if they are advised: 3891 ;; original definitions if they are advised:
3893 (setq index -1) 3892 (setq index -1)
3894 (mapcar 3893 (mapcar
3895 (function 3894 (function
3896 (lambda (function) 3895 (lambda (function)
3897 (setq index (1+ index)) 3896 (setq index (1+ index))
3898 (` (ad-safe-fset 3897 `(ad-safe-fset
3899 '(, function) 3898 ',function
3900 (or (ad-get-orig-definition '(, function)) 3899 (or (ad-get-orig-definition ',function)
3901 (, (car (nth index current-bindings)))))))) 3900 ,(car (nth index current-bindings))))))
3902 functions))) 3901 functions))
3903 (,@ body)) 3902 ,@body)
3904 (,@ (progn 3903 ,@(progn
3905 ;; Make forms to back-define functions to the definitions 3904 ;; Make forms to back-define functions to the definitions
3906 ;; they had outside this macro call: 3905 ;; they had outside this macro call:
3907 (setq index -1) 3906 (setq index -1)
3908 (mapcar 3907 (mapcar
3909 (function 3908 (function
3910 (lambda (function) 3909 (lambda (function)
3911 (setq index (1+ index)) 3910 (setq index (1+ index))
3912 (` (ad-safe-fset 3911 `(ad-safe-fset
3913 '(, function) 3912 ',function
3914 (, (car (nth index current-bindings))))))) 3913 ,(car (nth index current-bindings)))))
3915 functions)))))))) 3914 functions))))))
3916 3915
3917(if (not (get 'ad-with-originals 'lisp-indent-hook)) 3916(if (not (get 'ad-with-originals 'lisp-indent-hook))
3918 (put 'ad-with-originals 'lisp-indent-hook 1)) 3917 (put 'ad-with-originals 'lisp-indent-hook 1))
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 8c8472272e2..2639a93dea8 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -176,18 +176,18 @@
176 176
177;; From custom web page for compatibility between versions of custom: 177;; From custom web page for compatibility between versions of custom:
178(eval-and-compile 178(eval-and-compile
179 (condition-case () 179 (condition-case ()
180 (require 'custom) 180 (require 'custom)
181 (error nil)) 181 (error nil))
182 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) 182 (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
183 nil ;; We've got what we needed 183 nil ;; We've got what we needed
184 ;; We have the old custom-library, hack around it! 184 ;; We have the old custom-library, hack around it!
185 (defmacro defgroup (&rest args) 185 (defmacro defgroup (&rest args)
186 nil) 186 nil)
187 (defmacro custom-add-option (&rest args) 187 (defmacro custom-add-option (&rest args)
188 nil) 188 nil)
189 (defmacro defcustom (var value doc &rest args) 189 (defmacro defcustom (var value doc &rest args)
190 (` (defvar (, var) (, value) (, doc)))))) 190 `(defvar ,var ,value ,doc))))
191 191
192(defcustom checkdoc-autofix-flag 'semiautomatic 192(defcustom checkdoc-autofix-flag 'semiautomatic
193 "*Non-nil means attempt auto-fixing of doc strings. 193 "*Non-nil means attempt auto-fixing of doc strings.
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index 6bb26507ec2..66509589467 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -219,14 +219,14 @@ buffer will *not* have been changed.
219Return value of last form in FORMS." 219Return value of last form in FORMS."
220 (let ((old-buffer (make-symbol "old-buffer")) 220 (let ((old-buffer (make-symbol "old-buffer"))
221 (hnd (make-symbol "ewoc"))) 221 (hnd (make-symbol "ewoc")))
222 (` (let* (((, old-buffer) (current-buffer)) 222 `(let* ((,old-buffer (current-buffer))
223 ((, hnd) (, ewoc)) 223 (,hnd ,ewoc)
224 (dll (ewoc--dll (, hnd))) 224 (dll (ewoc--dll ,hnd))
225 (,@ varlist)) 225 ,@varlist)
226 (set-buffer (ewoc--buffer (, hnd))) 226 (set-buffer (ewoc--buffer ,hnd))
227 (unwind-protect 227 (unwind-protect
228 (progn (,@ forms)) 228 (progn ,@forms)
229 (set-buffer (, old-buffer))))))) 229 (set-buffer ,old-buffer)))))
230 230
231(defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) 231(defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms)
232 `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) 232 `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms))
diff --git a/lisp/emerge.el b/lisp/emerge.el
index 551ba3503e1..68e857ff245 100644
--- a/lisp/emerge.el
+++ b/lisp/emerge.el
@@ -57,12 +57,12 @@
57(defmacro emerge-eval-in-buffer (buffer &rest forms) 57(defmacro emerge-eval-in-buffer (buffer &rest forms)
58 "Macro to switch to BUFFER, evaluate FORMS, returns to original buffer. 58 "Macro to switch to BUFFER, evaluate FORMS, returns to original buffer.
59Differs from `save-excursion' in that it doesn't save the point and mark." 59Differs from `save-excursion' in that it doesn't save the point and mark."
60 (` (let ((StartBuffer (current-buffer))) 60 `(let ((StartBuffer (current-buffer)))
61 (unwind-protect 61 (unwind-protect
62 (progn 62 (progn
63 (set-buffer (, buffer)) 63 (set-buffer ,buffer)
64 (,@ forms)) 64 ,@forms)
65 (set-buffer StartBuffer))))) 65 (set-buffer StartBuffer))))
66 66
67(defmacro emerge-defvar-local (var value doc) 67(defmacro emerge-defvar-local (var value doc)
68 "Defines SYMBOL as an advertised variable. 68 "Defines SYMBOL as an advertised variable.
@@ -70,10 +70,10 @@ Performs a defvar, then executes `make-variable-buffer-local' on
70the variable. Also sets the `preserved' property, so that 70the variable. Also sets the `preserved' property, so that
71`kill-all-local-variables' (called by major-mode setting commands) 71`kill-all-local-variables' (called by major-mode setting commands)
72won't destroy Emerge control variables." 72won't destroy Emerge control variables."
73 (` (progn 73 `(progn
74 (defvar (, var) (, value) (, doc)) 74 (defvar ,var ,value ,doc)
75 (make-variable-buffer-local '(, var)) 75 (make-variable-buffer-local ',var)
76 (put '(, var) 'preserved t)))) 76 (put ',var 'preserved t)))
77 77
78;; Add entries to minor-mode-alist so that emerge modes show correctly 78;; Add entries to minor-mode-alist so that emerge modes show correctly
79(defvar emerge-minor-modes-list 79(defvar emerge-minor-modes-list
@@ -567,7 +567,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
567;;; Setup functions for two-file mode. 567;;; Setup functions for two-file mode.
568 568
569(defun emerge-files-internal (file-A file-B &optional startup-hooks quit-hooks 569(defun emerge-files-internal (file-A file-B &optional startup-hooks quit-hooks
570 output-file) 570 output-file)
571 (if (not (file-readable-p file-A)) 571 (if (not (file-readable-p file-A))
572 (error "File `%s' does not exist or is not readable" file-A)) 572 (error "File `%s' does not exist or is not readable" file-A))
573 (if (not (file-readable-p file-B)) 573 (if (not (file-readable-p file-B))
@@ -587,10 +587,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
587 (if temp 587 (if temp
588 (setq file-A temp 588 (setq file-A temp
589 startup-hooks 589 startup-hooks
590 (cons (` (lambda () (delete-file (, file-A)))) 590 (cons `(lambda () (delete-file ,file-A))
591 startup-hooks)) 591 startup-hooks))
592 ;; Verify that the file matches the buffer 592 ;; Verify that the file matches the buffer
593 (emerge-verify-file-buffer)))) 593 (emerge-verify-file-buffer))))
594 (emerge-eval-in-buffer 594 (emerge-eval-in-buffer
595 buffer-B 595 buffer-B
596 (widen) 596 (widen)
@@ -598,10 +598,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
598 (if temp 598 (if temp
599 (setq file-B temp 599 (setq file-B temp
600 startup-hooks 600 startup-hooks
601 (cons (` (lambda () (delete-file (, file-B)))) 601 (cons `(lambda () (delete-file ,file-B))
602 startup-hooks)) 602 startup-hooks))
603 ;; Verify that the file matches the buffer 603 ;; Verify that the file matches the buffer
604 (emerge-verify-file-buffer)))) 604 (emerge-verify-file-buffer))))
605 (emerge-setup buffer-A file-A buffer-B file-B startup-hooks quit-hooks 605 (emerge-setup buffer-A file-A buffer-B file-B startup-hooks quit-hooks
606 output-file))) 606 output-file)))
607 607
@@ -741,10 +741,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
741 (if temp 741 (if temp
742 (setq file-A temp 742 (setq file-A temp
743 startup-hooks 743 startup-hooks
744 (cons (` (lambda () (delete-file (, file-A)))) 744 (cons `(lambda () (delete-file ,file-A))
745 startup-hooks)) 745 startup-hooks))
746 ;; Verify that the file matches the buffer 746 ;; Verify that the file matches the buffer
747 (emerge-verify-file-buffer)))) 747 (emerge-verify-file-buffer))))
748 (emerge-eval-in-buffer 748 (emerge-eval-in-buffer
749 buffer-B 749 buffer-B
750 (widen) 750 (widen)
@@ -752,10 +752,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
752 (if temp 752 (if temp
753 (setq file-B temp 753 (setq file-B temp
754 startup-hooks 754 startup-hooks
755 (cons (` (lambda () (delete-file (, file-B)))) 755 (cons `(lambda () (delete-file ,file-B))
756 startup-hooks)) 756 startup-hooks))
757 ;; Verify that the file matches the buffer 757 ;; Verify that the file matches the buffer
758 (emerge-verify-file-buffer)))) 758 (emerge-verify-file-buffer))))
759 (emerge-eval-in-buffer 759 (emerge-eval-in-buffer
760 buffer-ancestor 760 buffer-ancestor
761 (widen) 761 (widen)
@@ -763,10 +763,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
763 (if temp 763 (if temp
764 (setq file-ancestor temp 764 (setq file-ancestor temp
765 startup-hooks 765 startup-hooks
766 (cons (` (lambda () (delete-file (, file-ancestor)))) 766 (cons `(lambda () (delete-file ,file-ancestor))
767 startup-hooks)) 767 startup-hooks))
768 ;; Verify that the file matches the buffer 768 ;; Verify that the file matches the buffer
769 (emerge-verify-file-buffer)))) 769 (emerge-verify-file-buffer))))
770 (emerge-setup-with-ancestor buffer-A file-A buffer-B file-B 770 (emerge-setup-with-ancestor buffer-A file-A buffer-B file-B
771 buffer-ancestor file-ancestor 771 buffer-ancestor file-ancestor
772 startup-hooks quit-hooks output-file))) 772 startup-hooks quit-hooks output-file)))
@@ -901,7 +901,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
901 (emerge-read-file-name "Output file" emerge-last-dir-output 901 (emerge-read-file-name "Output file" emerge-last-dir-output
902 f f nil))))) 902 f f nil)))))
903 (if file-out 903 (if file-out
904 (add-hook 'quit-hooks (` (lambda () (emerge-files-exit (, file-out)))))) 904 (add-hook 'quit-hooks `(lambda () (emerge-files-exit ,file-out))))
905 (emerge-files-internal 905 (emerge-files-internal
906 file-A file-B startup-hooks 906 file-A file-B startup-hooks
907 quit-hooks 907 quit-hooks
@@ -923,7 +923,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
923 (emerge-read-file-name "Output file" emerge-last-dir-output 923 (emerge-read-file-name "Output file" emerge-last-dir-output
924 f f nil))))) 924 f f nil)))))
925 (if file-out 925 (if file-out
926 (add-hook 'quit-hooks (` (lambda () (emerge-files-exit (, file-out)))))) 926 (add-hook 'quit-hooks `(lambda () (emerge-files-exit ,file-out))))
927 (emerge-files-with-ancestor-internal 927 (emerge-files-with-ancestor-internal
928 file-A file-B file-ancestor startup-hooks 928 file-A file-B file-ancestor startup-hooks
929 quit-hooks 929 quit-hooks
@@ -951,17 +951,17 @@ This is *not* a user option, since Emerge uses it for its own processing.")
951 (write-region (point-min) (point-max) emerge-file-B nil 'no-message)) 951 (write-region (point-min) (point-max) emerge-file-B nil 'no-message))
952 (emerge-setup (get-buffer buffer-A) emerge-file-A 952 (emerge-setup (get-buffer buffer-A) emerge-file-A
953 (get-buffer buffer-B) emerge-file-B 953 (get-buffer buffer-B) emerge-file-B
954 (cons (` (lambda () 954 (cons `(lambda ()
955 (delete-file (, emerge-file-A)) 955 (delete-file ,emerge-file-A)
956 (delete-file (, emerge-file-B)))) 956 (delete-file ,emerge-file-B))
957 startup-hooks) 957 startup-hooks)
958 quit-hooks 958 quit-hooks
959 nil))) 959 nil)))
960 960
961;;;###autoload 961;;;###autoload
962(defun emerge-buffers-with-ancestor (buffer-A buffer-B buffer-ancestor 962(defun emerge-buffers-with-ancestor (buffer-A buffer-B buffer-ancestor
963 &optional startup-hooks 963 &optional startup-hooks
964 quit-hooks) 964 quit-hooks)
965 "Run Emerge on two buffers, giving another buffer as the ancestor." 965 "Run Emerge on two buffers, giving another buffer as the ancestor."
966 (interactive 966 (interactive
967 "bBuffer A to merge: \nbBuffer B to merge: \nbAncestor buffer: ") 967 "bBuffer A to merge: \nbBuffer B to merge: \nbAncestor buffer: ")
@@ -982,11 +982,11 @@ This is *not* a user option, since Emerge uses it for its own processing.")
982 (get-buffer buffer-B) emerge-file-B 982 (get-buffer buffer-B) emerge-file-B
983 (get-buffer buffer-ancestor) 983 (get-buffer buffer-ancestor)
984 emerge-file-ancestor 984 emerge-file-ancestor
985 (cons (` (lambda () 985 (cons `(lambda ()
986 (delete-file (, emerge-file-A)) 986 (delete-file ,emerge-file-A)
987 (delete-file (, emerge-file-B)) 987 (delete-file ,emerge-file-B)
988 (delete-file 988 (delete-file
989 (, emerge-file-ancestor)))) 989 ,emerge-file-ancestor))
990 startup-hooks) 990 startup-hooks)
991 quit-hooks 991 quit-hooks
992 nil))) 992 nil)))
@@ -1001,7 +1001,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1001 (setq command-line-args-left (nthcdr 3 command-line-args-left)) 1001 (setq command-line-args-left (nthcdr 3 command-line-args-left))
1002 (emerge-files-internal 1002 (emerge-files-internal
1003 file-a file-b nil 1003 file-a file-b nil
1004 (list (` (lambda () (emerge-command-exit (, file-out)))))))) 1004 (list `(lambda () (emerge-command-exit ,file-out))))))
1005 1005
1006;;;###autoload 1006;;;###autoload
1007(defun emerge-files-with-ancestor-command () 1007(defun emerge-files-with-ancestor-command ()
@@ -1015,15 +1015,15 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1015 (setq file-anc (nth 1 command-line-args-left)) 1015 (setq file-anc (nth 1 command-line-args-left))
1016 (setq file-out (nth 4 command-line-args-left)) 1016 (setq file-out (nth 4 command-line-args-left))
1017 (setq command-line-args-left (nthcdr 5 command-line-args-left))) 1017 (setq command-line-args-left (nthcdr 5 command-line-args-left)))
1018 ;; arguments are "file-a file-b ancestor file-out" 1018 ;; arguments are "file-a file-b ancestor file-out"
1019 (setq file-a (nth 0 command-line-args-left)) 1019 (setq file-a (nth 0 command-line-args-left))
1020 (setq file-b (nth 1 command-line-args-left)) 1020 (setq file-b (nth 1 command-line-args-left))
1021 (setq file-anc (nth 2 command-line-args-left)) 1021 (setq file-anc (nth 2 command-line-args-left))
1022 (setq file-out (nth 3 command-line-args-left)) 1022 (setq file-out (nth 3 command-line-args-left))
1023 (setq command-line-args-left (nthcdr 4 command-line-args-left))) 1023 (setq command-line-args-left (nthcdr 4 command-line-args-left)))
1024 (emerge-files-with-ancestor-internal 1024 (emerge-files-with-ancestor-internal
1025 file-a file-b file-anc nil 1025 file-a file-b file-anc nil
1026 (list (` (lambda () (emerge-command-exit (, file-out)))))))) 1026 (list `(lambda () (emerge-command-exit ,file-out))))))
1027 1027
1028(defun emerge-command-exit (file-out) 1028(defun emerge-command-exit (file-out)
1029 (emerge-write-and-delete file-out) 1029 (emerge-write-and-delete file-out)
@@ -1036,7 +1036,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1036 (setq emerge-file-out file-out) 1036 (setq emerge-file-out file-out)
1037 (emerge-files-internal 1037 (emerge-files-internal
1038 file-a file-b nil 1038 file-a file-b nil
1039 (list (` (lambda () (emerge-remote-exit (, file-out) '(, emerge-exit-func))))) 1039 (list `(lambda () (emerge-remote-exit ,file-out ',emerge-exit-func)))
1040 file-out) 1040 file-out)
1041 (throw 'client-wait nil)) 1041 (throw 'client-wait nil))
1042 1042
@@ -1045,7 +1045,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1045 (setq emerge-file-out file-out) 1045 (setq emerge-file-out file-out)
1046 (emerge-files-with-ancestor-internal 1046 (emerge-files-with-ancestor-internal
1047 file-a file-b file-anc nil 1047 file-a file-b file-anc nil
1048 (list (` (lambda () (emerge-remote-exit (, file-out) '(, emerge-exit-func))))) 1048 (list `(lambda () (emerge-remote-exit ,file-out ',emerge-exit-func)))
1049 file-out) 1049 file-out)
1050 (throw 'client-wait nil)) 1050 (throw 'client-wait nil))
1051 1051
@@ -1070,17 +1070,17 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1070 (emerge-revisions-internal 1070 (emerge-revisions-internal
1071 file revision-A revision-B startup-hooks 1071 file revision-A revision-B startup-hooks
1072 (if arg 1072 (if arg
1073 (cons (` (lambda () 1073 (cons `(lambda ()
1074 (shell-command 1074 (shell-command
1075 (, (format "%s %s" emerge-rcs-ci-program file))))) 1075 ,(format "%s %s" emerge-rcs-ci-program file)))
1076 quit-hooks) 1076 quit-hooks)
1077 quit-hooks))) 1077 quit-hooks)))
1078 1078
1079;;;###autoload 1079;;;###autoload
1080(defun emerge-revisions-with-ancestor (arg file revision-A 1080(defun emerge-revisions-with-ancestor (arg file revision-A
1081 revision-B ancestor 1081 revision-B ancestor
1082 &optional 1082 &optional
1083 startup-hooks quit-hooks) 1083 startup-hooks quit-hooks)
1084 "Emerge two RCS revisions of a file, with another revision as ancestor." 1084 "Emerge two RCS revisions of a file, with another revision as ancestor."
1085 (interactive 1085 (interactive
1086 (list current-prefix-arg 1086 (list current-prefix-arg
@@ -1095,14 +1095,14 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1095 file revision-A revision-B ancestor startup-hooks 1095 file revision-A revision-B ancestor startup-hooks
1096 (if arg 1096 (if arg
1097 (let ((cmd )) 1097 (let ((cmd ))
1098 (cons (` (lambda () 1098 (cons `(lambda ()
1099 (shell-command 1099 (shell-command
1100 (, (format "%s %s" emerge-rcs-ci-program file))))) 1100 ,(format "%s %s" emerge-rcs-ci-program file)))
1101 quit-hooks)) 1101 quit-hooks))
1102 quit-hooks))) 1102 quit-hooks)))
1103 1103
1104(defun emerge-revisions-internal (file revision-A revision-B &optional 1104(defun emerge-revisions-internal (file revision-A revision-B &optional
1105 startup-hooks quit-hooks output-file) 1105 startup-hooks quit-hooks output-file)
1106 (let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A))) 1106 (let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A)))
1107 (buffer-B (get-buffer-create (format "%s,%s" file revision-B))) 1107 (buffer-B (get-buffer-create (format "%s,%s" file revision-B)))
1108 (emerge-file-A (emerge-make-temp-file "A")) 1108 (emerge-file-A (emerge-make-temp-file "A"))
@@ -1127,18 +1127,18 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1127 ;; Do the merge 1127 ;; Do the merge
1128 (emerge-setup buffer-A emerge-file-A 1128 (emerge-setup buffer-A emerge-file-A
1129 buffer-B emerge-file-B 1129 buffer-B emerge-file-B
1130 (cons (` (lambda () 1130 (cons `(lambda ()
1131 (delete-file (, emerge-file-A)) 1131 (delete-file ,emerge-file-A)
1132 (delete-file (, emerge-file-B)))) 1132 (delete-file ,emerge-file-B))
1133 startup-hooks) 1133 startup-hooks)
1134 (cons (` (lambda () (emerge-files-exit (, file)))) 1134 (cons `(lambda () (emerge-files-exit ,file))
1135 quit-hooks) 1135 quit-hooks)
1136 nil))) 1136 nil)))
1137 1137
1138(defun emerge-revision-with-ancestor-internal (file revision-A revision-B 1138(defun emerge-revision-with-ancestor-internal (file revision-A revision-B
1139 ancestor 1139 ancestor
1140 &optional startup-hooks 1140 &optional startup-hooks
1141 quit-hooks output-file) 1141 quit-hooks output-file)
1142 (let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A))) 1142 (let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A)))
1143 (buffer-B (get-buffer-create (format "%s,%s" file revision-B))) 1143 (buffer-B (get-buffer-create (format "%s,%s" file revision-B)))
1144 (buffer-ancestor (get-buffer-create (format "%s,%s" file ancestor))) 1144 (buffer-ancestor (get-buffer-create (format "%s,%s" file ancestor)))
@@ -1175,12 +1175,12 @@ This is *not* a user option, since Emerge uses it for its own processing.")
1175 (emerge-setup-with-ancestor 1175 (emerge-setup-with-ancestor
1176 buffer-A emerge-file-A buffer-B emerge-file-B 1176 buffer-A emerge-file-A buffer-B emerge-file-B
1177 buffer-ancestor emerge-ancestor 1177 buffer-ancestor emerge-ancestor
1178 (cons (` (lambda () 1178 (cons `(lambda ()
1179 (delete-file (, emerge-file-A)) 1179 (delete-file ,emerge-file-A)
1180 (delete-file (, emerge-file-B)) 1180 (delete-file ,emerge-file-B)
1181 (delete-file (, emerge-ancestor)))) 1181 (delete-file ,emerge-ancestor))
1182 startup-hooks) 1182 startup-hooks)
1183 (cons (` (lambda () (emerge-files-exit (, file)))) 1183 (cons `(lambda () (emerge-files-exit ,file))
1184 quit-hooks) 1184 quit-hooks)
1185 output-file))) 1185 output-file)))
1186 1186
@@ -1225,26 +1225,26 @@ Otherwise, the A or B file present is copied to the output file."
1225 (goto-char (match-end 0)) 1225 (goto-char (match-end 0))
1226 ;; Store the filename in the right variable 1226 ;; Store the filename in the right variable
1227 (cond 1227 (cond
1228 ((string-equal tag "a") 1228 ((string-equal tag "a")
1229 (if file-A 1229 (if file-A
1230 (error "This line has two `A' entries")) 1230 (error "This line has two `A' entries"))
1231 (setq file-A file)) 1231 (setq file-A file))
1232 ((string-equal tag "b") 1232 ((string-equal tag "b")
1233 (if file-B 1233 (if file-B
1234 (error "This line has two `B' entries")) 1234 (error "This line has two `B' entries"))
1235 (setq file-B file)) 1235 (setq file-B file))
1236 ((or (string-equal tag "anc") (string-equal tag "ancestor")) 1236 ((or (string-equal tag "anc") (string-equal tag "ancestor"))
1237 (if file-ancestor 1237 (if file-ancestor
1238 (error "This line has two `ancestor' entries")) 1238 (error "This line has two `ancestor' entries"))
1239 (setq file-ancestor file)) 1239 (setq file-ancestor file))
1240 ((or (string-equal tag "out") (string-equal tag "output")) 1240 ((or (string-equal tag "out") (string-equal tag "output"))
1241 (if file-out 1241 (if file-out
1242 (error "This line has two `output' entries")) 1242 (error "This line has two `output' entries"))
1243 (setq file-out file)) 1243 (setq file-out file))
1244 (t 1244 (t
1245 (error "Unrecognized entry")))) 1245 (error "Unrecognized entry"))))
1246 ;; If the match on the entry pattern failed 1246 ;; If the match on the entry pattern failed
1247 (error "Unparsable entry"))) 1247 (error "Unparsable entry")))
1248 ;; Make sure that file-A and file-B are present 1248 ;; Make sure that file-A and file-B are present
1249 (if (not (or (and file-A file-B) file-out)) 1249 (if (not (or (and file-A file-B) file-out))
1250 (error "Must have both `A' and `B' entries")) 1250 (error "Must have both `A' and `B' entries"))
@@ -1255,37 +1255,37 @@ Otherwise, the A or B file present is copied to the output file."
1255 (beginning-of-line 2) 1255 (beginning-of-line 2)
1256 ;; Execute the correct command 1256 ;; Execute the correct command
1257 (cond 1257 (cond
1258 ;; Merge of two files with ancestor 1258 ;; Merge of two files with ancestor
1259 ((and file-A file-B file-ancestor) 1259 ((and file-A file-B file-ancestor)
1260 (message "Merging %s and %s..." file-A file-B) 1260 (message "Merging %s and %s..." file-A file-B)
1261 (emerge-files-with-ancestor (not (not file-out)) file-A file-B 1261 (emerge-files-with-ancestor (not (not file-out)) file-A file-B
1262 file-ancestor file-out 1262 file-ancestor file-out
1263 nil 1263 nil
1264 ;; When done, return to this buffer. 1264 ;; When done, return to this buffer.
1265 (list 1265 (list
1266 (` (lambda () 1266 `(lambda ()
1267 (switch-to-buffer (, (current-buffer))) 1267 (switch-to-buffer ,(current-buffer))
1268 (message "Merge done.")))))) 1268 (message "Merge done.")))))
1269 ;; Merge of two files without ancestor 1269 ;; Merge of two files without ancestor
1270 ((and file-A file-B) 1270 ((and file-A file-B)
1271 (message "Merging %s and %s..." file-A file-B) 1271 (message "Merging %s and %s..." file-A file-B)
1272 (emerge-files (not (not file-out)) file-A file-B file-out 1272 (emerge-files (not (not file-out)) file-A file-B file-out
1273 nil 1273 nil
1274 ;; When done, return to this buffer. 1274 ;; When done, return to this buffer.
1275 (list 1275 (list
1276 (` (lambda () 1276 `(lambda ()
1277 (switch-to-buffer (, (current-buffer))) 1277 (switch-to-buffer ,(current-buffer))
1278 (message "Merge done.")))))) 1278 (message "Merge done.")))))
1279 ;; There is an output file (or there would have been an error above), 1279 ;; There is an output file (or there would have been an error above),
1280 ;; but only one input file. 1280 ;; but only one input file.
1281 ;; The file appears to have been deleted in one version; do nothing. 1281 ;; The file appears to have been deleted in one version; do nothing.
1282 ((and file-ancestor emerge-execute-line-deletions) 1282 ((and file-ancestor emerge-execute-line-deletions)
1283 (message "No action.")) 1283 (message "No action."))
1284 ;; The file should be copied from the version that contains it 1284 ;; The file should be copied from the version that contains it
1285 (t (let ((input-file (or file-A file-B))) 1285 (t (let ((input-file (or file-A file-B)))
1286 (message "Copying...") 1286 (message "Copying...")
1287 (copy-file input-file file-out) 1287 (copy-file input-file file-out)
1288 (message "%s copied to %s." input-file file-out)))))) 1288 (message "%s copied to %s." input-file file-out))))))
1289 1289
1290;;; Sample function for creating information for emerge-execute-line 1290;;; Sample function for creating information for emerge-execute-line
1291 1291
diff --git a/lisp/fast-lock.el b/lisp/fast-lock.el
index bc32f31ce53..40773787324 100644
--- a/lisp/fast-lock.el
+++ b/lisp/fast-lock.el
@@ -187,51 +187,51 @@
187 (error "`fast-lock' was written for long file name systems")) 187 (error "`fast-lock' was written for long file name systems"))
188 188
189(eval-when-compile 189(eval-when-compile
190 ;; 190 ;;
191 ;; We don't do this at the top-level as we only use non-autoloaded macros. 191 ;; We don't do this at the top-level as we only use non-autoloaded macros.
192 (require 'cl) 192 (require 'cl)
193 ;; 193 ;;
194 ;; We use this to preserve or protect things when modifying text properties. 194 ;; We use this to preserve or protect things when modifying text properties.
195 (defmacro save-buffer-state (varlist &rest body) 195 (defmacro save-buffer-state (varlist &rest body)
196 "Bind variables according to VARLIST and eval BODY restoring buffer state." 196 "Bind variables according to VARLIST and eval BODY restoring buffer state."
197 (` (let* ((,@ (append varlist 197 `(let* (,@(append varlist
198 '((modified (buffer-modified-p)) (buffer-undo-list t) 198 '((modified (buffer-modified-p)) (buffer-undo-list t)
199 (inhibit-read-only t) (inhibit-point-motion-hooks t) 199 (inhibit-read-only t) (inhibit-point-motion-hooks t)
200 before-change-functions after-change-functions 200 before-change-functions after-change-functions
201 deactivate-mark buffer-file-name buffer-file-truename)))) 201 deactivate-mark buffer-file-name buffer-file-truename)))
202 (,@ body) 202 ,@body
203 (when (and (not modified) (buffer-modified-p)) 203 (when (and (not modified) (buffer-modified-p))
204 (set-buffer-modified-p nil))))) 204 (set-buffer-modified-p nil))))
205 (put 'save-buffer-state 'lisp-indent-function 1) 205 (put 'save-buffer-state 'lisp-indent-function 1)
206 ;; 206 ;;
207 ;; We use this to verify that a face should be saved. 207 ;; We use this to verify that a face should be saved.
208 (defmacro fast-lock-save-facep (face) 208 (defmacro fast-lock-save-facep (face)
209 "Return non-nil if FACE is one of `fast-lock-save-faces'." 209 "Return non-nil if FACE is one of `fast-lock-save-faces'."
210 (` (or (null fast-lock-save-faces) 210 `(or (null fast-lock-save-faces)
211 (if (symbolp (, face)) 211 (if (symbolp ,face)
212 (memq (, face) fast-lock-save-faces) 212 (memq ,face fast-lock-save-faces)
213 (let ((faces (, face))) 213 (let ((faces ,face))
214 (while (unless (memq (car faces) fast-lock-save-faces) 214 (while (unless (memq (car faces) fast-lock-save-faces)
215 (setq faces (cdr faces)))) 215 (setq faces (cdr faces))))
216 faces))))) 216 faces))))
217 ;; 217 ;;
218 ;; We use this for compatibility with a future Emacs. 218 ;; We use this for compatibility with a future Emacs.
219 (or (fboundp 'with-temp-message) 219 (or (fboundp 'with-temp-message)
220 (defmacro with-temp-message (message &rest body) 220 (defmacro with-temp-message (message &rest body)
221 (` (let ((temp-message (, message)) current-message) 221 `(let ((temp-message ,message) current-message)
222 (unwind-protect 222 (unwind-protect
223 (progn 223 (progn
224 (when temp-message 224 (when temp-message
225 (setq current-message (current-message)) 225 (setq current-message (current-message))
226 (message temp-message)) 226 (message temp-message))
227 (,@ body)) 227 ,@body)
228 (when temp-message 228 (when temp-message
229 (message current-message))))))) 229 (message current-message))))))
230 ;; 230 ;;
231 ;; We use this for compatibility with a future Emacs. 231 ;; We use this for compatibility with a future Emacs.
232 (or (fboundp 'defcustom) 232 (or (fboundp 'defcustom)
233 (defmacro defcustom (symbol value doc &rest args) 233 (defmacro defcustom (symbol value doc &rest args)
234 (` (defvar (, symbol) (, value) (, doc)))))) 234 `(defvar ,symbol ,value ,doc))))
235 235
236;(defun fast-lock-submit-bug-report () 236;(defun fast-lock-submit-bug-report ()
237; "Submit via mail a bug report on fast-lock.el." 237; "Submit via mail a bug report on fast-lock.el."
diff --git a/lisp/lazy-lock.el b/lisp/lazy-lock.el
index 82737a9d02a..04a777895f1 100644
--- a/lisp/lazy-lock.el
+++ b/lisp/lazy-lock.el
@@ -271,29 +271,29 @@
271(require 'font-lock) 271(require 'font-lock)
272 272
273(eval-when-compile 273(eval-when-compile
274 ;; We don't do this at the top-level as we only use non-autoloaded macros. 274 ;; We don't do this at the top-level as we only use non-autoloaded macros.
275 (require 'cl) 275 (require 'cl)
276 ;; 276 ;;
277 ;; We use this to preserve or protect things when modifying text properties. 277 ;; We use this to preserve or protect things when modifying text properties.
278 (defmacro save-buffer-state (varlist &rest body) 278 (defmacro save-buffer-state (varlist &rest body)
279 "Bind variables according to VARLIST and eval BODY restoring buffer state." 279 "Bind variables according to VARLIST and eval BODY restoring buffer state."
280 (` (let* ((,@ (append varlist 280 `(let* (,@(append varlist
281 '((modified (buffer-modified-p)) (buffer-undo-list t) 281 '((modified (buffer-modified-p)) (buffer-undo-list t)
282 (inhibit-read-only t) (inhibit-point-motion-hooks t) 282 (inhibit-read-only t) (inhibit-point-motion-hooks t)
283 before-change-functions after-change-functions 283 before-change-functions after-change-functions
284 deactivate-mark buffer-file-name buffer-file-truename)))) 284 deactivate-mark buffer-file-name buffer-file-truename)))
285 (,@ body) 285 ,@body
286 (when (and (not modified) (buffer-modified-p)) 286 (when (and (not modified) (buffer-modified-p))
287 (set-buffer-modified-p nil))))) 287 (set-buffer-modified-p nil))))
288 (put 'save-buffer-state 'lisp-indent-function 1) 288 (put 'save-buffer-state 'lisp-indent-function 1)
289 ;; 289 ;;
290 ;; We use this for clarity and speed. Naughty but nice. 290 ;; We use this for clarity and speed. Naughty but nice.
291 (defmacro do-while (test &rest body) 291 (defmacro do-while (test &rest body)
292 "(do-while TEST BODY...): eval BODY... and repeat if TEST yields non-nil. 292 "(do-while TEST BODY...): eval BODY... and repeat if TEST yields non-nil.
293The order of execution is thus BODY, TEST, BODY, TEST and so on 293The order of execution is thus BODY, TEST, BODY, TEST and so on
294until TEST returns nil." 294until TEST returns nil."
295 (` (while (progn (,@ body) (, test))))) 295 `(while (progn ,@body ,test)))
296 (put 'do-while 'lisp-indent-function (get 'while 'lisp-indent-function))) 296 (put 'do-while 'lisp-indent-function (get 'while 'lisp-indent-function)))
297 297
298(defvar lazy-lock-mode nil) ; Whether we are turned on. 298(defvar lazy-lock-mode nil) ; Whether we are turned on.
299(defvar lazy-lock-buffers nil) ; For deferral. 299(defvar lazy-lock-buffers nil) ; For deferral.
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index a5679073064..8a69ae7802d 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -291,16 +291,16 @@
291;; If you write software that must work without the new custom, you 291;; If you write software that must work without the new custom, you
292;; can use this hack stolen from w3-cus.el: 292;; can use this hack stolen from w3-cus.el:
293(eval-and-compile 293(eval-and-compile
294 (condition-case () 294 (condition-case ()
295 (require 'custom) 295 (require 'custom)
296 (error nil)) 296 (error nil))
297 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) 297 (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
298 nil ;; We've got what we needed 298 nil ;; We've got what we needed
299 ;; We have the old custom-library, hack around it! 299 ;; We have the old custom-library, hack around it!
300 (defmacro defgroup (&rest args) 300 (defmacro defgroup (&rest args)
301 nil) 301 nil)
302 (defmacro defcustom (var value doc &rest args) 302 (defmacro defcustom (var value doc &rest args)
303 (` (defvar (, var) (, value) (, doc)))))) 303 `(defvar ,var ,value ,doc))))
304 304
305(eval-when-compile (require 'smtpmail)) 305(eval-when-compile (require 'smtpmail))
306(autoload 'mail-do-fcc "sendmail") 306(autoload 'mail-do-fcc "sendmail")
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index e732fad03da..34b912e3334 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -50,9 +50,9 @@
50;; 50;;
51;; * Pressing mouse-2 while selecting or extending copies selection 51;; * Pressing mouse-2 while selecting or extending copies selection
52;; to the kill ring. Pressing mouse-1 or mouse-3 kills it. 52;; to the kill ring. Pressing mouse-1 or mouse-3 kills it.
53;; 53;;
54;; * Double-clicking mouse-3 also kills selection. 54;; * Double-clicking mouse-3 also kills selection.
55;; 55;;
56;; * M-mouse-1, M-mouse-2 & M-mouse-3 work similarly to mouse-1, mouse-2 56;; * M-mouse-1, M-mouse-2 & M-mouse-3 work similarly to mouse-1, mouse-2
57;; & mouse-3, but operate on the X secondary selection rather than the 57;; & mouse-3, but operate on the X secondary selection rather than the
58;; primary selection and region. 58;; primary selection and region.
@@ -71,7 +71,7 @@
71;; 71;;
72;; ;; But only in the selected window 72;; ;; But only in the selected window
73;; (setq highlight-nonselected-windows nil) 73;; (setq highlight-nonselected-windows nil)
74;; 74;;
75;; ;; Enable pending-delete 75;; ;; Enable pending-delete
76;; (delete-selection-mode 1) 76;; (delete-selection-mode 1)
77;; 77;;
@@ -79,7 +79,7 @@
79;; of mouse-sel-default-bindings before loading mouse-sel. 79;; of mouse-sel-default-bindings before loading mouse-sel.
80;; 80;;
81;; (a) If mouse-sel-default-bindings = t (the default) 81;; (a) If mouse-sel-default-bindings = t (the default)
82;; 82;;
83;; Mouse sets and insert selection 83;; Mouse sets and insert selection
84;; mouse-1 mouse-select 84;; mouse-1 mouse-select
85;; mouse-2 mouse-insert-selection 85;; mouse-2 mouse-insert-selection
@@ -90,19 +90,19 @@
90;; interprogram-paste-function = nil 90;; interprogram-paste-function = nil
91;; 91;;
92;; (b) If mouse-sel-default-bindings = 'interprogram-cut-paste 92;; (b) If mouse-sel-default-bindings = 'interprogram-cut-paste
93;; 93;;
94;; Mouse sets selection, and pastes from kill-ring 94;; Mouse sets selection, and pastes from kill-ring
95;; mouse-1 mouse-select 95;; mouse-1 mouse-select
96;; mouse-2 mouse-yank-at-click 96;; mouse-2 mouse-yank-at-click
97;; mouse-3 mouse-extend 97;; mouse-3 mouse-extend
98;; 98;;
99;; Selection/kill-ring interaction is retained 99;; Selection/kill-ring interaction is retained
100;; interprogram-cut-function = x-select-text 100;; interprogram-cut-function = x-select-text
101;; interprogram-paste-function = x-cut-buffer-or-selection-value 101;; interprogram-paste-function = x-cut-buffer-or-selection-value
102;; 102;;
103;; What you lose is the ability to select some text in 103;; What you lose is the ability to select some text in
104;; delete-selection-mode and yank over the top of it. 104;; delete-selection-mode and yank over the top of it.
105;; 105;;
106;; (c) If mouse-sel-default-bindings = nil, no bindings are made. 106;; (c) If mouse-sel-default-bindings = nil, no bindings are made.
107;; 107;;
108;; * By default, mouse-insert-selection (mouse-2) inserts the selection at 108;; * By default, mouse-insert-selection (mouse-2) inserts the selection at
@@ -286,11 +286,11 @@ primary selection and region."
286 286
287;;=== Internal Variables/Constants ======================================== 287;;=== Internal Variables/Constants ========================================
288 288
289(defvar mouse-sel-primary-thing nil 289(defvar mouse-sel-primary-thing nil
290 "Type of PRIMARY selection in current buffer.") 290 "Type of PRIMARY selection in current buffer.")
291(make-variable-buffer-local 'mouse-sel-primary-thing) 291(make-variable-buffer-local 'mouse-sel-primary-thing)
292 292
293(defvar mouse-sel-secondary-thing nil 293(defvar mouse-sel-secondary-thing nil
294 "Type of SECONDARY selection in current buffer.") 294 "Type of SECONDARY selection in current buffer.")
295(make-variable-buffer-local 'mouse-sel-secondary-thing) 295(make-variable-buffer-local 'mouse-sel-secondary-thing)
296 296
@@ -311,7 +311,7 @@ where SELECTION-NAME = name of selection
311 OVERLAY-SYMBOL = name of variable containing overlay to use 311 OVERLAY-SYMBOL = name of variable containing overlay to use
312 SELECTION-THING-SYMBOL = name of variable where the current selection 312 SELECTION-THING-SYMBOL = name of variable where the current selection
313 type for this selection should be stored.") 313 type for this selection should be stored.")
314 314
315(defvar mouse-sel-set-selection-function 315(defvar mouse-sel-set-selection-function
316 (if (eq mouse-sel-default-bindings 'interprogram-cut-paste) 316 (if (eq mouse-sel-default-bindings 'interprogram-cut-paste)
317 'x-set-selection 317 'x-set-selection
@@ -356,7 +356,7 @@ Feel free to re-define this function to support your own desired
356multi-click semantics." 356multi-click semantics."
357 (let* ((next-char (char-after (point))) 357 (let* ((next-char (char-after (point)))
358 (char-syntax (if next-char (char-syntax next-char)))) 358 (char-syntax (if next-char (char-syntax next-char))))
359 (if mouse-sel-cycle-clicks 359 (if mouse-sel-cycle-clicks
360 (setq nclicks (1+ (% (1- nclicks) 4)))) 360 (setq nclicks (1+ (% (1- nclicks) 4))))
361 (cond 361 (cond
362 ((= nclicks 1) nil) 362 ((= nclicks 1) nil)
@@ -393,17 +393,17 @@ multi-click semantics."
393 393
394(defun mouse-sel-region-to-primary (orig-window) 394(defun mouse-sel-region-to-primary (orig-window)
395 "Convert region to PRIMARY overlay and deactivate region. 395 "Convert region to PRIMARY overlay and deactivate region.
396Argument ORIG-WINDOW specifies the window the cursor was in when the 396Argument ORIG-WINDOW specifies the window the cursor was in when the
397originating command was issued, and is used to determine whether the 397originating command was issued, and is used to determine whether the
398region was visible or not." 398region was visible or not."
399 (if transient-mark-mode 399 (if transient-mark-mode
400 (let ((overlay (mouse-sel-selection-overlay 'PRIMARY))) 400 (let ((overlay (mouse-sel-selection-overlay 'PRIMARY)))
401 (cond 401 (cond
402 ((and mark-active 402 ((and mark-active
403 (or highlight-nonselected-windows 403 (or highlight-nonselected-windows
404 (eq orig-window (selected-window)))) 404 (eq orig-window (selected-window))))
405 ;; Region was visible, so convert region to overlay 405 ;; Region was visible, so convert region to overlay
406 (move-overlay overlay (region-beginning) (region-end) 406 (move-overlay overlay (region-beginning) (region-end)
407 (current-buffer))) 407 (current-buffer)))
408 ((eq orig-window (selected-window)) 408 ((eq orig-window (selected-window))
409 ;; Point was visible, so set overlay at point 409 ;; Point was visible, so set overlay at point
@@ -437,24 +437,22 @@ dragged right-to-left."
437 "Evaluate forms at mouse position. 437 "Evaluate forms at mouse position.
438Move to the end position of EVENT, execute FORMS, and restore original 438Move to the end position of EVENT, execute FORMS, and restore original
439point and window." 439point and window."
440 (` 440 `(let ((posn (event-end ,event)))
441 (let ((posn (event-end (, event)))) 441 (if posn (mouse-minibuffer-check ,event))
442 (if posn (mouse-minibuffer-check (, event))) 442 (if (and posn (not (windowp (posn-window posn))))
443 (if (and posn (not (windowp (posn-window posn)))) 443 (error "Cursor not in text area of window"))
444 (error "Cursor not in text area of window")) 444 (let (orig-window orig-point-marker)
445 (let (orig-window orig-point-marker) 445 (setq orig-window (selected-window))
446 (setq orig-window (selected-window)) 446 (if posn (select-window (posn-window posn)))
447 (if posn (select-window (posn-window posn))) 447 (setq orig-point-marker (point-marker))
448 (setq orig-point-marker (point-marker)) 448 (if (and posn (numberp (posn-point posn)))
449 (if (and posn (numberp (posn-point posn))) 449 (goto-char (posn-point posn)))
450 (goto-char (posn-point posn))) 450 (unwind-protect
451 (unwind-protect 451 (progn
452 (progn 452 ,@forms)
453 (,@ forms)) 453 (goto-char (marker-position orig-point-marker))
454 (goto-char (marker-position orig-point-marker)) 454 (move-marker orig-point-marker nil)
455 (move-marker orig-point-marker nil) 455 (select-window orig-window)))))
456 (select-window orig-window)
457 )))))
458 456
459(put 'mouse-sel-eval-at-event-end 'lisp-indent-hook 1) 457(put 'mouse-sel-eval-at-event-end 'lisp-indent-hook 1)
460 458
@@ -466,7 +464,7 @@ point and window."
466Click sets point & mark to click position. 464Click sets point & mark to click position.
467Dragging extends region/selection. 465Dragging extends region/selection.
468 466
469Multi-clicking selects word/lines/paragraphs, as determined by 467Multi-clicking selects word/lines/paragraphs, as determined by
470'mouse-sel-determine-selection-thing. 468'mouse-sel-determine-selection-thing.
471 469
472Clicking mouse-2 while selecting copies selected text to the kill-ring. 470Clicking mouse-2 while selecting copies selected text to the kill-ring.
@@ -485,7 +483,7 @@ This should be bound to a down-mouse event."
485Click sets the start of the secondary selection to click position. 483Click sets the start of the secondary selection to click position.
486Dragging extends the secondary selection. 484Dragging extends the secondary selection.
487 485
488Multi-clicking selects word/lines/paragraphs, as determined by 486Multi-clicking selects word/lines/paragraphs, as determined by
489'mouse-sel-determine-selection-thing. 487'mouse-sel-determine-selection-thing.
490 488
491Clicking mouse-2 while selecting copies selected text to the kill-ring. 489Clicking mouse-2 while selecting copies selected text to the kill-ring.
@@ -535,12 +533,12 @@ This should be bound to a down-mouse event."
535(defun mouse-extend-internal (selection &optional initial-event) 533(defun mouse-extend-internal (selection &optional initial-event)
536 "Extend specified SELECTION using the mouse. 534 "Extend specified SELECTION using the mouse.
537Track mouse-motion events, adjusting the SELECTION appropriately. 535Track mouse-motion events, adjusting the SELECTION appropriately.
538Optional argument INITIAL-EVENT specifies an initial down-mouse event to 536Optional argument INITIAL-EVENT specifies an initial down-mouse event to
539process. 537process.
540 538
541See documentation for mouse-select-internal for more details." 539See documentation for mouse-select-internal for more details."
542 (mouse-sel-eval-at-event-end initial-event 540 (mouse-sel-eval-at-event-end initial-event
543 (let ((orig-cursor-type 541 (let ((orig-cursor-type
544 (cdr (assoc 'cursor-type (frame-parameters (selected-frame)))))) 542 (cdr (assoc 'cursor-type (frame-parameters (selected-frame))))))
545 (unwind-protect 543 (unwind-protect
546 544
@@ -563,16 +561,16 @@ See documentation for mouse-select-internal for more details."
563 (setq min (point) 561 (setq min (point)
564 max min) 562 max min)
565 (set thing-symbol nil)) 563 (set thing-symbol nil))
566 564
567 565
568 ;; Bar cursor 566 ;; Bar cursor
569 (if (fboundp 'modify-frame-parameters) 567 (if (fboundp 'modify-frame-parameters)
570 (modify-frame-parameters (selected-frame) 568 (modify-frame-parameters (selected-frame)
571 '((cursor-type . bar)))) 569 '((cursor-type . bar))))
572 570
573 ;; Handle dragging 571 ;; Handle dragging
574 (track-mouse 572 (track-mouse
575 573
576 (while (if initial-event ; Use initial event 574 (while (if initial-event ; Use initial event
577 (prog1 575 (prog1
578 (setq event initial-event) 576 (setq event initial-event)
@@ -580,12 +578,12 @@ See documentation for mouse-select-internal for more details."
580 (setq event (read-event)) 578 (setq event (read-event))
581 (and (consp event) 579 (and (consp event)
582 (memq (car event) '(mouse-movement switch-frame)))) 580 (memq (car event) '(mouse-movement switch-frame))))
583 581
584 (let ((selection-thing (symbol-value thing-symbol)) 582 (let ((selection-thing (symbol-value thing-symbol))
585 (end (event-end event))) 583 (end (event-end event)))
586 584
587 (cond 585 (cond
588 586
589 ;; Ignore any movement outside the frame 587 ;; Ignore any movement outside the frame
590 ((eq (car-safe event) 'switch-frame) nil) 588 ((eq (car-safe event) 'switch-frame) nil)
591 ((and (posn-window end) 589 ((and (posn-window end)
@@ -594,7 +592,7 @@ See documentation for mouse-select-internal for more details."
594 (window-frame posn-w) 592 (window-frame posn-w)
595 posn-w)) 593 posn-w))
596 (window-frame orig-window)))) nil) 594 (window-frame orig-window)))) nil)
597 595
598 ;; Different window, same frame 596 ;; Different window, same frame
599 ((not (eq (posn-window end) orig-window)) 597 ((not (eq (posn-window end) orig-window))
600 (let ((end-row (cdr (cdr (mouse-position))))) 598 (let ((end-row (cdr (cdr (mouse-position)))))
@@ -606,16 +604,16 @@ See documentation for mouse-select-internal for more details."
606 (mouse-scroll-subr orig-window (1+ (- end-row bottom)) 604 (mouse-scroll-subr orig-window (1+ (- end-row bottom))
607 overlay min)) 605 overlay min))
608 ))) 606 )))
609 607
610 ;; On the mode line 608 ;; On the mode line
611 ((eq (posn-point end) 'mode-line) 609 ((eq (posn-point end) 'mode-line)
612 (mouse-scroll-subr orig-window 1 overlay min)) 610 (mouse-scroll-subr orig-window 1 overlay min))
613 611
614 ;; In original window 612 ;; In original window
615 (t (goto-char (posn-point end))) 613 (t (goto-char (posn-point end)))
616 614
617 ) 615 )
618 616
619 ;; Determine direction of drag 617 ;; Determine direction of drag
620 (cond 618 (cond
621 ((and (not direction) (not (eq min max))) 619 ((and (not direction) (not (eq min max)))
@@ -624,12 +622,12 @@ See documentation for mouse-select-internal for more details."
624 (setq direction -1)) 622 (setq direction -1))
625 ((and (not (eq direction 1)) (>= (point) max)) 623 ((and (not (eq direction 1)) (>= (point) max))
626 (setq direction 1))) 624 (setq direction 1)))
627 625
628 (if (not selection-thing) nil 626 (if (not selection-thing) nil
629 627
630 ;; If dragging forward, goal is next character 628 ;; If dragging forward, goal is next character
631 (if (and (eq direction 1) (not (eobp))) (forward-char 1)) 629 (if (and (eq direction 1) (not (eobp))) (forward-char 1))
632 630
633 ;; Move to start/end of selected thing 631 ;; Move to start/end of selected thing
634 (let ((goal (point))) 632 (let ((goal (point)))
635 (goto-char (if (eq 1 direction) min max)) 633 (goto-char (if (eq 1 direction) min max))
@@ -643,25 +641,25 @@ See documentation for mouse-select-internal for more details."
643 (if (> (* direction (- goal (point))) 0) 641 (if (> (* direction (- goal (point))) 0)
644 end (point))))) 642 end (point)))))
645 (error)))) 643 (error))))
646 644
647 ;; Move overlay 645 ;; Move overlay
648 (move-overlay overlay 646 (move-overlay overlay
649 (if (eq 1 direction) min (point)) 647 (if (eq 1 direction) min (point))
650 (if (eq -1 direction) max (point)) 648 (if (eq -1 direction) max (point))
651 (current-buffer)) 649 (current-buffer))
652 650
653 ))) ; end track-mouse 651 ))) ; end track-mouse
654 652
655 ;; Finish up after dragging 653 ;; Finish up after dragging
656 (let ((overlay-start (overlay-start overlay)) 654 (let ((overlay-start (overlay-start overlay))
657 (overlay-end (overlay-end overlay))) 655 (overlay-end (overlay-end overlay)))
658 656
659 ;; Set selection 657 ;; Set selection
660 (if (not (eq overlay-start overlay-end)) 658 (if (not (eq overlay-start overlay-end))
661 (mouse-sel-set-selection 659 (mouse-sel-set-selection
662 selection 660 selection
663 (buffer-substring overlay-start overlay-end))) 661 (buffer-substring overlay-start overlay-end)))
664 662
665 ;; Handle copy/kill 663 ;; Handle copy/kill
666 (let (this-command) 664 (let (this-command)
667 (cond 665 (cond
@@ -683,9 +681,9 @@ See documentation for mouse-select-internal for more details."
683 681
684 ;; Restore cursor 682 ;; Restore cursor
685 (if (fboundp 'modify-frame-parameters) 683 (if (fboundp 'modify-frame-parameters)
686 (modify-frame-parameters 684 (modify-frame-parameters
687 (selected-frame) (list (cons 'cursor-type orig-cursor-type)))) 685 (selected-frame) (list (cons 'cursor-type orig-cursor-type))))
688 686
689 )))) 687 ))))
690 688
691;;=== Paste =============================================================== 689;;=== Paste ===============================================================
@@ -705,7 +703,7 @@ If `mouse-yank-at-point' is non-nil, insert at point instead."
705(defun mouse-insert-selection-internal (selection event) 703(defun mouse-insert-selection-internal (selection event)
706 "Insert the contents of the named SELECTION at mouse click. 704 "Insert the contents of the named SELECTION at mouse click.
707If `mouse-yank-at-point' is non-nil, insert at point instead." 705If `mouse-yank-at-point' is non-nil, insert at point instead."
708 (unless mouse-yank-at-point 706 (unless mouse-yank-at-point
709 (mouse-set-point event)) 707 (mouse-set-point event))
710 (when mouse-sel-get-selection-function 708 (when mouse-sel-get-selection-function
711 (push-mark (point) 'nomsg) 709 (push-mark (point) 'nomsg)
diff --git a/lisp/obsolete/c-mode.el b/lisp/obsolete/c-mode.el
index 2be4ea9ed18..a76d963283a 100644
--- a/lisp/obsolete/c-mode.el
+++ b/lisp/obsolete/c-mode.el
@@ -207,99 +207,97 @@ regardless of where in the line point is when the TAB command is used."
207 207
208;; This is actually the expression for C++ mode, but it's used for C too. 208;; This is actually the expression for C++ mode, but it's used for C too.
209(defvar c-imenu-generic-expression 209(defvar c-imenu-generic-expression
210 (` 210 `((nil
211 ((nil 211 ,(concat
212 (, 212 "^" ; beginning of line is required
213 (concat
214 "^" ; beginning of line is required
215 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 213 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
216 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 214 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
217 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 215 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
218 216
219 "\\(" ; last type spec including */& 217 "\\(" ; last type spec including */&
220 "[a-zA-Z0-9_:]+" 218 "[a-zA-Z0-9_:]+"
221 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 219 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
222 "\\)?" ; if there is a last type spec 220 "\\)?" ; if there is a last type spec
223 "\\(" ; name; take that into the imenu entry 221 "\\(" ; name; take that into the imenu entry
224 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 222 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
225 ; (may not contain * because then 223 ; (may not contain * because then
226 ; "a::operator char*" would become "char*"!) 224 ; "a::operator char*" would become "char*"!)
227 "\\|" 225 "\\|"
228 "\\([a-zA-Z0-9_:~]*::\\)?operator" 226 "\\([a-zA-Z0-9_:~]*::\\)?operator"
229 "[^a-zA-Z1-9_][^(]*" ; ...or operator 227 "[^a-zA-Z1-9_][^(]*" ; ...or operator
230 " \\)" 228 " \\)"
231 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after 229 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after
232 ; the (...) to avoid prototypes. Can't 230 ; the (...) to avoid prototypes. Can't
233 ; catch cases with () inside the parentheses 231 ; catch cases with () inside the parentheses
234 ; surrounding the parameters 232 ; surrounding the parameters
235 ; (like "int foo(int a=bar()) {...}" 233 ; (like "int foo(int a=bar()) {...}"
236 234
237 )) 6) 235 ) 6)
238 ("Class" 236 ("Class"
239 (, (concat 237 ,(concat
240 "^" ; beginning of line is required 238 "^" ; beginning of line is required
241 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 239 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
242 "class[ \t]+" 240 "class[ \t]+"
243 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 241 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
244 "[ \t]*[:{]" 242 "[ \t]*[:{]"
245 )) 2) 243 ) 2)
246;; Example of generic expression for finding prototypes, structs, unions, enums. 244 ;; Example of generic expression for finding prototypes, structs, unions, enums.
247;; Uncomment if you want to find these too. It will be a bit slower gathering 245 ;; Uncomment if you want to find these too. It will be a bit slower gathering
248;; the indexes. 246 ;; the indexes.
249; ("Prototypes" 247 ; ("Prototypes"
250; (, 248 ; (,
251; (concat 249 ; (concat
252; "^" ; beginning of line is required 250 ; "^" ; beginning of line is required
253; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 251 ; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
254; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 252 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
255; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 253 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
256 254
257; "\\(" ; last type spec including */& 255 ; "\\(" ; last type spec including */&
258; "[a-zA-Z0-9_:]+" 256 ; "[a-zA-Z0-9_:]+"
259; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 257 ; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
260; "\\)?" ; if there is a last type spec 258 ; "\\)?" ; if there is a last type spec
261; "\\(" ; name; take that into the imenu entry 259 ; "\\(" ; name; take that into the imenu entry
262; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 260 ; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
263; ; (may not contain * because then 261 ; ; (may not contain * because then
264; ; "a::operator char*" would become "char*"!) 262 ; ; "a::operator char*" would become "char*"!)
265; "\\|" 263 ; "\\|"
266; "\\([a-zA-Z0-9_:~]*::\\)?operator" 264 ; "\\([a-zA-Z0-9_:~]*::\\)?operator"
267; "[^a-zA-Z1-9_][^(]*" ; ...or operator 265 ; "[^a-zA-Z1-9_][^(]*" ; ...or operator
268; " \\)" 266 ; " \\)"
269; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after 267 ; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after
270; ; the (...) Can't 268 ; ; the (...) Can't
271; ; catch cases with () inside the parentheses 269 ; ; catch cases with () inside the parentheses
272; ; surrounding the parameters 270 ; ; surrounding the parameters
273; ; (like "int foo(int a=bar());" 271 ; ; (like "int foo(int a=bar());"
274; )) 6) 272 ; )) 6)
275; ("Struct" 273 ; ("Struct"
276; (, (concat 274 ; (, (concat
277; "^" ; beginning of line is required 275 ; "^" ; beginning of line is required
278; "\\(static[ \t]+\\)?" ; there may be static or const. 276 ; "\\(static[ \t]+\\)?" ; there may be static or const.
279; "\\(const[ \t]+\\)?" 277 ; "\\(const[ \t]+\\)?"
280; "struct[ \t]+" 278 ; "struct[ \t]+"
281; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 279 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
282; "[ \t]*[{]" 280 ; "[ \t]*[{]"
283; )) 3) 281 ; )) 3)
284; ("Enum" 282 ; ("Enum"
285; (, (concat 283 ; (, (concat
286; "^" ; beginning of line is required 284 ; "^" ; beginning of line is required
287; "\\(static[ \t]+\\)?" ; there may be static or const. 285 ; "\\(static[ \t]+\\)?" ; there may be static or const.
288; "\\(const[ \t]+\\)?" 286 ; "\\(const[ \t]+\\)?"
289; "enum[ \t]+" 287 ; "enum[ \t]+"
290; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 288 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
291; "[ \t]*[{]" 289 ; "[ \t]*[{]"
292; )) 3) 290 ; )) 3)
293; ("Union" 291 ; ("Union"
294; (, (concat 292 ; (, (concat
295; "^" ; beginning of line is required 293 ; "^" ; beginning of line is required
296; "\\(static[ \t]+\\)?" ; there may be static or const. 294 ; "\\(static[ \t]+\\)?" ; there may be static or const.
297; "\\(const[ \t]+\\)?" 295 ; "\\(const[ \t]+\\)?"
298; "union[ \t]+" 296 ; "union[ \t]+"
299; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 297 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
300; "[ \t]*[{]" 298 ; "[ \t]*[{]"
301; )) 3) 299 ; )) 3)
302 )) 300 )
303 "Imenu generic expression for C mode. See `imenu-generic-expression'.") 301 "Imenu generic expression for C mode. See `imenu-generic-expression'.")
304 302
305(defun c-mode () 303(defun c-mode ()
@@ -1439,7 +1437,7 @@ If within a string or comment, move by sentences instead of statements."
1439 (parse-partial-sexp beg (point) 1437 (parse-partial-sexp beg (point)
1440 nil nil state))) 1438 nil nil state)))
1441 (and (not (nth 3 new-state)) (not (nth 5 new-state)))) 1439 (and (not (nth 3 new-state)) (not (nth 5 new-state))))
1442 (indent-for-comment))))))))))) 1440 (indent-for-comment)))))))))))))
1443 1441
1444;; Look at all comment-start strings in the current line after point. 1442;; Look at all comment-start strings in the current line after point.
1445;; Return t if one of them starts a real comment. 1443;; Return t if one of them starts a real comment.
diff --git a/lisp/obsolete/cplus-md.el b/lisp/obsolete/cplus-md.el
index 1b0c0e0b946..8df342ba4d2 100644
--- a/lisp/obsolete/cplus-md.el
+++ b/lisp/obsolete/cplus-md.el
@@ -174,99 +174,97 @@ list. Nil indicates to just after the paren."
174 :group 'old-c++) 174 :group 'old-c++)
175 175
176(defvar c++-imenu-generic-expression 176(defvar c++-imenu-generic-expression
177 (` 177 `((nil
178 ((nil 178 ,(concat
179 (, 179 "^" ; beginning of line is required
180 (concat
181 "^" ; beginning of line is required
182 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 180 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
183 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 181 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
184 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 182 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
185 183
186 "\\(" ; last type spec including */& 184 "\\(" ; last type spec including */&
187 "[a-zA-Z0-9_:]+" 185 "[a-zA-Z0-9_:]+"
188 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 186 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
189 "\\)?" ; if there is a last type spec 187 "\\)?" ; if there is a last type spec
190 "\\(" ; name; take that into the imenu entry 188 "\\(" ; name; take that into the imenu entry
191 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 189 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
192 ; (may not contain * because then 190 ; (may not contain * because then
193 ; "a::operator char*" would become "char*"!) 191 ; "a::operator char*" would become "char*"!)
194 "\\|" 192 "\\|"
195 "\\([a-zA-Z0-9_:~]*::\\)?operator" 193 "\\([a-zA-Z0-9_:~]*::\\)?operator"
196 "[^a-zA-Z1-9_][^(]*" ; ...or operator 194 "[^a-zA-Z1-9_][^(]*" ; ...or operator
197 " \\)" 195 " \\)"
198 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after 196 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after
199 ; the (...) to avoid prototypes. Can't 197 ; the (...) to avoid prototypes. Can't
200 ; catch cases with () inside the parentheses 198 ; catch cases with () inside the parentheses
201 ; surrounding the parameters 199 ; surrounding the parameters
202 ; (like "int foo(int a=bar()) {...}" 200 ; (like "int foo(int a=bar()) {...}"
203 201
204 )) 6) 202 ) 6)
205 ("Class" 203 ("Class"
206 (, (concat 204 ,(concat
207 "^" ; beginning of line is required 205 "^" ; beginning of line is required
208 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 206 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
209 "class[ \t]+" 207 "class[ \t]+"
210 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 208 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
211 "[ \t]*[:{]" 209 "[ \t]*[:{]"
212 )) 2) 210 ) 2)
213;; Example of generic expression for finding prototypes, structs, unions, enums. 211 ;; Example of generic expression for finding prototypes, structs, unions, enums.
214;; Uncomment if you want to find these too. It will be a bit slower gathering 212 ;; Uncomment if you want to find these too. It will be a bit slower gathering
215;; the indexes. 213 ;; the indexes.
216; ("Prototypes" 214 ; ("Prototypes"
217; (, 215 ; (,
218; (concat 216 ; (concat
219; "^" ; beginning of line is required 217 ; "^" ; beginning of line is required
220; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 218 ; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
221; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 219 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
222; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 220 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
223 221
224; "\\(" ; last type spec including */& 222 ; "\\(" ; last type spec including */&
225; "[a-zA-Z0-9_:]+" 223 ; "[a-zA-Z0-9_:]+"
226; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 224 ; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
227; "\\)?" ; if there is a last type spec 225 ; "\\)?" ; if there is a last type spec
228; "\\(" ; name; take that into the imenu entry 226 ; "\\(" ; name; take that into the imenu entry
229; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 227 ; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
230; ; (may not contain * because then 228 ; ; (may not contain * because then
231; ; "a::operator char*" would become "char*"!) 229 ; ; "a::operator char*" would become "char*"!)
232; "\\|" 230 ; "\\|"
233; "\\([a-zA-Z0-9_:~]*::\\)?operator" 231 ; "\\([a-zA-Z0-9_:~]*::\\)?operator"
234; "[^a-zA-Z1-9_][^(]*" ; ...or operator 232 ; "[^a-zA-Z1-9_][^(]*" ; ...or operator
235; " \\)" 233 ; " \\)"
236; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after 234 ; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after
237; ; the (...) Can't 235 ; ; the (...) Can't
238; ; catch cases with () inside the parentheses 236 ; ; catch cases with () inside the parentheses
239; ; surrounding the parameters 237 ; ; surrounding the parameters
240; ; (like "int foo(int a=bar());" 238 ; ; (like "int foo(int a=bar());"
241; )) 6) 239 ; )) 6)
242; ("Struct" 240 ; ("Struct"
243; (, (concat 241 ; (, (concat
244; "^" ; beginning of line is required 242 ; "^" ; beginning of line is required
245; "\\(static[ \t]+\\)?" ; there may be static or const. 243 ; "\\(static[ \t]+\\)?" ; there may be static or const.
246; "\\(const[ \t]+\\)?" 244 ; "\\(const[ \t]+\\)?"
247; "struct[ \t]+" 245 ; "struct[ \t]+"
248; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 246 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
249; "[ \t]*[{]" 247 ; "[ \t]*[{]"
250; )) 3) 248 ; )) 3)
251; ("Enum" 249 ; ("Enum"
252; (, (concat 250 ; (, (concat
253; "^" ; beginning of line is required 251 ; "^" ; beginning of line is required
254; "\\(static[ \t]+\\)?" ; there may be static or const. 252 ; "\\(static[ \t]+\\)?" ; there may be static or const.
255; "\\(const[ \t]+\\)?" 253 ; "\\(const[ \t]+\\)?"
256; "enum[ \t]+" 254 ; "enum[ \t]+"
257; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 255 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
258; "[ \t]*[{]" 256 ; "[ \t]*[{]"
259; )) 3) 257 ; )) 3)
260; ("Union" 258 ; ("Union"
261; (, (concat 259 ; (, (concat
262; "^" ; beginning of line is required 260 ; "^" ; beginning of line is required
263; "\\(static[ \t]+\\)?" ; there may be static or const. 261 ; "\\(static[ \t]+\\)?" ; there may be static or const.
264; "\\(const[ \t]+\\)?" 262 ; "\\(const[ \t]+\\)?"
265; "union[ \t]+" 263 ; "union[ \t]+"
266; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 264 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
267; "[ \t]*[{]" 265 ; "[ \t]*[{]"
268; )) 3) 266 ; )) 3)
269 )) 267 )
270 "Imenu generic expression for C++ mode. See `imenu-generic-expression'.") 268 "Imenu generic expression for C++ mode. See `imenu-generic-expression'.")
271 269
272(defun c++-mode () 270(defun c++-mode ()
@@ -721,7 +719,7 @@ Returns nil if line starts inside a string, t if in a comment."
721 (if (eq (preceding-char) ?\)) 719 (if (eq (preceding-char) ?\))
722 (forward-sexp -1)) 720 (forward-sexp -1))
723 ;; Get initial indentation of the line we are on. 721 ;; Get initial indentation of the line we are on.
724 (current-indentation)))))))))) 722 (current-indentation)))))))))))
725 723
726(defun c++-backward-to-noncomment (lim) 724(defun c++-backward-to-noncomment (lim)
727 (let (opoint stop) 725 (let (opoint stop)
@@ -880,7 +878,7 @@ Returns nil if line starts inside a string, t if in a comment."
880 (point)) t) 878 (point)) t)
881 (progn 879 (progn
882 (indent-for-comment) 880 (indent-for-comment)
883 (beginning-of-line)))))))))) 881 (beginning-of-line)))))))))))
884 882
885(defun fill-c++-comment () 883(defun fill-c++-comment ()
886 "Fill a comment contained in consecutive lines containing point. 884 "Fill a comment contained in consecutive lines containing point.
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index 104495c81b5..a79da3c8308 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -237,13 +237,12 @@ never indented."
237 :group 'dcl) 237 :group 'dcl)
238 238
239(defcustom dcl-imenu-generic-expression 239(defcustom dcl-imenu-generic-expression
240 (` 240 `((nil "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):[ \t]+SUBROUTINE\\b" 1)
241 ((nil "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):[ \t]+SUBROUTINE\\b" 1) 241 (,dcl-imenu-label-labels
242 ((, dcl-imenu-label-labels)
243 "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):\\([ \t]\\|$\\)" 1) 242 "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):\\([ \t]\\|$\\)" 1)
244 ((, dcl-imenu-label-goto) "\\s-GOTO[ \t]+\\([A-Za-z0-9_\$]+\\)" 1) 243 (,dcl-imenu-label-goto "\\s-GOTO[ \t]+\\([A-Za-z0-9_\$]+\\)" 1)
245 ((, dcl-imenu-label-gosub) "\\s-GOSUB[ \t]+\\([A-Za-z0-9_\$]+\\)" 1) 244 (,dcl-imenu-label-gosub "\\s-GOSUB[ \t]+\\([A-Za-z0-9_\$]+\\)" 1)
246 ((, dcl-imenu-label-call) "\\s-CALL[ \t]+\\([A-Za-z0-9_\$]+\\)" 1))) 245 (,dcl-imenu-label-call "\\s-CALL[ \t]+\\([A-Za-z0-9_\$]+\\)" 1))
247 "*Default imenu generic expression for DCL. 246 "*Default imenu generic expression for DCL.
248 247
249The default includes SUBROUTINE labels in the main listing and 248The default includes SUBROUTINE labels in the main listing and
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index ec1729becaa..1626bd911dc 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -4,7 +4,7 @@
4;; Author: Chris Chase <chase@att.com> 4;; Author: Chris Chase <chase@att.com>
5;; Maintainer: Carsten Dominik <dominik@strw.leidenuniv.nl> 5;; Maintainer: Carsten Dominik <dominik@strw.leidenuniv.nl>
6;; Version: 4.7 6;; Version: 4.7
7;; Date: $Date: 2000/12/19 11:13:34 $ 7;; Date: $Date: 2001/07/16 12:22:59 $
8;; Keywords: processes 8;; Keywords: processes
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -99,17 +99,17 @@
99 99
100(defvar idlwave-shell-have-new-custom nil) 100(defvar idlwave-shell-have-new-custom nil)
101(eval-and-compile 101(eval-and-compile
102 ;; Kludge to allow `defcustom' for Emacs 19. 102 ;; Kludge to allow `defcustom' for Emacs 19.
103 (condition-case () (require 'custom) (error nil)) 103 (condition-case () (require 'custom) (error nil))
104 (if (and (featurep 'custom) 104 (if (and (featurep 'custom)
105 (fboundp 'custom-declare-variable) 105 (fboundp 'custom-declare-variable)
106 (fboundp 'defface)) 106 (fboundp 'defface))
107 ;; We've got what we needed 107 ;; We've got what we needed
108 (setq idlwave-shell-have-new-custom t) 108 (setq idlwave-shell-have-new-custom t)
109 ;; We have the old or no custom-library, hack around it! 109 ;; We have the old or no custom-library, hack around it!
110 (defmacro defgroup (&rest args) nil) 110 (defmacro defgroup (&rest args) nil)
111 (defmacro defcustom (var value doc &rest args) 111 (defmacro defcustom (var value doc &rest args)
112 (` (defvar (, var) (, value) (, doc)))))) 112 `(defvar ,var ,value ,doc))))
113 113
114;;; Customizations: idlwave-shell group 114;;; Customizations: idlwave-shell group
115 115
@@ -2382,16 +2382,16 @@ command."
2382 (idlwave-shell-send-command 2382 (idlwave-shell-send-command
2383 idlwave-shell-bp-query 2383 idlwave-shell-bp-query
2384 '(progn 2384 '(progn
2385 (idlwave-shell-filter-bp) 2385 (idlwave-shell-filter-bp)
2386 (setq idlwave-shell-old-bp idlwave-shell-bp-alist)) 2386 (setq idlwave-shell-old-bp idlwave-shell-bp-alist))
2387 'hide) 2387 'hide)
2388 ;; Get sources for IDL compiled procedures followed by setting 2388 ;; Get sources for IDL compiled procedures followed by setting
2389 ;; breakpoint. 2389 ;; breakpoint.
2390 (idlwave-shell-send-command 2390 (idlwave-shell-send-command
2391 idlwave-shell-sources-query 2391 idlwave-shell-sources-query
2392 (` (progn 2392 `(progn
2393 (idlwave-shell-sources-filter) 2393 (idlwave-shell-sources-filter)
2394 (idlwave-shell-set-bp2 (quote (, bp))))) 2394 (idlwave-shell-set-bp2 (quote ,bp)))
2395 'hide)) 2395 'hide))
2396 2396
2397(defun idlwave-shell-set-bp2 (bp) 2397(defun idlwave-shell-set-bp2 (bp)
@@ -2403,11 +2403,11 @@ only after reaching the statement count times."
2403 (let* 2403 (let*
2404 ((arg (idlwave-shell-bp-get bp 'count)) 2404 ((arg (idlwave-shell-bp-get bp 'count))
2405 (key (cond 2405 (key (cond
2406 ((not (and arg (numberp arg))) "") 2406 ((not (and arg (numberp arg))) "")
2407 ((= arg 1) 2407 ((= arg 1)
2408 ",/once") 2408 ",/once")
2409 ((> arg 1) 2409 ((> arg 1)
2410 (format ",after=%d" arg)))) 2410 (format ",after=%d" arg))))
2411 (line (idlwave-shell-bp-get bp 'line))) 2411 (line (idlwave-shell-bp-get bp 'line)))
2412 (idlwave-shell-send-command 2412 (idlwave-shell-send-command
2413 (concat "breakpoint,'" 2413 (concat "breakpoint,'"
@@ -2415,10 +2415,9 @@ only after reaching the statement count times."
2415 (if (integerp line) (setq line (int-to-string line))) 2415 (if (integerp line) (setq line (int-to-string line)))
2416 key) 2416 key)
2417 ;; Check for failure and look for breakpoint in IDL's list 2417 ;; Check for failure and look for breakpoint in IDL's list
2418 (` (progn 2418 `(progn
2419 (if (idlwave-shell-set-bp-check (quote (, bp))) 2419 (if (idlwave-shell-set-bp-check (quote ,bp))
2420 (idlwave-shell-set-bp3 (quote (, bp))))) 2420 (idlwave-shell-set-bp3 (quote ,bp))))
2421 )
2422 ;; do not hide output 2421 ;; do not hide output
2423 nil 2422 nil
2424 'preempt))) 2423 'preempt)))
@@ -2426,9 +2425,9 @@ only after reaching the statement count times."
2426(defun idlwave-shell-set-bp3 (bp) 2425(defun idlwave-shell-set-bp3 (bp)
2427 "Find the breakpoint in IDL's internal list of breakpoints." 2426 "Find the breakpoint in IDL's internal list of breakpoints."
2428 (idlwave-shell-send-command idlwave-shell-bp-query 2427 (idlwave-shell-send-command idlwave-shell-bp-query
2429 (` (progn 2428 `(progn
2430 (idlwave-shell-filter-bp) 2429 (idlwave-shell-filter-bp)
2431 (idlwave-shell-new-bp (quote (, bp))))) 2430 (idlwave-shell-new-bp (quote ,bp)))
2432 'hide 2431 'hide
2433 'preempt)) 2432 'preempt))
2434 2433
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 03f78af3acf..b470e96f3d1 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -4,7 +4,7 @@
4;; Author: Chris Chase <chase@att.com> 4;; Author: Chris Chase <chase@att.com>
5;; Maintainer: Carsten Dominik <dominik@strw.leidenuniv.nl> 5;; Maintainer: Carsten Dominik <dominik@strw.leidenuniv.nl>
6;; Version: 4.7 6;; Version: 4.7
7;; Date: $Date: 2000/12/19 11:12:40 $ 7;; Date: $Date: 2001/07/16 12:22:59 $
8;; Keywords: languages 8;; Keywords: languages
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -140,14 +140,14 @@
140(eval-when-compile (require 'cl)) 140(eval-when-compile (require 'cl))
141 141
142(eval-and-compile 142(eval-and-compile
143 ;; Kludge to allow `defcustom' for Emacs 19. 143 ;; Kludge to allow `defcustom' for Emacs 19.
144 (condition-case () (require 'custom) (error nil)) 144 (condition-case () (require 'custom) (error nil))
145 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) 145 (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
146 nil ;; We've got what we needed 146 nil ;; We've got what we needed
147 ;; We have the old or no custom-library, hack around it! 147 ;; We have the old or no custom-library, hack around it!
148 (defmacro defgroup (&rest args) nil) 148 (defmacro defgroup (&rest args) nil)
149 (defmacro defcustom (var value doc &rest args) 149 (defmacro defcustom (var value doc &rest args)
150 (` (defvar (, var) (, value) (, doc)))))) 150 `(defvar ,var ,value ,doc))))
151 151
152(defgroup idlwave nil 152(defgroup idlwave nil
153 "Major mode for editing IDL/WAVE CL .pro files" 153 "Major mode for editing IDL/WAVE CL .pro files"
@@ -1360,8 +1360,8 @@ Normally a space.")
1360 1360
1361(defmacro idlwave-keyword-abbrev (&rest args) 1361(defmacro idlwave-keyword-abbrev (&rest args)
1362 "Creates a function for abbrev hooks to call `idlwave-check-abbrev' with args." 1362 "Creates a function for abbrev hooks to call `idlwave-check-abbrev' with args."
1363 (` (quote (lambda () 1363 `(quote (lambda ()
1364 (, (append '(idlwave-check-abbrev) args)))))) 1364 ,(append '(idlwave-check-abbrev) args))))
1365 1365
1366;; If I take the time I can replace idlwave-keyword-abbrev with 1366;; If I take the time I can replace idlwave-keyword-abbrev with
1367;; idlwave-code-abbrev and remove the quoted abbrev check from 1367;; idlwave-code-abbrev and remove the quoted abbrev check from
@@ -1373,11 +1373,11 @@ Normally a space.")
1373 "Creates a function for abbrev hooks that ensures abbrevs are not quoted. 1373 "Creates a function for abbrev hooks that ensures abbrevs are not quoted.
1374Specifically, if the abbrev is in a comment or string it is unexpanded. 1374Specifically, if the abbrev is in a comment or string it is unexpanded.
1375Otherwise ARGS forms a list that is evaluated." 1375Otherwise ARGS forms a list that is evaluated."
1376 (` (quote (lambda () 1376 `(quote (lambda ()
1377 (, (prin1-to-string args)) ;; Puts the code in the doc string 1377 ,(prin1-to-string args) ;; Puts the code in the doc string
1378 (if (idlwave-quoted) 1378 (if (idlwave-quoted)
1379 (progn (unexpand-abbrev) nil) 1379 (progn (unexpand-abbrev) nil)
1380 (, (append args))))))) 1380 ,(append args)))))
1381 1381
1382(defvar idlwave-mode-map (make-sparse-keymap) 1382(defvar idlwave-mode-map (make-sparse-keymap)
1383 "Keymap used in IDL mode.") 1383 "Keymap used in IDL mode.")
diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el
index 91c63fdb066..c77bba42d28 100644
--- a/lisp/term/sun-mouse.el
+++ b/lisp/term/sun-mouse.el
@@ -133,19 +133,19 @@ Just like the Common Lisp function of the same name."
133 133
134;;; All the useful code bits 134;;; All the useful code bits
135(defmacro sm::hit-code (hit) 135(defmacro sm::hit-code (hit)
136 (` (nth 0 (, hit)))) 136 `(nth 0 ,hit))
137;;; The button, or buttons if a chord. 137;;; The button, or buttons if a chord.
138(defmacro sm::hit-button (hit) 138(defmacro sm::hit-button (hit)
139 (` (logand sm::ButtonBits (nth 0 (, hit))))) 139 `(logand sm::ButtonBits (nth 0 ,hit)))
140;;; The shift, control, and meta flags. 140;;; The shift, control, and meta flags.
141(defmacro sm::hit-shiftmask (hit) 141(defmacro sm::hit-shiftmask (hit)
142 (` (logand sm::ShiftmaskBits (nth 0 (, hit))))) 142 `(logand sm::ShiftmaskBits (nth 0 ,hit)))
143;;; Set if a double click (but not a chord). 143;;; Set if a double click (but not a chord).
144(defmacro sm::hit-double (hit) 144(defmacro sm::hit-double (hit)
145 (` (logand sm::DoubleBits (nth 0 (, hit))))) 145 `(logand sm::DoubleBits (nth 0 ,hit)))
146;;; Set on button release (as opposed to button press). 146;;; Set on button release (as opposed to button press).
147(defmacro sm::hit-up (hit) 147(defmacro sm::hit-up (hit)
148 (` (logand sm::UpBits (nth 0 (, hit))))) 148 `(logand sm::UpBits (nth 0 ,hit)))
149;;; Screen x position. 149;;; Screen x position.
150(defmacro sm::hit-x (hit) (list 'nth 1 hit)) 150(defmacro sm::hit-x (hit) (list 'nth 1 hit))
151;;; Screen y position. 151;;; Screen y position.
@@ -153,8 +153,8 @@ Just like the Common Lisp function of the same name."
153;;; Milliseconds since last hit. 153;;; Milliseconds since last hit.
154(defmacro sm::hit-delta (hit) (list 'nth 3 hit)) 154(defmacro sm::hit-delta (hit) (list 'nth 3 hit))
155 155
156(defmacro sm::hit-up-p (hit) ; A predicate. 156(defmacro sm::hit-up-p (hit) ; A predicate.
157 (` (not (zerop (sm::hit-up (, hit)))))) 157 `(not (zerop (sm::hit-up ,hit))))
158 158
159;;; 159;;;
160;;; Loc accessors. for sm::window-xy 160;;; Loc accessors. for sm::window-xy
@@ -166,12 +166,12 @@ Just like the Common Lisp function of the same name."
166(defmacro eval-in-buffer (buffer &rest forms) 166(defmacro eval-in-buffer (buffer &rest forms)
167 "Macro to switches to BUFFER, evaluates FORMS, returns to original buffer." 167 "Macro to switches to BUFFER, evaluates FORMS, returns to original buffer."
168 ;; When you don't need the complete window context of eval-in-window 168 ;; When you don't need the complete window context of eval-in-window
169 (` (let ((StartBuffer (current-buffer))) 169 `(let ((StartBuffer (current-buffer)))
170 (unwind-protect 170 (unwind-protect
171 (progn 171 (progn
172 (set-buffer (, buffer)) 172 (set-buffer ,buffer)
173 (,@ forms)) 173 ,@forms)
174 (set-buffer StartBuffer))))) 174 (set-buffer StartBuffer))))
175 175
176(put 'eval-in-buffer 'lisp-indent-function 1) 176(put 'eval-in-buffer 'lisp-indent-function 1)
177 177
@@ -179,12 +179,12 @@ Just like the Common Lisp function of the same name."
179;;; 179;;;
180(defmacro eval-in-window (window &rest forms) 180(defmacro eval-in-window (window &rest forms)
181 "Switch to WINDOW, evaluate FORMS, return to original window." 181 "Switch to WINDOW, evaluate FORMS, return to original window."
182 (` (let ((OriginallySelectedWindow (selected-window))) 182 `(let ((OriginallySelectedWindow (selected-window)))
183 (unwind-protect 183 (unwind-protect
184 (progn 184 (progn
185 (select-window (, window)) 185 (select-window ,window)
186 (,@ forms)) 186 ,@forms)
187 (select-window OriginallySelectedWindow))))) 187 (select-window OriginallySelectedWindow))))
188(put 'eval-in-window 'lisp-indent-function 1) 188(put 'eval-in-window 'lisp-indent-function 1)
189 189
190;;; 190;;;
@@ -196,14 +196,14 @@ Just like the Common Lisp function of the same name."
196 "Switches to each window and evaluates FORM. Optional argument 196 "Switches to each window and evaluates FORM. Optional argument
197YESMINI says to include the minibuffer as a window. 197YESMINI says to include the minibuffer as a window.
198This is a macro, and does not evaluate its arguments." 198This is a macro, and does not evaluate its arguments."
199 (` (let ((OriginallySelectedWindow (selected-window))) 199 `(let ((OriginallySelectedWindow (selected-window)))
200 (unwind-protect 200 (unwind-protect
201 (while (progn 201 (while (progn
202 (, form) 202 ,form
203 (not (eq OriginallySelectedWindow 203 (not (eq OriginallySelectedWindow
204 (select-window 204 (select-window
205 (next-window nil (, yesmini))))))) 205 (next-window nil ,yesmini))))))
206 (select-window OriginallySelectedWindow))))) 206 (select-window OriginallySelectedWindow))))
207(put 'eval-in-window 'lisp-indent-function 0) 207(put 'eval-in-window 'lisp-indent-function 0)
208 208
209(defun move-to-loc (x y) 209(defun move-to-loc (x y)
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index 3ace091f018..73fc15b6fbf 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -192,18 +192,18 @@
192 192
193 193
194(eval-and-compile 194(eval-and-compile
195 (condition-case () 195 (condition-case ()
196 (require 'custom) 196 (require 'custom)
197 (error nil)) 197 (error nil))
198 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) 198 (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
199 nil ;; We've got what we needed 199 nil ;; We've got what we needed
200 ;; We have the old custom-library, hack around it! 200 ;; We have the old custom-library, hack around it!
201 (defmacro defgroup (&rest args) 201 (defmacro defgroup (&rest args)
202 nil) 202 nil)
203 (defmacro defface (var values doc &rest args) 203 (defmacro defface (var values doc &rest args)
204 (` (make-face (, var)))) 204 `(make-face ,var))
205 (defmacro defcustom (var value doc &rest args) 205 (defmacro defcustom (var value doc &rest args)
206 (` (defvar (, var) (, value) (, doc)))))) 206 `(defvar ,var ,value ,doc))))
207 207
208;; User options 208;; User options
209;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 209;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv