unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* makefile-dependency-regex
@ 2005-08-26 15:08 Sam Steingold
  2005-08-28  2:46 ` makefile-dependency-regex Richard M. Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Steingold @ 2005-08-26 15:08 UTC (permalink / raw)


I noticed that add-change-log-entry in a makefile recently started to
include trailing whitespaces:
For a rule

foo : bar
	zot bar > foo

it generated a changelog entry

	* Makefile (foo ): ...

these two changes appear relevant:

2005-06-08  Richard M. Stallman  <rms@gnu.org>

	(makefile-dependency-regex): Delete spurious `bb'.

2005-06-06  Richard M. Stallman  <rms@gnu.org>

	* progmodes/make-mode.el (makefile-dependency-regex): Handle whitespace
	just like other allowed characters.

Alas, I do not grok this huge regex...


-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.savegushkatif.org> <http://www.memri.org/>
<http://pmw.org.il/> <http://ffii.org/> <http://www.camera.org>
Stupidity, like virtue, is its own reward.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: makefile-dependency-regex
  2005-08-26 15:08 makefile-dependency-regex Sam Steingold
@ 2005-08-28  2:46 ` Richard M. Stallman
  2005-08-28  3:31   ` makefile-dependency-regex Sam Steingold
  0 siblings, 1 reply; 3+ messages in thread
From: Richard M. Stallman @ 2005-08-28  2:46 UTC (permalink / raw)
  Cc: emacs-devel

Does this fix it?

*** make-mode.el	01 Aug 2005 11:11:11 -0400	1.106
--- make-mode.el	27 Aug 2005 21:10:45 -0400	
***************
*** 1833,1838 ****
--- 1833,1841 ----
  		      ;; Don't keep looking across a blank line or comment.
  		      (looking-at "$\\|#")
  		      (not (zerop (forward-line -1))))))
+       (when found
+ 	(setq found (replace-regexp-in-string "[ \t]+\\'" "" found))
+ 	(setq found (replace-regexp-in-string "\\`[ \t]+" "" found)))
        found)))
  
  (provide 'make-mode)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: makefile-dependency-regex
  2005-08-28  2:46 ` makefile-dependency-regex Richard M. Stallman
@ 2005-08-28  3:31   ` Sam Steingold
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Steingold @ 2005-08-28  3:31 UTC (permalink / raw)
  Cc: emacs-devel

> * Richard M. Stallman <ezf@tah.bet> [2005-08-27 22:46:13 -0400]:
>
> Does this fix it?
>
> *** make-mode.el	01 Aug 2005 11:11:11 -0400	1.106
> --- make-mode.el	27 Aug 2005 21:10:45 -0400	
> ***************
> *** 1833,1838 ****
> --- 1833,1841 ----
>   		      ;; Don't keep looking across a blank line or comment.
>   		      (looking-at "$\\|#")
>   		      (not (zerop (forward-line -1))))))
> +       (when found
> + 	(setq found (replace-regexp-in-string "[ \t]+\\'" "" found))
> + 	(setq found (replace-regexp-in-string "\\`[ \t]+" "" found)))
>         found)))
>   
>   (provide 'make-mode)

yes, thanks.
if would be nice to provide a function string-trim what would do
something like this (some packages have to do that themselves, like
bbdb-string-trim)

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.openvotingconsortium.org/> <http://www.jihadwatch.org/>
<http://www.camera.org> <http://www.honestreporting.com> <http://pmw.org.il/>
Incorrect time synchronization.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-28  3:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-26 15:08 makefile-dependency-regex Sam Steingold
2005-08-28  2:46 ` makefile-dependency-regex Richard M. Stallman
2005-08-28  3:31   ` makefile-dependency-regex Sam Steingold

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).