mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
(grep-read-files): Strip trailing <N> from buffer names
not visiting a file (e.g. cloned buffers).
This commit is contained in:
parent
08166ed65f
commit
6830f44933
@ -1,3 +1,8 @@
|
||||
2009-08-30 Kevin Rodgers <kevin.d.rodgers@gmail.com> (tiny change)
|
||||
|
||||
* progmodes/grep.el (grep-read-files): Strip trailing <N> from
|
||||
buffer names not visiting a file (e.g. cloned buffers).
|
||||
|
||||
2009-08-30 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* comint.el (comint-exec-1): Check command is non-null first.
|
||||
|
@ -748,7 +748,8 @@ substitution string. Note dynamic scoping of variables.")
|
||||
|
||||
(defun grep-read-files (regexp)
|
||||
"Read files arg for interactive grep."
|
||||
(let* ((bn (or (buffer-file-name) (buffer-name)))
|
||||
(let* ((bn (or (buffer-file-name)
|
||||
(replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
|
||||
(fn (and bn
|
||||
(stringp bn)
|
||||
(file-name-nondirectory bn)))
|
||||
|
Loading…
Reference in New Issue
Block a user