aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/executable.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/executable.el')
-rw-r--r--lisp/progmodes/executable.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index df373ba67fd..eecaab17e3d 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -271,7 +271,8 @@ The magic number of such a command displays all lines but itself."
271 "Make file executable according to umask if not already executable. 271 "Make file executable according to umask if not already executable.
272If file already has any execute bits set at all, do not change existing 272If file already has any execute bits set at all, do not change existing
273file modes." 273file modes."
274 (and (save-restriction 274 (and (>= (buffer-size) 2)
275 (save-restriction
275 (widen) 276 (widen)
276 (string= "#!" (buffer-substring 1 3))) 277 (string= "#!" (buffer-substring 1 3)))
277 (let* ((current-mode (file-modes (buffer-file-name))) 278 (let* ((current-mode (file-modes (buffer-file-name)))