summaryrefslogtreecommitdiff
path: root/lisp/htmlfontify.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/htmlfontify.el')
-rw-r--r--lisp/htmlfontify.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index b8442be1e89..c1aaab5e211 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -1938,9 +1938,9 @@ adding an extension of `hfy-extn'. Fontification is actually done by
(set-buffer html)
(write-file (concat target hfy-extn))
(kill-buffer html))
- ;; #o0200 == 128, but emacs20 doesn't know that
- (if (and (file-exists-p target) (not (file-writable-p target)))
- (set-file-modes target (logior (file-modes target) 128)))
+ (let ((modes (file-modes target)))
+ (if (and modes (not (file-writable-p target)))
+ (set-file-modes target (logior modes #o0200))))
(copy-file (buffer-file-name source) target 'overwrite))
(kill-buffer source)) ))