GNU bug report logs -
#10772
24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode
Previous Next
Reported by: William Stevenson <yhvh2000 <at> gmail.com>
Date: Thu, 9 Feb 2012 06:51:01 UTC
Severity: minor
Tags: fixed, patch
Found in version 24.0.93
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #17 received at 10772 <at> debbugs.gnu.org (full text, mbox):
> --8<---------------cut here---------------start------------->8---
> (set (make-local-variable 'normal-auto-fill-function) 'foo-do-auto-fill)
> --8<---------------cut here---------------end--------------->8---
> These 3 modes (and some others from cursory checking) don't define
> foo-auto-fill-mode and just let the user call auto-fill-mode - which
> makes me wonder if defining tcl-auto-fill-mode is the right thing to do
> anyway.
Actually, thinking about it some more, maybe tcl-auto-fill-mode should
be renamed (it has nothing specific to Tcl) and I think it could be
implemented along the lines of (100% untested):
(define-minor-mode auto-fill-noncode-mode
:variable
((and auto-fill-function comment-auto-fill-only-comments)
. (lambda (x)
(auto-fill-mode (if x 1 -1))
(if auto-fill-function
(set (make-local-variable 'comment-auto-fill-only-comments) t)
(kill-local-variable 'comment-auto-fill-only-comments)))))
-- Stefan
This bug report was last modified 8 years and 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.