From: Richard M. Stallman Date: Fri, 9 Sep 2005 01:24:59 +0000 (+0000) Subject: (makefile-add-log-defun): Trim the result. X-Git-Tag: emacs-pretest-22.0.90~7214 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cac9ce0d76e2eaf9ca180a6f3d207a9e2ec3d001;p=emacs.git (makefile-add-log-defun): Trim the result. --- 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)