diff options
| author | Stefan Monnier | 2003-02-11 21:40:17 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-02-11 21:40:17 +0000 |
| commit | ebc6b37c4730d932d826d25751424e4ced04ff30 (patch) | |
| tree | 843cb6bd2b80c25e7a7c8dd7638d88f009df7964 | |
| parent | a8c9594b988ba6677bc7e109a35c7684d5fbab12 (diff) | |
| download | emacs-ebc6b37c4730d932d826d25751424e4ced04ff30.tar.gz emacs-ebc6b37c4730d932d826d25751424e4ced04ff30.zip | |
(find-tag-tag): Move (default foo) to before `:' in the prompt.
(find-tag): Make sure we move point in the proper window.
| -rw-r--r-- | lisp/progmodes/etags.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index e3154ae4c4a..c91d18418d8 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -793,7 +793,9 @@ Assumes the tags table is the current buffer." | |||
| 793 | (get major-mode 'find-tag-default-function) | 793 | (get major-mode 'find-tag-default-function) |
| 794 | 'find-tag-default))) | 794 | 'find-tag-default))) |
| 795 | (spec (completing-read (if default | 795 | (spec (completing-read (if default |
| 796 | (format "%s(default %s) " string default) | 796 | (format "%s (default %s): " |
| 797 | (substring string 0 (string-match "[ :]+\\'" string)) | ||
| 798 | default) | ||
| 797 | string) | 799 | string) |
| 798 | 'tags-complete-tag | 800 | 'tags-complete-tag |
| 799 | nil nil nil nil default))) | 801 | nil nil nil nil default))) |
| @@ -914,10 +916,12 @@ Contrast this with the ring of marks gone to by the command. | |||
| 914 | 916 | ||
| 915 | See documentation of variable `tags-file-name'." | 917 | See documentation of variable `tags-file-name'." |
| 916 | (interactive (find-tag-interactive "Find tag: ")) | 918 | (interactive (find-tag-interactive "Find tag: ")) |
| 917 | (let ((buf (find-tag-noselect tagname next-p regexp-p))) | 919 | (let* ((buf (find-tag-noselect tagname next-p regexp-p)) |
| 920 | (pos (with-current-buffer buf (point)))) | ||
| 918 | (condition-case nil | 921 | (condition-case nil |
| 919 | (switch-to-buffer buf) | 922 | (switch-to-buffer buf) |
| 920 | (error (pop-to-buffer buf))))) | 923 | (error (pop-to-buffer buf))) |
| 924 | (goto-char pos))) | ||
| 921 | ;;;###autoload (define-key esc-map "." 'find-tag) | 925 | ;;;###autoload (define-key esc-map "." 'find-tag) |
| 922 | 926 | ||
| 923 | ;;;###autoload | 927 | ;;;###autoload |