diff options
| author | Joakim Verona | 2013-09-12 07:46:45 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-09-12 07:46:45 +0200 |
| commit | 7701e0724215b82d2f635c19d7e7f2a9863e687c (patch) | |
| tree | b759e59df3edf3f5d661db8d24296cd3da116160 /lisp/progmodes | |
| parent | dd30d6b73383df67468e4705492206bae6a8185c (diff) | |
| parent | 96b3f75a809761389cbbdc2eb0ed85f4559a8eef (diff) | |
| download | emacs-7701e0724215b82d2f635c19d7e7f2a9863e687c.tar.gz emacs-7701e0724215b82d2f635c19d7e7f2a9863e687c.zip | |
merge from trunk
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/executable.el | 19 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 1 |
3 files changed, 13 insertions, 10 deletions
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index a305393c7d8..7b08df8b85f 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -269,16 +269,15 @@ file modes." | |||
| 269 | (save-restriction | 269 | (save-restriction |
| 270 | (widen) | 270 | (widen) |
| 271 | (string= "#!" (buffer-substring (point-min) (+ 2 (point-min))))) | 271 | (string= "#!" (buffer-substring (point-min) (+ 2 (point-min))))) |
| 272 | (condition-case nil | 272 | ;; Eg file-modes can return nil (bug#9879). It should not, |
| 273 | (let* ((current-mode (file-modes (buffer-file-name))) | 273 | ;; in this context, but we should handle it all the same. |
| 274 | (add-mode (logand ?\111 (default-file-modes)))) | 274 | (with-demoted-errors "Unable to make file executable: %s" |
| 275 | (or (/= (logand ?\111 current-mode) 0) | 275 | (let* ((current-mode (file-modes (buffer-file-name))) |
| 276 | (zerop add-mode) | 276 | (add-mode (logand ?\111 (default-file-modes)))) |
| 277 | (set-file-modes (buffer-file-name) | 277 | (or (/= (logand ?\111 current-mode) 0) |
| 278 | (logior current-mode add-mode)))) | 278 | (zerop add-mode) |
| 279 | ;; Eg file-modes can return nil (bug#9879). It should not, | 279 | (set-file-modes (buffer-file-name) |
| 280 | ;; in this context, but we should handle it all the same. | 280 | (logior current-mode add-mode))))))) |
| 281 | (error (message "Unable to make file executable"))))) | ||
| 282 | 281 | ||
| 283 | (provide 'executable) | 282 | (provide 'executable) |
| 284 | 283 | ||
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index de1c26a7fa7..f20a57940be 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -1581,6 +1581,9 @@ code line." | |||
| 1581 | :group 'octave | 1581 | :group 'octave |
| 1582 | :version "24.4") | 1582 | :version "24.4") |
| 1583 | 1583 | ||
| 1584 | ;; Used in a mode derived from help-mode. | ||
| 1585 | (declare-function help-button-action "help-mode" (button)) | ||
| 1586 | |||
| 1584 | (define-button-type 'octave-help-file | 1587 | (define-button-type 'octave-help-file |
| 1585 | 'follow-link t | 1588 | 'follow-link t |
| 1586 | 'action #'help-button-action | 1589 | 'action #'help-button-action |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 0f868255589..902616e3023 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1377,6 +1377,7 @@ If the result is do-end block, it will always be multiline." | |||
| 1377 | ;; Unusual code layout confuses the byte-compiler. | 1377 | ;; Unusual code layout confuses the byte-compiler. |
| 1378 | (declare-function ruby-syntax-propertize-expansion "ruby-mode" ()) | 1378 | (declare-function ruby-syntax-propertize-expansion "ruby-mode" ()) |
| 1379 | (declare-function ruby-syntax-expansion-allowed-p "ruby-mode" (parse-state)) | 1379 | (declare-function ruby-syntax-expansion-allowed-p "ruby-mode" (parse-state)) |
| 1380 | (declare-function ruby-syntax-propertize-function "ruby-mode" (start end)) | ||
| 1380 | 1381 | ||
| 1381 | (if (eval-when-compile (fboundp #'syntax-propertize-rules)) | 1382 | (if (eval-when-compile (fboundp #'syntax-propertize-rules)) |
| 1382 | ;; New code that works independently from font-lock. | 1383 | ;; New code that works independently from font-lock. |