mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 13:57:36 +00:00
Further tweaks to sh-script \ #foo font locking
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Tweak previous \ #foo change to work on all quoted characters, but check that the backslash itself is not backslashed. Regexp from Stefan Monnier.
This commit is contained in:
parent
bdb33af39d
commit
d630a047bb
1 changed files with 4 additions and 2 deletions
|
|
@ -1140,8 +1140,10 @@ subshells can nest."
|
|||
;; beginning of a word. In the shell, words are separated by
|
||||
;; metacharacters. 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 "_"))
|
||||
;; `quoting') but with `$' removed. Also -- if there's something like
|
||||
;; \ #foo, then that's not a comment, unless the backslash itself
|
||||
;; is backslashed.
|
||||
("\\(?:[^|&;<>(`\\\"' \t\n]\\|\\${\\|\\(?:[^\\]\\|^\\)\\\\\\(?:\\\\\\\\\\)*.\\)\\(#+\\)" (1 "_"))
|
||||
;; In addition, `#' at the beginning of closed parentheses
|
||||
;; does not start a comment if the parentheses are not isolated
|
||||
;; by metacharacters, excluding [()].
|
||||
|
|
|
|||
Loading…
Reference in a new issue