diff options
| author | Glenn Morris | 2011-03-07 00:56:30 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-03-07 00:56:30 -0800 |
| commit | 7e319d3cc31d6735616e9f68c81042b4920e43e8 (patch) | |
| tree | 54643cde011c85dbf0de2239fe05980cb7d32e91 | |
| parent | 619f4b625e020c27d787e14e4f3c499be6b2ef77 (diff) | |
| download | emacs-7e319d3cc31d6735616e9f68c81042b4920e43e8.tar.gz emacs-7e319d3cc31d6735616e9f68c81042b4920e43e8.zip | |
vc.el fix for bug#6146.
* lisp/vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt.
Give an explicit error if failed to make writable.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index effb2a3038a..4ff65b16c6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | 2011-03-07 Glenn Morris <rgm@gnu.org> | 1 | 2011-03-07 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. | 3 | * vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. |
| 4 | Give an explicit error if failed to make writable. (Bug#6146) | ||
| 4 | 5 | ||
| 5 | 2011-03-07 Ed Reingold <reingold@emr.cs.iit.edu> | 6 | 2011-03-07 Ed Reingold <reingold@emr.cs.iit.edu> |
| 6 | 7 | ||
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 2fb397ed6f8..7f55ffdbdad 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1117,7 +1117,10 @@ merge in the changes into your working copy." | |||
| 1117 | ;; Make the file+buffer read-write. | 1117 | ;; Make the file+buffer read-write. |
| 1118 | (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) | 1118 | (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) |
| 1119 | (error "Aborted")) | 1119 | (error "Aborted")) |
| 1120 | (set-file-modes file (logior (file-modes file) 128)) | 1120 | ;; Maybe we somehow lost permissions on the directory. |
| 1121 | (condition-case nil | ||
| 1122 | (set-file-modes file (logior (file-modes file) 128)) | ||
| 1123 | (error (error "Unable to make file writable"))) | ||
| 1121 | (let ((visited (get-file-buffer file))) | 1124 | (let ((visited (get-file-buffer file))) |
| 1122 | (when visited | 1125 | (when visited |
| 1123 | (with-current-buffer visited | 1126 | (with-current-buffer visited |