From: Daniel Pfeiffer <occitan@t-online.de>
To: 12963@debbugs.gnu.org
Cc: Ivan Kelly <ivan@ivankelly.net>
Subject: bug#12963: Fwd: Small modification to sh-script, to cover unsupported case label
Date: Thu, 22 Nov 2012 23:31:37 +0100 [thread overview]
Message-ID: <50AEA7C9.10208@t-online.de> (raw)
In-Reply-To: <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal>
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
-------- Original Message --------
Subject: Small modification to sh-script, to cover unsupported case label
Date: Thu, 22 Nov 2012 15:53:25 +0000
From: Ivan Kelly <ivan@ivankelly.net>
To: Daniel Pfeiffer <occitan@esperanto.org>
Hi,
I ran into an issue with the sh-mode today with case labels.
case $X in
foo)
do_something
;;
arg=*)
do_something_else_based_on_arg
;;
*)
default
;;
esac
Indention will mess up on the second label, due to the =
This can be fixed by adding a = to the skip-chars-backwards in
sh-font-lock-parens;
i.e.
(defun sh-font-lock-paren (start)
(save-excursion
(goto-char start)
;; Skip through all patterns
(while
(progn
(forward-comment (- (point-max)))
;; Skip through one pattern
(while
(or (/= 0 (skip-syntax-backward "w_"))
(/= 0 (skip-chars-backward "?[]*@/\\="))
(and (sh-is-quoted-p (1- (point)))
...
Also, I'm finding indent-tabs-mode is being reset by sh-mode. Do you
know what could be causing this?
Regards
Ivan
[-- Attachment #2: Type: text/html, Size: 2202 bytes --]
next parent reply other threads:[~2012-11-22 22:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal>
2012-11-22 22:31 ` Daniel Pfeiffer [this message]
2012-11-23 2:16 ` bug#12963: Fwd: Small modification to sh-script, to cover unsupported case label Stefan Monnier
2012-11-23 9:04 ` Ivan Kelly
2012-11-23 15:53 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50AEA7C9.10208@t-online.de \
--to=occitan@t-online.de \
--cc=12963@debbugs.gnu.org \
--cc=ivan@ivankelly.net \
--cc=occitan@esperanto.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).