* Comment filling @ 2004-02-24 21:17 Michael Mauger 2004-02-25 19:51 ` Stefan Monnier 2004-03-04 22:50 ` Stefan Monnier 0 siblings, 2 replies; 4+ messages in thread From: Michael Mauger @ 2004-02-24 21:17 UTC (permalink / raw) RMS forwarded me a bug report on sql.el related to filling text in comments in sql. I was asked to DTRT and confirmed that sql-mode was behaving the same as c-mode did. So I felt sql-mode was DTRT. I took a step back and decided I'd try running this past the knowledgable masses. With auto-fill-mode set off, I type the following in a sql-mode buffer: -- This comment should be filled to multiple lines If I then type M-q (fill-paragraph), I get: -- This comment should be filled to multiple lines If, however, I have set `auto-fill-mode' on, I would get: -- This comment should be filled to -- multiple lines Which is what I want. Is this a bug in `fill-paragraph' or is there something I can do in sql-mode to get the desired `fill-paragraph' behavior? BTW, the bug report and my testing was CVS emacs 21.3.50. I don't have an older emacs to test it. TIA --M __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Comment filling 2004-02-24 21:17 Comment filling Michael Mauger @ 2004-02-25 19:51 ` Stefan Monnier 2004-03-04 22:50 ` Stefan Monnier 1 sibling, 0 replies; 4+ messages in thread From: Stefan Monnier @ 2004-02-25 19:51 UTC (permalink / raw) Cc: emacs-devel > I took a step back and decided I'd try running this past the knowledgable > masses. > With auto-fill-mode set off, I type the following in a sql-mode buffer: > -- This comment should be filled to multiple lines > If I then type M-q (fill-paragraph), I get: > -- This comment should be filled to > multiple lines > If, however, I have set `auto-fill-mode' on, I would get: > -- This comment should be filled to > -- multiple lines > Which is what I want. > Is this a bug in `fill-paragraph' or is there something I can do in > sql-mode to get the desired `fill-paragraph' behavior? It's a bug in sql-mode: it forgets to set comment-start-skip. Stefan PS: By the way, here is an unrelated patch, for those cases where define-abbrev is not a `subr' (e.g. it has been redefined in elisp for example via defadvice). --- orig/lisp/progmodes/sql.el +++ mod/lisp/progmodes/sql.el @@ -1,6 +1,6 @@ ;;; sql.el --- specialized comint.el for SQL interpreters -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1998,1999,2000,01,02,03,2004 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Maintainer: Michael Mauger <mmaug@yahoo.com> @@ -830,22 +830,14 @@ "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") (if sql-mode-abbrev-table () - (let ((nargs (cdr (subr-arity (symbol-function 'define-abbrev)))) - d-a) - ;; In Emacs 21.3+, provide SYSTEM-FLAG to define-abbrev. - (setq d-a - (if (>= nargs 6) - '(lambda (name expansion) (define-abbrev sql-mode-abbrev-table name expansion nil 0 t)) - '(lambda (name expansion) (define-abbrev sql-mode-abbrev-table name expansion)))) - - (define-abbrev-table 'sql-mode-abbrev-table nil) - (funcall d-a "ins" "insert") - (funcall d-a "upd" "update") - (funcall d-a "del" "delete") - (funcall d-a "sel" "select") - (funcall d-a "proc" "procedure") - (funcall d-a "func" "function") - (funcall d-a "cr" "create"))) + (define-abbrev-table 'sql-mode-abbrev-table + '(("ins" "insert" nil nil t) + ("upd" "update" nil nil t) + ("del" "delete" nil nil t) + ("sel" "select" nil nil t) + ("proc" "procedure" nil nil t) + ("func" "function" nil nil t) + ("cr" "create" nil nil t)))) ;; Syntax Table ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Comment filling 2004-02-24 21:17 Comment filling Michael Mauger 2004-02-25 19:51 ` Stefan Monnier @ 2004-03-04 22:50 ` Stefan Monnier 2004-03-05 23:46 ` Michael Mauger 1 sibling, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2004-03-04 22:50 UTC (permalink / raw) Cc: emacs-devel > RMS forwarded me a bug report on sql.el related to filling text in > comments in sql. I was asked to DTRT and confirmed that sql-mode was > behaving the same as c-mode did. So I felt sql-mode was DTRT. > I took a step back and decided I'd try running this past the knowledgable > masses. > With auto-fill-mode set off, I type the following in a sql-mode buffer: > -- This comment should be filled to multiple lines > If I then type M-q (fill-paragraph), I get: > -- This comment should be filled to > multiple lines > If, however, I have set `auto-fill-mode' on, I would get: > -- This comment should be filled to > -- multiple lines > Which is what I want. This should be fixed now. Could you confirm it? Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Comment filling 2004-03-04 22:50 ` Stefan Monnier @ 2004-03-05 23:46 ` Michael Mauger 0 siblings, 0 replies; 4+ messages in thread From: Michael Mauger @ 2004-03-05 23:46 UTC (permalink / raw) Cc: emacs-devel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 992 bytes --] --- Stefan Monnier wrote: > > RMS forwarded me a bug report on sql.el related to filling text in > > comments in sql. I was asked to DTRT and confirmed that sql-mode was > > behaving the same as c-mode did. So I felt sql-mode was DTRT. > > I took a step back and decided I'd try running this past the > > knowledgable masses. > > With auto-fill-mode set off, I type the following in a sql-mode > > buffer: > > -- This comment should be filled to multiple lines > > If I then type M-q (fill-paragraph), I get: > > -- This comment should be filled to > > multiple lines > > If, however, I have set `auto-fill-mode' on, I would get: > > -- This comment should be filled to > > -- multiple lines > > Which is what I want. > > This should be fixed now. Could you confirm it? > It seems to work now without setting `comment-start-skip' -- thanks. __________________________________ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-05 23:46 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-02-24 21:17 Comment filling Michael Mauger 2004-02-25 19:51 ` Stefan Monnier 2004-03-04 22:50 ` Stefan Monnier 2004-03-05 23:46 ` Michael Mauger
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.