# HG changeset patch # User Stefan Monnier # Date 1187903091 0 # Node ID 5c8d5235a4ac09dc2d4429dec977e0a45cb3c8c1 # Parent 8702e85df8eb57c9499b9ef6bffcfca250d41860 (defcustom, x-color-defined-p, cperl-is-face) (cperl-is-face, cperl-force-face, cperl-etags-snarf-tag, cperl-mode) (cperl-etags-snarf-tag, cperl-etags-goto-tag-location, cperl-init-faces) (cperl-etags-goto-tag-location): Use new style backquotes. diff -r 8702e85df8eb -r 5c8d5235a4ac lisp/ChangeLog --- a/lisp/ChangeLog Thu Aug 23 20:57:06 2007 +0000 +++ b/lisp/ChangeLog Thu Aug 23 21:04:51 2007 +0000 @@ -1,5 +1,10 @@ 2007-08-23 Stefan Monnier + * progmodes/cperl-mode.el (defcustom, x-color-defined-p, cperl-is-face) + (cperl-is-face, cperl-force-face, cperl-etags-snarf-tag, cperl-mode) + (cperl-etags-snarf-tag, cperl-etags-goto-tag-location, cperl-init-faces) + (cperl-etags-goto-tag-location): Use new style backquotes. + * subr.el (complete-with-action): Backport from trunk (for vc-arch.el). (dynamic-completion-table): Use it it. diff -r 8702e85df8eb -r 5c8d5235a4ac lisp/progmodes/cperl-mode.el --- a/lisp/progmodes/cperl-mode.el Thu Aug 23 20:57:06 2007 +0000 +++ b/lisp/progmodes/cperl-mode.el Thu Aug 23 21:04:51 2007 +0000 @@ -96,7 +96,7 @@ nil)) (or (fboundp 'custom-declare-variable) (defmacro defcustom (name val doc &rest arr) - (` (defvar (, name) (, val) (, doc))))) + `(defvar ,name ,val ,doc))) (or (and (fboundp 'custom-declare-variable) (string< "19.31" emacs-version)) ; Checked with 19.30: defface does not work (defmacro defface (&rest arr) @@ -104,52 +104,52 @@ ;; Avoid warning (tmp definitions) (or (fboundp 'x-color-defined-p) (defmacro x-color-defined-p (col) - (cond ((fboundp 'color-defined-p) (` (color-defined-p (, col)))) + (cond ((fboundp 'color-defined-p) `(color-defined-p ,col)) ;; XEmacs >= 19.12 - ((fboundp 'valid-color-name-p) (` (valid-color-name-p (, col)))) + ((fboundp 'valid-color-name-p) `(valid-color-name-p ,col)) ;; XEmacs 19.11 - ((fboundp 'x-valid-color-name-p) (` (x-valid-color-name-p (, col)))) + ((fboundp 'x-valid-color-name-p) `(x-valid-color-name-p ,col)) (t '(error "Cannot implement color-defined-p"))))) (defmacro cperl-is-face (arg) ; Takes quoted arg (cond ((fboundp 'find-face) - (` (find-face (, arg)))) + `(find-face ,arg)) (;;(and (fboundp 'face-list) ;; (face-list)) (fboundp 'face-list) - (` (member (, arg) (and (fboundp 'face-list) - (face-list))))) + `(member ,arg (and (fboundp 'face-list) + (face-list)))) (t - (` (boundp (, arg)))))) + `(boundp ,arg)))) (defmacro cperl-make-face (arg descr) ; Takes unquoted arg (cond ((fboundp 'make-face) - (` (make-face (quote (, arg))))) + `(make-face (quote ,arg))) (t - (` (defvar (, arg) (quote (, arg)) (, descr)))))) + `(defvar ,arg (quote ,arg) ,descr)))) (defmacro cperl-force-face (arg descr) ; Takes unquoted arg - (` (progn - (or (cperl-is-face (quote (, arg))) - (cperl-make-face (, arg) (, descr))) - (or (boundp (quote (, arg))) ; We use unquoted variants too - (defvar (, arg) (quote (, arg)) (, descr)))))) + `(progn + (or (cperl-is-face (quote ,arg)) + (cperl-make-face ,arg ,descr)) + (or (boundp (quote ,arg)) ; We use unquoted variants too + (defvar ,arg (quote ,arg) ,descr)))) (if cperl-xemacs-p (defmacro cperl-etags-snarf-tag (file line) - (` (progn - (beginning-of-line 2) - (list (, file) (, line))))) + `(progn + (beginning-of-line 2) + (list ,file ,line))) (defmacro cperl-etags-snarf-tag (file line) - (` (etags-snarf-tag)))) + `(etags-snarf-tag))) (if cperl-xemacs-p (defmacro cperl-etags-goto-tag-location (elt) - (`;;(progn - ;; (switch-to-buffer (get-file-buffer (elt (, elt) 0))) - ;; (set-buffer (get-file-buffer (elt (, elt) 0))) - ;; Probably will not work due to some save-excursion??? - ;; Or save-file-position? - ;; (message "Did I get to line %s?" (elt (, elt) 1)) - (goto-line (string-to-int (elt (, elt) 1))))) + ;;(progn + ;; (switch-to-buffer (get-file-buffer (elt ,elt 0))) + ;; (set-buffer (get-file-buffer (elt ,elt 0))) + ;; Probably will not work due to some save-excursion??? + ;; Or save-file-position? + ;; (message "Did I get to line %s?" (elt ,elt 1)) + `(goto-line (string-to-int (elt ,elt 1)))) ;;) (defmacro cperl-etags-goto-tag-location (elt) - (` (etags-goto-tag-location (, elt)))))) + `(etags-goto-tag-location ,elt)))) (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version)) @@ -1788,8 +1788,8 @@ ;; This one is obsolete... (make-local-variable 'vc-header-alist) (set 'vc-header-alist (or cperl-vc-header-alist ; Avoid warning - (` ((SCCS (, (car cperl-vc-sccs-header))) - (RCS (, (car cperl-vc-rcs-header))))))) + `((SCCS ,(car cperl-vc-sccs-header)) + (RCS ,(car cperl-vc-rcs-header))))) (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x (make-local-variable 'compilation-error-regexp-alist-alist) (set 'compilation-error-regexp-alist-alist @@ -5951,25 +5951,25 @@ nil t))) ; local variables, multiple (font-lock-anchored ;; 1=my_etc, 2=white? 3=(+white? 4=white? 5=var - (` ((, (concat "\\<\\(my\\|local\\|our\\)" + `(,(concat "\\<\\(my\\|local\\|our\\)" cperl-maybe-white-and-comment-rex "\\((" cperl-maybe-white-and-comment-rex - "\\)?\\([$@%*]\\([a-zA-Z0-9_:]+\\|[^a-zA-Z0-9_]\\)\\)")) - (5 (, (if cperl-font-lock-multiline + "\\)?\\([$@%*]\\([a-zA-Z0-9_:]+\\|[^a-zA-Z0-9_]\\)\\)") + (5 ,(if cperl-font-lock-multiline 'font-lock-variable-name-face '(progn (setq cperl-font-lock-multiline-start (match-beginning 0)) - 'font-lock-variable-name-face)))) - ((, (concat "\\=" + 'font-lock-variable-name-face))) + (,(concat "\\=" cperl-maybe-white-and-comment-rex "," cperl-maybe-white-and-comment-rex - "\\([$@%*]\\([a-zA-Z0-9_:]+\\|[^a-zA-Z0-9_]\\)\\)")) + "\\([$@%*]\\([a-zA-Z0-9_:]+\\|[^a-zA-Z0-9_]\\)\\)") ;; Bug in font-lock: limit is used not only to limit ;; searches, but to set the "extend window for ;; facification" property. Thus we need to minimize. - (, (if cperl-font-lock-multiline + ,(if cperl-font-lock-multiline '(if (match-beginning 3) (save-excursion (goto-char (match-beginning 3)) @@ -5983,8 +5983,8 @@ (forward-char -2)) ; disable continued expr '(if (match-beginning 3) (point-max) ; No limit for continuation - (forward-char -2)))) ; disable continued expr - (, (if cperl-font-lock-multiline + (forward-char -2))) ; disable continued expr + ,(if cperl-font-lock-multiline nil '(progn ; Do at end ;; "my" may be already fontified (POD), @@ -5997,8 +5997,8 @@ (put-text-property (1+ cperl-font-lock-multiline-start) (point) 'syntax-type 'multiline)) - (setq cperl-font-lock-multiline-start nil)))) - (3 font-lock-variable-name-face))))) + (setq cperl-font-lock-multiline-start nil))) + (3 font-lock-variable-name-face)))) (t '("^[ \t{}]*\\(my\\|local\\|our\\)[ \t]*\\(([ \t]*\\)?\\([$@%*][a-zA-Z0-9_:]+\\)" 3 font-lock-variable-name-face))) '("\\