]> git.eshelyaron.com Git - emacs.git/commitdiff
(makefile-add-log-defun): Trim the result.
authorRichard M. Stallman <rms@gnu.org>
Fri, 9 Sep 2005 01:24:59 +0000 (01:24 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 9 Sep 2005 01:24:59 +0000 (01:24 +0000)
lisp/progmodes/make-mode.el

index b8336691307863839dbe61991d308663530c3cea..11ae1c66aa73a7036c55618ba817882d19d27fd8 100644 (file)
@@ -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)