diff options
author | Richard M. Stallman <rms@gnu.org> | 2004-12-31 14:57:21 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2004-12-31 14:57:21 +0000 |
commit | 61871c70f8859f42783d509e72a83b502e0f2af9 (patch) | |
tree | 2ed19c7708df5a1bee2495ad05ea7d2902a1e10d /lisp/progmodes | |
parent | 68e442738dfbf80edcff0fad37849ae26cae9c50 (diff) | |
download | emacs-61871c70f8859f42783d509e72a83b502e0f2af9.tar.gz |
(sh-require-final-newline):
Alist value now controls whether to use mode-require-final-newline.
(sh-set-shell): Implement that new meaning.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/sh-script.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 336fd874eee..bcabc505a49 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -495,10 +495,9 @@ This is buffer-local in every such buffer.") (defcustom sh-require-final-newline '((csh . t) - (pdksh . t) - (rc . require-final-newline) - (sh . require-final-newline)) + (pdksh . t)) "*Value of `require-final-newline' in Shell-Script mode buffers. +\(SHELL . t) means use the value of `mode-require-final-newline' for SHELL. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") (choice (const :tag "require" t) @@ -1485,8 +1484,8 @@ Calls the value of `sh-set-shell-hook' if set." (executable-set-magic shell (sh-feature sh-shell-arg) no-query-flag insert-flag))) (let ((tem (sh-feature sh-require-final-newline))) - (unless (eq tem 'require-final-newline) - (setq require-final-newline tem))) + (if (eq tem t) + (setq require-final-newline mode-require-final-newline))) (setq comment-start-skip "#+[\t ]*" local-abbrev-table sh-mode-abbrev-table |