Mercurial > emacs
comparison lisp/progmodes/sh-script.el @ 59251:84ede35ffeb4
(sh-require-final-newline):
Alist value now controls whether to use mode-require-final-newline.
(sh-set-shell): Implement that new meaning.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 31 Dec 2004 14:57:21 +0000 |
parents | d2c6a8b592f2 |
children | 7b97d6104891 95879cc1ed20 |
comparison
equal
deleted
inserted
replaced
59250:54d81a8baaa6 | 59251:84ede35ffeb4 |
---|---|
493 :group 'sh-script) | 493 :group 'sh-script) |
494 | 494 |
495 | 495 |
496 (defcustom sh-require-final-newline | 496 (defcustom sh-require-final-newline |
497 '((csh . t) | 497 '((csh . t) |
498 (pdksh . t) | 498 (pdksh . t)) |
499 (rc . require-final-newline) | |
500 (sh . require-final-newline)) | |
501 "*Value of `require-final-newline' in Shell-Script mode buffers. | 499 "*Value of `require-final-newline' in Shell-Script mode buffers. |
500 \(SHELL . t) means use the value of `mode-require-final-newline' for SHELL. | |
502 See `sh-feature'." | 501 See `sh-feature'." |
503 :type '(repeat (cons (symbol :tag "Shell") | 502 :type '(repeat (cons (symbol :tag "Shell") |
504 (choice (const :tag "require" t) | 503 (choice (const :tag "require" t) |
505 (sexp :format "Evaluate: %v")))) | 504 (sexp :format "Evaluate: %v")))) |
506 :group 'sh-script) | 505 :group 'sh-script) |
1483 (if insert-flag | 1482 (if insert-flag |
1484 (setq sh-shell-file | 1483 (setq sh-shell-file |
1485 (executable-set-magic shell (sh-feature sh-shell-arg) | 1484 (executable-set-magic shell (sh-feature sh-shell-arg) |
1486 no-query-flag insert-flag))) | 1485 no-query-flag insert-flag))) |
1487 (let ((tem (sh-feature sh-require-final-newline))) | 1486 (let ((tem (sh-feature sh-require-final-newline))) |
1488 (unless (eq tem 'require-final-newline) | 1487 (if (eq tem t) |
1489 (setq require-final-newline tem))) | 1488 (setq require-final-newline mode-require-final-newline))) |
1490 (setq | 1489 (setq |
1491 comment-start-skip "#+[\t ]*" | 1490 comment-start-skip "#+[\t ]*" |
1492 local-abbrev-table sh-mode-abbrev-table | 1491 local-abbrev-table sh-mode-abbrev-table |
1493 mode-line-process (format "[%s]" sh-shell) | 1492 mode-line-process (format "[%s]" sh-shell) |
1494 sh-shell-variables nil | 1493 sh-shell-variables nil |