GNU bug report logs -
#5327
23.1; unload-feature-special-hooks add fill-nobreak-predicate
Previous Next
Reported by: Kevin Ryde <user42 <at> zip.com.au>
Date: Tue, 5 Jan 2010 23:40:02 UTC
Severity: minor
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5327 in the body.
You can then email your comments to 5327 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5327
; Package
emacs
.
(Tue, 05 Jan 2010 23:40:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kevin Ryde <user42 <at> zip.com.au>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 05 Jan 2010 23:40:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
While nosing around the unload-feature stuff I wondered if
unload-feature-special-hooks should include fill-nobreak-predicate, as
it's a hook now.
The damage from leaving an unloaded func there is limited to paragraph
filling, and is likely to be either buffer local, or be autoloaded and
then end up ok anyway. You can see a bad effect currently for instance
with
M-x sgml-mode
M-x unload-feature sgml-mode
type in a long line to be filled
M-q
=> Symbol's function definition is void: sgml-fill-nobreak
In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5)
of 2009-09-14 on raven, modified by Debian
configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5327
; Package
emacs
.
(Wed, 06 Jan 2010 01:31:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 5327 <at> debbugs.gnu.org (full text, mbox):
On Wed, Jan 6, 2010 at 00:38, Kevin Ryde <user42 <at> zip.com.au> wrote:
> While nosing around the unload-feature stuff I wondered if
> unload-feature-special-hooks should include fill-nobreak-predicate, as
> it's a hook now.
It's a hook or hook-like, and its name does not end in -hooks?, so yes.
As an aside, perhaps unload-feature should also remove automatically
unloaded funcs from symbols called *-functions, which would eliminate
much cruft from `unload-feature-special-hooks'. The question is
whether there are many variables called -functions which are not
really hooks.
Juanma
Severity set to 'minor' from 'normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 07 Jan 2010 21:47:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5327
; Package
emacs
.
(Fri, 08 Jan 2010 21:29:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 5327 <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
>
> The question is
> whether there are many variables called -functions which are not
> really hooks.
That'd be the dangerous bit. I've got a defconst called -functions in
some of my code, but it wouldn't be hurt.
Those with a custom-type of 'hook or '(repeat function) could be likely.
In fact any var with that custom-type might be ok to act on. A grep
finds me three called -functions (code below)
find-directory-functions
auto-coding-functions
compile-command-default-functions
of which auto-coding-functions may be the only important one not
presently in unload-feature-special-hooks.
(pp (let (ret)
(mapatoms (lambda (sym)
(and (boundp sym)
(get sym 'custom-type)
(not (memq sym unload-feature-special-hooks))
(string-match "-functions\\'" (symbol-name sym))
(push (list sym (get sym 'custom-type)) ret))))
ret)
(current-buffer))
Reply sent
to
Juanma Barranquero <lekktu <at> gmail.com>
:
You have taken responsibility.
(Mon, 11 Jul 2011 16:26:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kevin Ryde <user42 <at> zip.com.au>
:
bug acknowledged by developer.
(Mon, 11 Jul 2011 16:26:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 5327-done <at> debbugs.gnu.org (full text, mbox):
On Wed, Jan 6, 2010 at 00:38, Kevin Ryde <user42 <at> zip.com.au> wrote:
> M-x sgml-mode
> M-x unload-feature sgml-mode
> type in a long line to be filled
> M-q
> => Symbol's function definition is void: sgml-fill-nobreak
`fill-nobreak-predicate' was set locally, so it would be removed when
the mode for the buffer was changed. Previously, `unload-feature'
failed to do so unless the mode package's FEATURE-unload-function,
assuming one existed, did by itself. Since revno:104702
`unload-feature' does so automatically, so the above case should work
(i.e, unloading sgml-mode will change the buffer's major mode to
text-mode).
That said, I'll add that variable and some of the others you mentioned
to `unload-feature-special-hooks' because it's better to be safe than
sorry. But, what would be nice is some way to identify hook variables
in a generic way, instead of special-casing still more of them. :-(
> find-directory-functions
> auto-coding-functions
OK.
> compile-command-default-functions
I cannot find that one in the Emacs sources.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5327
; Package
emacs
.
(Sat, 16 Jul 2011 01:53:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 5327 <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
>
>> compile-command-default-functions
>
> I cannot find that one in the Emacs sources.
Ah yes, sorry, that's one of my own slipped through.
(Which I jigged up to add to unload-feature-special-hooks too anyway.)
--
The sigfile one-line movie reviews series:
"Les Amants du Pont Neuf" -- fine sequel to Les Amants du Pont Huit.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 13 Aug 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 286 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.