diff --git a/.emacs.d/functions.el b/.emacs.d/functions.el index 33e102ca..15f96f9c 100644 --- a/.emacs.d/functions.el +++ b/.emacs.d/functions.el @@ -210,7 +210,6 @@ fallback to the mode provided in symbol DEFAULT." (warn "Could not load %s, fallback to %s" (symbol-name ',feature) (symbol-name ',default)))))))))) -;; TODO: try defadvice. (defun mark-word-from-beginning (&optional arg allow-extend) "Set the point at the beginning of the word and call `mark-word'." (interactive "P\np") diff --git a/.emacs.d/mode-sh.el b/.emacs.d/mode-sh.el index 503859ef..9974e9ea 100644 --- a/.emacs.d/mode-sh.el +++ b/.emacs.d/mode-sh.el @@ -2,15 +2,15 @@ ;; Shell ;;============================================================================== -;; TODO: set sh-shell-file per buffer? - ;; Allow comment indentation. (setq sh-indent-comment t) (add-hook-and-eval 'sh-mode-hook (lambda () - (set (make-local-variable 'compile-command) (concat sh-shell-file " " buffer-file-name))) ) + (set (make-local-variable 'defun-prompt-regexp) + (concat "^\\(function[ \t]\\|[[:alnum:]_]+[ \t]+()[ \t]+\\)")) + (set (make-local-variable 'compile-command) (concat (symbol-name sh-shell) " " buffer-file-name))) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;