diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-09-17 16:08:20 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-09-17 16:09:39 -0700 |
commit | 284c470ef752967fcd8bae6a450dc138462b1e49 (patch) | |
tree | 83e8bcfe4c756e741ee9d4ecdf80f6b8d0e73c91 /lisp/progmodes/js.el | |
parent | d149ff5233805c0a09b6067e0cf27549291cc83a (diff) | |
download | emacs-284c470ef752967fcd8bae6a450dc138462b1e49.tar.gz emacs-284c470ef752967fcd8bae6a450dc138462b1e49.tar.bz2 emacs-284c470ef752967fcd8bae6a450dc138462b1e49.zip |
Backslash cleanup in Elisp source files
This patch should not change behavior. It typically omits backslashes
where they are redundant (e.g., in the string literal "^\$").
In a few places, insert backslashes where they make regular
expressions clearer: e.g., replace "^\*" (equivalent to "^*") with
"^\\*", which has the same effect as a regular expression.
Also, use ‘\ %’ instead of ‘\%’ when avoiding confusion with SCCS IDs,
and similarly use ‘\ $’ instead of ‘\$’ when avoiding confusion with
RCS IDs, as that makes it clearer that the backslash is intended.
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r-- | lisp/progmodes/js.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 98a22dd8441..71d0229471a 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -126,7 +126,7 @@ An example of this is \"Class.prototype = { method1: ...}\".") (defconst js--prototype-objextend-class-decl-re-2 (concat "^\\s-*\\(?:var\\s-+\\)?" "\\(" js--dotted-name-re "\\)" - "\\s-*=\\s-*Object\\.extend\\s-*\(")) + "\\s-*=\\s-*Object\\.extend\\s-*(")) ;; var NewClass = Class.create({ (defconst js--prototype-class-decl-re @@ -639,7 +639,7 @@ enabled frameworks." (js--maybe-join "\\(?:var[ \t]+\\)?[a-zA-Z_$0-9.]+[ \t]*=[ \t]*\\(?:" "\\|" - "\\)[ \t]*\(" + "\\)[ \t]*(" (when (memq 'prototype js-enabled-frameworks) "Class\\.create") @@ -651,10 +651,10 @@ enabled frameworks." "[a-zA-Z_$0-9]+\\.extend\\(?:Final\\)?")) (when (memq 'dojo js-enabled-frameworks) - "dojo\\.declare[ \t]*\(") + "dojo\\.declare[ \t]*(") (when (memq 'mochikit js-enabled-frameworks) - "MochiKit\\.Base\\.update[ \t]*\(") + "MochiKit\\.Base\\.update[ \t]*(") ;; mumble.prototypeTHING (js--maybe-join @@ -662,7 +662,7 @@ enabled frameworks." (when (memq 'javascript js-enabled-frameworks) '( ;; foo.prototype.bar = function( - "\\.[a-zA-Z_$0-9]+[ \t]*=[ \t]*function[ \t]*\(" + "\\.[a-zA-Z_$0-9]+[ \t]*=[ \t]*function[ \t]*(" ;; mumble.prototype = { "[ \t]*=[ \t]*{"))))) |