Mercurial > emacs
comparison lisp/progmodes/executable.el @ 12962:bc084caba958
(executable-set-magic): Use make-local-hook for after-save-hook.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Mon, 28 Aug 1995 15:12:57 +0000 |
| parents | 3ef9f196e634 |
| children | 8a10a3485eef |
comparison
equal
deleted
inserted
replaced
| 12961:e8028ecec7ea | 12962:bc084caba958 |
|---|---|
| 180 executable-insert)) | 180 executable-insert)) |
| 181 (> (point-min) 1) | 181 (> (point-min) 1) |
| 182 (let ((point (point-marker)) | 182 (let ((point (point-marker)) |
| 183 (buffer-modified-p (buffer-modified-p))) | 183 (buffer-modified-p (buffer-modified-p))) |
| 184 (goto-char (point-min)) | 184 (goto-char (point-min)) |
| 185 (make-local-variable 'after-save-hook) | 185 (make-local-hook 'after-save-hook) |
| 186 (add-hook 'after-save-hook 'executable-chmod) | 186 (add-hook 'after-save-hook 'executable-chmod nil t) |
| 187 (if (looking-at "#![ \t]*\\(.*\\)$") | 187 (if (looking-at "#![ \t]*\\(.*\\)$") |
| 188 (and (goto-char (match-beginning 1)) | 188 (and (goto-char (match-beginning 1)) |
| 189 (not (string= argument | 189 (not (string= argument |
| 190 (buffer-substring (point) (match-end 1)))) | 190 (buffer-substring (point) (match-end 1)))) |
| 191 (save-window-excursion | 191 (save-window-excursion |
