Emacs: using sh-shell for compilation

master
Pierre Neidhardt 2014-03-09 15:03:38 +01:00
parent 08998aecb3
commit 86633e6fbd
2 changed files with 3 additions and 4 deletions

View File

@ -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")

View File

@ -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))) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;