emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Default for C-c : in sh-mode.


From: Luc Teirlinck
Subject: Default for C-c : in sh-mode.
Date: Wed, 8 Jan 2003 22:06:55 -0600 (CST)

The minibuffer prompt for sh-set-shell (normally bound to C-c : in
sh-mode) does currently not use any default for the chosen shell.
(Empty input produces an "Interpreter not recognized" error.)  It
would seem that sh-shell-file is an obvious choice.  Is there any
reason not to include it as the default?  The attached diff would do
that.  Note that it also shortens "Name or path of shell: " to 
"Shell " to prevent the prompt from getting too long as a result.  
(In my case, sh-shell-file is usually /usr/local/bin/bash.)

Change log:

2003-01-08  Luc Teirlinck  <address@hidden>

        * sh-script.el (sh-set-shell): Make sh-shell-file the default shell.

Patch:

===File ~/sh-diff===========================================
cd /usr/local/share/emacs/21.3.50/lisp/progmodes/
diff -c /usr/local/share/emacs/21.3.50/lisp/progmodes/sh-script.el 
/usr/local/share/emacs/21.3.50/lisp/progmodes/sh-script.new.el
*** /usr/local/share/emacs/21.3.50/lisp/progmodes/sh-script.el  Sun Dec 22 
18:04:44 2002
--- /usr/local/share/emacs/21.3.50/lisp/progmodes/sh-script.new.el      Wed Jan 
 8 20:34:03 2003
***************
*** 1447,1455 ****
  controls whether to query about making the visited file executable.
  
  Calls the value of `sh-set-shell-hook' if set."
!   (interactive (list (completing-read "Name or path of shell: "
                                      interpreter-mode-alist
!                                     (lambda (x) (eq (cdr x) 'sh-mode)))
                     (eq executable-query 'function)
                     t))
    (if (string-match "\\.exe\\'" shell)
--- 1447,1457 ----
  controls whether to query about making the visited file executable.
  
  Calls the value of `sh-set-shell-hook' if set."
!   (interactive (list (completing-read (format "Shell \(default %s\): "
!                                             sh-shell-file)
                                      interpreter-mode-alist
!                                     (lambda (x) (eq (cdr x) 'sh-mode))
!                                     nil nil nil sh-shell-file)
                     (eq executable-query 'function)
                     t))
    (if (string-match "\\.exe\\'" shell)

Diff finished at Wed Jan  8 20:37:45
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]