all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
Subject: sh-mode buglet
Date: Fri, 24 Feb 2006 20:37:03 +0200	[thread overview]
Message-ID: <20060224183703.GA72310@flame.pc> (raw)

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

             reply	other threads:[~2006-02-24 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 18:37 Giorgos Keramidas [this message]
2006-02-25 11:27 ` sh-mode buglet Thien-Thi Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060224183703.GA72310@flame.pc \
    --to=keramida@ceid.upatras.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.