[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a couple of bugs in bash indentation
From: |
Stefan Monnier |
Subject: |
Re: a couple of bugs in bash indentation |
Date: |
Tue, 22 Nov 2005 14:15:43 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> I was looking at that when I found that (It could have been fixed
> recently, I don't have updated for a week)
> echo '\'
> echo 'Hoho !'
> completely screws the thing. \' doesn't escape the ' in shell AFAIK.
Does the patch below help?
Stefan
--- sh-script.el 21 nov 2005 23:21:26 -0500 1.172
+++ sh-script.el 22 nov 2005 14:15:10 -0500
@@ -1002,6 +1002,8 @@
;; The list of special chars is taken from the single-unix spec
;; of the shell command language (under `quoting') but with `$' removed.
`(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 ,sh-st-symbol)
+ ;; In a '...' the backslash is not escaping.
+ ("\\(\\\\\\)'" 1 ,sh-st-punc)
;; Make sure $@ and @? are correctly recognized as sexps.
("\\$\\(address@hidden)" 1 ,sh-st-symbol)
;; Find HEREDOC starters and add a corresponding rule for the ender.