* Re: makefile filling indented comment
[not found] ` <E1HgiqQ-0003L2-QA@fencepost.gnu.org>
@ 2008-04-06 22:56 ` Kevin Ryde
0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2008-04-06 22:56 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 701 bytes --]
(I raised this on emacs-pretest a while back, Richard asked to wait
until after 22.1.)
In a makefile like below, with point at the start of the second line,
it'd be nice if M-q would fill the indented comment lines. I get some
joy from the change below (or maybe \s- instead of only space and tab).
(Indented comments are run as shell commands, so I'm not certain you'd
want to do it if maximum portability was a concern, but getting bits
like this echoed can be good as a kind of printing comment.)
2008-04-07 Kevin Ryde <user42@zip.com.au>
* progmodes/make-mode.el (makefile-fill-paragraph): Let indented "#"
comments go through to normal filling, not just those at the start of
a line.
[-- Attachment #2: makefile --]
[-- Type: application/octet-stream, Size: 135 bytes --]
foo:
# this is an indented comment, which means it will echo when run, which emacs could
# helpfully fill with M-q
echo "blah blah"
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: make-mode.el.indent-comment-fill.diff --]
[-- Type: text/x-diff, Size: 515 bytes --]
*** make-mode.el 27 Mar 2008 11:51:56 +1100 1.124
--- make-mode.el 07 Apr 2008 08:07:29 +1000
***************
*** 1352,1358 ****
(save-excursion
(beginning-of-line)
(cond
! ((looking-at "^#+\\s-*")
;; Found a comment. Return nil to let normal filling take place.
nil)
--- 1352,1358 ----
(save-excursion
(beginning-of-line)
(cond
! ((looking-at "^[ \t]*#+\\s-*")
;; Found a comment. Return nil to let normal filling take place.
nil)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-06 22:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87fy6q8vjq.fsf@zip.com.au>
[not found] ` <E1HgiqQ-0003L2-QA@fencepost.gnu.org>
2008-04-06 22:56 ` makefile filling indented comment Kevin Ryde
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.