diff options
| -rw-r--r-- | lisp/progmodes/etags.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 75c949f8555..bbcf7e96828 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1020,9 +1020,15 @@ See documentation of variable `tags-file-name'." nil (forward-line 1) (while (not (or (eobp) (looking-at "\f"))) - (princ (buffer-substring (point) - (progn (skip-chars-forward "^\177") - (point)))) + (let ((tag (buffer-substring (point) + (progn (skip-chars-forward "^\177") + (point))))) + (princ (if (looking-at "[^\n]+\001") + ;; There is an explicit tag name; use that. + (buffer-substring (point) + (progn (skip-chars-forward "^\001") + (point))) + tag))) (terpri) (forward-line 1)) t)) |
