all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Info-clone-buffer-hook should be renamed
@ 2007-12-06 21:34 Drew Adams
  2007-12-06 22:33 ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2007-12-06 21:34 UTC (permalink / raw)
  To: Bug-Gnu-Emacs

It is a function, not a variable, so its name should not end in `-hook'.


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'






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

* Re: Info-clone-buffer-hook should be renamed
  2007-12-06 21:34 Info-clone-buffer-hook should be renamed Drew Adams
@ 2007-12-06 22:33 ` Juanma Barranquero
  2007-12-06 22:51   ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2007-12-06 22:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: Bug-Gnu-Emacs

On Dec 6, 2007 10:34 PM, Drew Adams <drew.adams@oracle.com> wrote:

> It is a function, not a variable, so its name should not end in `-hook'.

Like

allout-find-file-hook, calc-graph-kill-hook, completion-c-mode-hook,
completion-find-file-hook, completion-lisp-mode-hook,
cperl-delay-update-hook, cperl-lazy-hook, cvs-ediff-exit-hook,
cvs-ediff-startup-hook, delete-selection-pre-hook,
diff-post-command-hook, ediff-xemacs-select-frame-hook, erc-get-hook,
expand-abbrev-hook, expand-skeleton-end-hook, ffap-gnus-hook,
ffap-ro-mode-hook, flymake-after-save-hook, flymake-find-file-hook,
flymake-kill-buffer-hook, flyspell-auto-correct-previous-hook,
flyspell-hack-local-variables-hook, flyspell-kill-ispell-hook,
flyspell-post-command-hook, flyspell-pre-command-hook,
follow-find-file-hook, follow-post-command-hook, gdb-find-file-hook,
generic-mode-find-file-hook, generic-mode-ini-file-find-file-hook,
gnus-registry-unload-hook, gud-kill-buffer-hook,
hexl-after-revert-hook, hexl-before-revert-hook,
hi-lock-font-lock-hook, hilit-chg-major-mode-hook,
hilit-chg-post-command-hook, hilit-find-file-hook,
idlwave-command-hook, idlwave-comment-hook,
idlwave-user-catalog-command-hook, ido-kill-emacs-hook,
image-dired-dired-after-readin-hook, Info-clone-buffer-hook,
ini-generic-mode-find-file-hook, ini-generic-mode-find-file-hook,
longlines-after-revert-hook, longlines-before-revert-hook,
mail-abbrev-expand-hook, make-local-hook,
mouse-sel-lost-selection-hook,
next-error-follow-mode-post-command-hook, org-add-hook,
org-agenda-post-command-hook, protect-innocence-hook,
ps-gnus-article-prepare-hook, ps-info-mode-hook, ps-rmail-mode-hook,
ps-vm-mode-hook, rcirc-change-major-mode-hook, rcirc-kill-buffer-hook,
reftex-index-post-command-hook, reftex-index-pre-command-hook,
reftex-kill-buffer-hook, reftex-kill-emacs-hook,
reftex-select-post-command-hook, reftex-select-pre-command-hook,
reftex-toc-delete-frame-hook, reftex-toc-post-command-hook,
reftex-toc-pre-command-hook, report-emacs-bug-hook, reporter-bug-hook,
resume-suspend-hook, save-place-find-file-hook,
save-place-kill-emacs-hook, savehist-minibuffer-hook,
ses-command-hook, set-auto-fill-hook, spam-stat-unload-hook,
spam-unload-hook, term-command-hook,
type-break-check-post-command-hook,
type-break-run-tb-post-command-hook, vc-arch-find-file-hook,
vc-default-find-file-hook, vc-default-find-file-not-found-hook,
vc-dired-hook, vc-file-not-found-hook, vc-find-file-hook,
vc-kill-buffer-hook, vc-rcs-find-file-not-found-hook,
vc-svn-find-file-hook, vhdl-template-alias-hook,
vhdl-template-and-hook, vhdl-template-architecture-hook,
vhdl-template-assert-hook, vhdl-template-attribute-hook,
vhdl-template-bare-loop-hook, vhdl-template-block-hook,
vhdl-template-break-hook, vhdl-template-case-hook,
vhdl-template-component-hook,
vhdl-template-conditional-signal-asst-hook,
vhdl-template-configuration-hook, vhdl-template-constant-hook,
vhdl-template-default-hook, vhdl-template-default-indent-hook,
vhdl-template-disconnect-hook, vhdl-template-display-comment-hook,
vhdl-template-else-hook, vhdl-template-elsif-hook,
vhdl-template-entity-hook, vhdl-template-exit-hook,
vhdl-template-file-hook, vhdl-template-for-hook,
vhdl-template-function-hook, vhdl-template-generic-hook,
vhdl-template-group-hook, vhdl-template-if-hook,
vhdl-template-instance-hook, vhdl-template-library-hook,
vhdl-template-limit-hook, vhdl-template-map-hook,
vhdl-template-nand-hook, vhdl-template-nature-hook,
vhdl-template-next-hook, vhdl-template-nor-hook,
vhdl-template-not-hook, vhdl-template-or-hook,
vhdl-template-others-hook, vhdl-template-package-hook,
vhdl-template-port-hook, vhdl-template-procedural-hook,
vhdl-template-procedure-hook, vhdl-template-process-hook,
vhdl-template-quantity-hook, vhdl-template-report-hook,
vhdl-template-return-hook, vhdl-template-selected-signal-asst-hook,
vhdl-template-signal-hook, vhdl-template-subnature-hook,
vhdl-template-subtype-hook, vhdl-template-terminal-hook,
vhdl-template-type-hook, vhdl-template-use-hook,
vhdl-template-variable-hook, vhdl-template-wait-hook,
vhdl-template-when-hook, vhdl-template-while-loop-hook,
vhdl-template-with-hook, vhdl-template-xnor-hook,
vhdl-template-xor-hook, viper-after-change-undo-hook,
viper-comint-mode-hook, viper-minibuffer-standard-hook,
vms-suspend-hook, vms-suspend-resume-hook, which-func-ff-hook,
whitespace-unload-hook, whitespace-write-file-hook

you mean?

             Juanma




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

* RE: Info-clone-buffer-hook should be renamed
  2007-12-06 22:33 ` Juanma Barranquero
