unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1756: awk-mode: An empty line is not a paragraph separator (should be)
@ 2009-01-01  8:27 Teemu Likonen
  2009-01-05 16:12 ` Alan Mackenzie
  2009-01-05 18:35 ` Alan Mackenzie
  0 siblings, 2 replies; 8+ messages in thread
From: Teemu Likonen @ 2009-01-01  8:27 UTC (permalink / raw)
  To: bug-gnu-emacs

In awk-mode an empty line is not considered a paragraph separator, only
lines containing whitespace and "#" character(s) are. After running the
command "M-x awk-mode" the value of both paragraph-start and
paragraph-separate are set as follows:

    "[ \t]*\\(#+\\)[ \t]*$\\|^\f"
              ^^

See, at least one # is required. I think better default would be #* so
that empty lines or lines with only whitespace would be paragraph
separators too. I suggest doing the following change:


diff --git i/lisp/progmodes/cc-vars.el w/lisp/progmodes/cc-vars.el
index 18f314c..62c85f0 100644
--- i/lisp/progmodes/cc-vars.el
+++ w/lisp/progmodes/cc-vars.el
@@ -483,7 +483,7 @@ style comments."
 
 (defcustom-c-stylevar c-comment-prefix-regexp
   '((pike-mode . "//+!?\\|\\**")
-    (awk-mode . "#+")
+    (awk-mode . "#*")
     (other . "//+\\|\\**"))
   "*Regexp to match the line prefix inside comments.
 This regexp is used to recognize the fill prefix inside comments for


(pike-mode and "other" have a comment prefix regexp which matches a zero
number of comment prefix characters: \**)


There is another and related bug. It is possible to configure the
comment prefix regexp with the option c-comment-prefix-regexp. But the
problem is that the option only takes effect when awk-mode is turned on.
If user later changes indentation style with the command c-set-style
(bound to C-c .) then it seems that the hard-coded default (#+) takes
preference over user's c-comment-prefix-regexp settings.







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

end of thread, other threads:[~2009-01-08 16:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-01  8:27 bug#1756: awk-mode: An empty line is not a paragraph separator (should be) Teemu Likonen
2009-01-05 16:12 ` Alan Mackenzie
2009-01-05 17:53   ` Teemu Likonen
2009-01-05 18:35 ` Alan Mackenzie
2009-01-05 18:38   ` Teemu Likonen
2009-01-06 16:15     ` Alan Mackenzie
2009-01-07 16:32       ` Teemu Likonen
2009-01-08 16:25         ` Alan Mackenzie

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).