aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2001-12-02 07:16:37 +0000
committerStefan Monnier2001-12-02 07:16:37 +0000
commit06adf6b1ac44dfa3f73d2ddee5d8121b6365666a (patch)
tree5fdcf6a8ef8da529c8855193d1a9da00becf8081 /lisp
parent2137e978c380130b31a3afff65b744fa479baee0 (diff)
downloademacs-06adf6b1ac44dfa3f73d2ddee5d8121b6365666a.tar.gz
emacs-06adf6b1ac44dfa3f73d2ddee5d8121b6365666a.zip
(tags-with-face): Use make-symbol.
(tags-search, tags-query-replace): Use backquotes.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/etags.el27
1 files changed, 10 insertions, 17 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index d1e357aee5d..05fc2cd020f 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -29,7 +29,6 @@
29;;; Code: 29;;; Code:
30 30
31(require 'ring) 31(require 'ring)
32(eval-when-compile (require 'cl)) ; for `gensym'
33 32
34;;;###autoload 33;;;###autoload
35(defvar tags-file-name nil 34(defvar tags-file-name nil
@@ -1362,7 +1361,7 @@ where they were found."
1362 1361
1363(defmacro tags-with-face (face &rest body) 1362(defmacro tags-with-face (face &rest body)
1364 "Execute BODY, give output to `standard-output' face FACE." 1363 "Execute BODY, give output to `standard-output' face FACE."
1365 (let ((pp (gensym "twf-"))) 1364 (let ((pp (make-symbol "start")))
1366 `(let ((,pp (with-current-buffer standard-output (point)))) 1365 `(let ((,pp (with-current-buffer standard-output (point))))
1367 ,@body 1366 ,@body
1368 (put-text-property ,pp (with-current-buffer standard-output (point)) 1367 (put-text-property ,pp (with-current-buffer standard-output (point))
@@ -1722,8 +1721,7 @@ See documentation of variable `tags-file-name'."
1722 (null tags-loop-operate)) 1721 (null tags-loop-operate))
1723 ;; Continue last tags-search as if by M-,. 1722 ;; Continue last tags-search as if by M-,.
1724 (tags-loop-continue nil) 1723 (tags-loop-continue nil)
1725 (setq tags-loop-scan 1724 (setq tags-loop-scan `(re-search-forward ',regexp nil t)
1726 (list 're-search-forward (list 'quote regexp) nil t)
1727 tags-loop-operate nil) 1725 tags-loop-operate nil)
1728 (tags-loop-continue (or file-list-form t)))) 1726 (tags-loop-continue (or file-list-form t))))
1729 1727
@@ -1736,19 +1734,14 @@ with the command \\[tags-loop-continue].
1736 1734
1737See documentation of variable `tags-file-name'." 1735See documentation of variable `tags-file-name'."
1738 (interactive (query-replace-read-args "Tags query replace (regexp)" t)) 1736 (interactive (query-replace-read-args "Tags query replace (regexp)" t))
1739 (setq tags-loop-scan (list 'prog1 1737 (setq tags-loop-scan `(let ,(unless (equal from (downcase from))
1740 (list 'let 1738 '((case-fold-search nil)))
1741 (if (not (equal from (downcase from))) 1739 (if (re-search-forward ',from nil t)
1742 '((case-fold-search nil))) 1740 ;; When we find a match, move back
1743 (list 'if (list 're-search-forward 1741 ;; to the beginning of it so perform-replace
1744 (list 'quote from) nil t) 1742 ;; will see it.
1745 ;; When we find a match, move back 1743 (goto-char (match-beginning 0))))
1746 ;; to the beginning of it so 1744 tags-loop-operate `(perform-replace ',from ',to t t ',delimited))
1747 ;; perform-replace will see it.
1748 '(goto-char (match-beginning 0)))))
1749 tags-loop-operate (list 'perform-replace
1750 (list 'quote from) (list 'quote to)
1751 t t (list 'quote delimited)))
1752 (tags-loop-continue (or file-list-form t))) 1745 (tags-loop-continue (or file-list-form t)))
1753 1746
1754(defun tags-complete-tags-table-file (string predicate what) 1747(defun tags-complete-tags-table-file (string predicate what)