[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111894: * lisp/vc/diff-mode.el (diff
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111894: * lisp/vc/diff-mode.el (diff-hunk-file-names): Handle filenames with spaces. |
Date: |
Thu, 28 Feb 2013 11:34:51 -0500 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111894
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Thu 2013-02-28 11:34:51 -0500
message:
* lisp/vc/diff-mode.el (diff-hunk-file-names): Handle filenames with spaces.
See <http://stackoverflow.com/questions/14720205>.
modified:
lisp/ChangeLog
lisp/vc/diff-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-02-28 14:51:03 +0000
+++ b/lisp/ChangeLog 2013-02-28 16:34:51 +0000
@@ -1,3 +1,8 @@
+2013-02-28 Sam Steingold <address@hidden>
+
+ * vc/diff-mode.el (diff-hunk-file-names): Handle filenames with spaces.
+ See <http://stackoverflow.com/questions/14720205>.
+
2013-02-28 Thierry Volpiatto <address@hidden>
* net/net-utils.el (net-utils--revert-function): New fun (bug#13831).
=== modified file 'lisp/vc/diff-mode.el'
--- a/lisp/vc/diff-mode.el 2013-01-02 16:13:04 +0000
+++ b/lisp/vc/diff-mode.el 2013-02-28 16:34:51 +0000
@@ -821,9 +821,11 @@
(progn (diff-hunk-prev) (point))
(error (point-min)))))
(header-files
- (if (looking-at "[-*][-*][-*] \\(\\S-+\\)\\(\\s-.*\\)?\n[-+][-+][-+]
\\(\\S-+\\)")
- (list (if old (match-string 1) (match-string 3))
- (if old (match-string 3) (match-string 1)))
+ ;; handle filenames with spaces;
+ ;; cf. diff-font-lock-keywords / diff-file-header-face
+ (if (looking-at "[-*][-*][-*] \\([^\t]+\\)\t.*\n[-+][-+][-+]
\\([^\t]+\\)")
+ (list (if old (match-string 1) (match-string 2))
+ (if old (match-string 2) (match-string 1)))
(forward-line 1) nil)))
(delq nil
(append
@@ -832,6 +834,7 @@
(re-search-backward "^Index: \\(.+\\)" limit t)))
(list (match-string 1)))
header-files
+ ;; this assumes that there are no spaces in filenames
(when (re-search-backward
"^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?"
nil t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111894: * lisp/vc/diff-mode.el (diff-hunk-file-names): Handle filenames with spaces.,
Sam Steingold <=