aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2009-08-30 23:47:11 +0000
committerJuri Linkov2009-08-30 23:47:11 +0000
commit6830f44933dc2fc9ce64f21144c7b9b57342a8e1 (patch)
tree3e9cafb31f917789a7ca778cf63a5b8d3e2223ed
parent08166ed65fa9660e6f6365520d0ef5ac71a1645e (diff)
downloademacs-6830f44933dc2fc9ce64f21144c7b9b57342a8e1.tar.gz
emacs-6830f44933dc2fc9ce64f21144c7b9b57342a8e1.zip
(grep-read-files): Strip trailing <N> from buffer names
not visiting a file (e.g. cloned buffers).
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/grep.el3
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index de79abf98a5..56f19a60829 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-08-30 Kevin Rodgers <kevin.d.rodgers@gmail.com> (tiny change)
2
3 * progmodes/grep.el (grep-read-files): Strip trailing <N> from
4 buffer names not visiting a file (e.g. cloned buffers).
5
12009-08-30 Nick Roberts <nickrob@snap.net.nz> 62009-08-30 Nick Roberts <nickrob@snap.net.nz>
2 7
3 * comint.el (comint-exec-1): Check command is non-null first. 8 * comint.el (comint-exec-1): Check command is non-null first.
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 5c199016c65..bf626f6e308 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -748,7 +748,8 @@ substitution string. Note dynamic scoping of variables.")
748 748
749(defun grep-read-files (regexp) 749(defun grep-read-files (regexp)
750 "Read files arg for interactive grep." 750 "Read files arg for interactive grep."
751 (let* ((bn (or (buffer-file-name) (buffer-name))) 751 (let* ((bn (or (buffer-file-name)
752 (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
752 (fn (and bn 753 (fn (and bn
753 (stringp bn) 754 (stringp bn)
754 (file-name-nondirectory bn))) 755 (file-name-nondirectory bn)))