[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
makefile filling indented comment
From: |
Kevin Ryde |
Subject: |
makefile filling indented comment |
Date: |
Tue, 24 Apr 2007 10:28:57 +1000 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) |
In a recent cvs build, with a Makefile containing
foo:
# `|| true' prevents old Bash versions
# from getting confused
# by an error.
echo hi
and with point at the start of the second line, a fill
M-q
does nothing, where I hoped it would join and fill the three comment
lines.
The comment lint indentation above is with spaces, I think that's
allowed (by gnu make at least, as described under "Makefile Contents"
in its manual, and accepted when run).
If the indentation is tabs instead it doesn't work either. It'd be
nice if it did. I know tabbed comments create shell commands, and so
are often not what you want, but the force of pressing tab is pretty
strong (for instance emacs lisp/Makefile.in has one under
"compile-always"). Occasionally it's nice to let a comment echoed
while doing the make too.
Perhaps a change as simple as the following (but I'm not a big user of
the native fill prefix stuff, so don't really know if it's enough).
*** make-mode.el 12 Mar 2007 10:16:19 +1100 1.121
--- make-mode.el 23 Apr 2007 16:41:26 +1000
***************
*** 1304,1310 ****
(save-excursion
(beginning-of-line)
(cond
! ((looking-at "^#+\\s-*")
;; Found a comment. Return nil to let normal filling take place.
nil)
--- 1304,1310 ----
(save-excursion
(beginning-of-line)
(cond
! ((looking-at "^[ \t]*#+\\s-*")
;; Found a comment. Return nil to let normal filling take place.
nil)
In GNU Emacs 22.0.98.2 (i586-pc-linux-gnu, GTK+ Version 2.8.20)
of 2007-04-18 on blah
configured using `configure 'CFLAGS=-O' '--prefix=/down/emacs/b/inst'
'--with-x-toolkit=gtk''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_AU
locale-coding-system: iso-8859-1
default-enable-multibyte-characters: t
- makefile filling indented comment,
Kevin Ryde <=