X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/38d50547c2a8195bed0aaeafbbc4c0f277d4e416..73b0cd50031a714347109169ceb8bacae338612a:/lisp/progmodes/sh-script.el diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index d41a81e38a..e36d8a9aaf 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1,7 +1,7 @@ ;;; sh-script.el --- shell-script editing commands for Emacs -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1997, 1999, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer ;; Version: 2.0f @@ -361,8 +361,6 @@ the car and cdr are the same symbol.") "The shell being programmed. This is set by \\[sh-set-shell].") ;;;###autoload(put 'sh-shell 'safe-local-variable 'symbolp) -(defvar sh-mode-abbrev-table nil) - (define-abbrev-table 'sh-mode-abbrev-table ()) @@ -565,19 +563,6 @@ This is buffer-local in every such buffer.") :type '(repeat function) :group 'sh-script) - -(defcustom sh-require-final-newline - '((csh . t) - (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) - (sexp :format "Evaluate: %v")))) - :group 'sh-script) - - (defcustom sh-assignment-regexp '((csh . "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?[ \t]*[-+*/%^]?=") ;; actually spaces are only supported in let/(( ... )) @@ -776,7 +761,7 @@ flow of control or syntax. See `sh-feature'." (shell "break" "case" "continue" "exec" "exit") (zsh sh-append bash - "select")) + "select" "foreach")) "List of keywords not in `sh-leading-keywords'. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") @@ -1716,10 +1701,6 @@ Calls the value of `sh-set-shell-hook' if set." (setq sh-shell-file (executable-set-magic shell (sh-feature sh-shell-arg) no-query-flag insert-flag))) - (let ((tem (sh-feature sh-require-final-newline))) - (if (eq tem t) - (set (make-local-variable 'require-final-newline) - mode-require-final-newline))) (setq mode-line-process (format "[%s]" sh-shell)) (set (make-local-variable 'sh-shell-variables) nil) (set (make-local-variable 'sh-shell-variables-initialized) nil) @@ -2136,11 +2117,7 @@ Return new point if successful, nil if an error occurred." (defun sh-handle-prev-do () (cond ((save-restriction - (narrow-to-region - (point) - (save-excursion - (beginning-of-line) - (point))) + (narrow-to-region (point) (line-beginning-position)) (sh-goto-match-for-done)) (sh-debug "match for done found on THIS line") (list '(+ sh-indent-after-loop-construct))) @@ -3840,5 +3817,4 @@ shell command and conveniently use this command." (provide 'sh-script) -;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937 ;;; sh-script.el ends here