summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index fb82d0dbe1f..e8be1a09047 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4621,9 +4621,11 @@ Before and after saving the buffer, this function runs
(if setmodes
(condition-case ()
(progn
- (set-file-modes buffer-file-name (car setmodes))
- (set-file-extended-attributes buffer-file-name
- (nth 1 setmodes)))
+ (unless
+ (with-demoted-errors
+ (set-file-modes buffer-file-name (car setmodes)))
+ (set-file-extended-attributes buffer-file-name
+ (nth 1 setmodes))))
(error nil))))
;; If the auto-save file was recent before this command,
;; delete it now.