[emacs-w3m:13455] unnecessary/unused hook?
Boruch Baum <[email protected]>
| Newsgroups | gmane.emacs.w3m |
|---|---|
| Message-ID | <[email protected]> |
Variable w3m-select-buffer-mode-hook is never explictly defined (compare to defcustom w3m-select-buffer-hook) but is referenced. The only time a value is assigned to it seems to be for xemacs. Should it be explicitly defined? Should it be removed as cruft from when the project was supporting xemacs? 8< ------------------------------------------------------------------ >8 w3m.el:11386: (w3m-run-mode-hooks 'w3m-select-buffer-mode-hook)) w3m-xmas.el:768: (add-hook 'w3m-select-buffer-mode-hook 'w3m-setup-tab-in-gutter) 8< ------------------------------------------------------------------ >8 This was all coded very long (12-14 years) ago: 8< ------------------------------------------------------------------ >8 $ git blame -L 11386,+1 -- w3m.el 8933820da (Katsumi Yamaoka 2005-05-30 06:47:23 +0000 11386) $ git blame -L 768,+1 -- w3m-xmas.el 11faaaaa1 (Katsumi Yamaoka 2007-01-30 11:00:52 +0000 768) 8< ------------------------------------------------------------------ >8 Also, the hook is being run using function w3m-run-mode-hooks instead of just run-mode-hooks, but is that ever necessary in any recent version of emac-sen? 8< ------------------------------------------------------------------ >8 w3m.el 9098: (w3m-run-mode-hooks 'w3m-mode-hook)) w3m.el 11386: (w3m-run-mode-hooks 'w3m-select-buffer-mode-hook)) w3m-form.el 1703: (w3m-run-mode-hooks 'w3m-form-input-select-mode-hook)) w3m-form.el 1873: (w3m-run-mode-hooks 'w3m-form-input-map-mode-hook)) w3m-util.el 1377:(defun w3m-run-mode-hooks (&rest funcs) 8< ------------------------------------------------------------------ >8 -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0