@ 2007-12-06 22:51   ` Drew Adams
  2007-12-06 22:57     ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2007-12-06 22:51 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Bug-Gnu-Emacs

> > It is a function, not a variable, so its name should not end in `-hook'.
> 
> Like allout-find-file-hook, calc-graph-kill-hook, ... 
> you mean?

Yep.

It's OK if the function name says to do something with a hook (e.g. `add-hook', `mmm-run-major-mode-hook'), but I don't see it as appropriate for many of those you cited. Just one opinion, of course.

BTW, at least the following functions have no doc string, but they should have one:

delete-selection-pre-hook, delsel-unload-hook, ediff-xemacs-select-frame-hook, Info-clone-buffer-hook, next-error-follow-mode-post-command-hook, ps-gnus-article-prepare-hook, ps-info-mode-hook, ps-rmail-mode-hook, ps-vm-mode-hook, savehist-minibuffer-hook, vc-default-find-file-hook, vc-default-find-file-not-found-hook.





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

* Re: Info-clone-buffer-hook should be renamed
  2007-12-06 22:51   ` Drew Adams
@ 2007-12-06 22:57     ` Juanma Barranquero
  2007-12-06 23:03       ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2007-12-06 22:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: Bug-Gnu-Emacs

On Dec 6, 2007 11:51 PM, Drew Adams <drew.adams@oracle.com> wrote:

> It's OK if the function name says to do something with a hook (e.g. `add-hook', `mmm-run-major-mode-hook'), but I don't see it as appropriate for many of those you cited. Just one opinion, of course.

My point is that using -hook for functions, and specifically for
functions intended to be added to a hook, is a long-standing
convention.

             Juanma




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

* RE: Info-clone-buffer-hook should be renamed
  2007-12-06 22:57     ` Juanma Barranquero
@ 2007-12-06 23:03       ` Drew Adams
  2007-12-06 23:09         ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2007-12-06 23:03 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Bug-Gnu-Emacs

> > It's OK if the function name says to do something with a hook 
> > (e.g. `add-hook', `mmm-run-major-mode-hook'), but I don't see it 
> > as appropriate for many of those you cited. Just one opinion, of
> > course.
> 
> My point is that using -hook for functions, and specifically for
> functions intended to be added to a hook, is a long-standing
> convention.

We agree that there are a lot of them and those names are not new. That doesn't make it a convention. And it doesn't make it good. Anyway, as I say: just one opinion.





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

* Re: Info-clone-buffer-hook should be renamed
  2007-12-06 23:03       ` Drew Adams
@ 2007-12-06 23:09         ` Juanma Barranquero
  2007-12-06 23:34           ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2007-12-06 23:09 UTC (permalink / raw)
  To: Drew Adams; +Cc: Bug-Gnu-Emacs

On Dec 7, 2007 12:03 AM, Drew Adams <drew.adams@oracle.com> wrote:

> We agree that there are a lot of them and those names are not new. That doesn't make it a convention.

A convention does not need to be agreed or codified, it can be also
something generally accepted or done.

             Juanma




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

* RE: Info-clone-buffer-hook should be renamed
  2007-12-06 23:09         ` Juanma Barranquero
@ 2007-12-06 23:34           ` Drew Adams
  0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2007-12-06 23:34 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Bug-Gnu-Emacs

> > We agree that there are a lot of them and those names
> > are not new. That doesn't make it a convention.
> 
> A convention does not need to be agreed or codified, it can be also
> something generally accepted or done.

Agreed. ;-)

And in this case, it is done quite a bit. That doesn't make it good, but it does mean it would be harder to fix.





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

end of thread, other threads:[~2007-12-06 23:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 21:34 Info-clone-buffer-hook should be renamed Drew Adams
2007-12-06 22:33 ` Juanma Barranquero
2007-12-06 22:51   ` Drew Adams
2007-12-06 22:57     ` Juanma Barranquero
2007-12-06 23:03       ` Drew Adams
2007-12-06 23:09         ` Juanma Barranquero
2007-12-06 23:34           ` Drew Adams

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.