diff options
Diffstat (limited to 'lisp/progmodes/make-mode.el')
-rw-r--r-- | lisp/progmodes/make-mode.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index b8336691307..11ae1c66aa7 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1833,6 +1833,10 @@ If it isn't in one, return nil." ;; Don't keep looking across a blank line or comment. (looking-at "$\\|#") (not (zerop (forward-line -1)))))) + ;; Remove leading and trailing whitespace. + (when found + (setq found (replace-regexp-in-string "[ \t]+\\'" "" found)) + (setq found (replace-regexp-in-string "\\`[ \t]+" "" found))) found))) (provide 'make-mode) |