projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
571c261
)
Fix incorrect regular expression for more general text replacements.
author
Luke Lee
<luke.lee@synaptics.com>
Wed, 31 Mar 2021 03:22:47 +0000
(11:22 +0800)
committer
Luke Lee
<luke.lee@synaptics.com>
Wed, 31 Mar 2021 03:42:33 +0000
(11:42 +0800)
* lisp/progmodes/hideif.el (hif-evaluate-macro): fix regexp to trim
off leading/trailing spaces, but not within.
lisp/progmodes/hideif.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/hideif.el
b/lisp/progmodes/hideif.el
index 6f1a8781b491e593126722c85a6250c2b610cdb1..0d9b4b7a363ef3a381475b6cbadc050d41f6af38 100644
(file)
--- a/
lisp/progmodes/hideif.el
+++ b/
lisp/progmodes/hideif.el
@@
-1600,7
+1600,7
@@
not be expanded."
(result (funcall hide-ifdef-evaluator expr))
(exprstring (replace-regexp-in-string
;; Trim off leading/trailing whites
- "^[ \t]*\\
([^ \t]+\\)[ \t]*" "\\1
"
+ "^[ \t]*\\
|[ \t]*$" "
"
(replace-regexp-in-string
"\\(//.*\\)" "" ; Trim off end-of-line comments
(buffer-substring-no-properties start end)))))