[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sh-mode buglet
From: |
Giorgos Keramidas |
Subject: |
sh-mode buglet |
Date: |
Fri, 24 Feb 2006 20:37:03 +0200 |
The head version of sh-script.el has a minor buglet that prevents one
from running:
% emacs -f sh-mode
to fire up Emacs in sh-mode.
The debugger backtrace is:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("[.]sh\\>" nil)
sh-mode()
eval((sh-mode))
eval-last-sexp-1((4))
eval-last-sexp((4))
call-interactively(eval-last-sexp)
and it looks like this is what would be needed:
% Index: lisp/progmodes/sh-script.el
% ===================================================================
% --- lisp/progmodes/sh-script.el (revision 45)
% +++ lisp/progmodes/sh-script.el (working copy)
% @@ -1438,7 +1438,7 @@
% ((and buffer-file-name
% (string-match "\\.m?spec\\'" buffer-file-name))
% "rpm")))))
% - (unless interpreter
% + (unless (or interpreter (null buffer-file-name))
% (setq interpreter
% (cond ((string-match "[.]sh\\>" buffer-file-name)
% "sh")
I haven't had a chance to build a snapshot with this change yet,
but has anyone else used sh-mode and seen this? Does the change
look reasonable?
- Giorgos
- sh-mode buglet,
Giorgos Keramidas <=