;;; 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 <occitan@esperanto.org>
;; Version: 2.0f
"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 ())
: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/(( ... ))
(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")
(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)
(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)))
(provide 'sh-script)
-;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937
;;; sh-script.el ends here