Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!BBN.COM!gildea From: gildea@BBN.COM (Stephen Gildea) Newsgroups: gnu.emacs.bug Subject: shell should use run-hooks to call hook function Message-ID: <8901091949.AA03860@prep.ai.mit.edu> Date: 9 Jan 89 19:48:25 GMT Sender: news@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 40 GNU Emacs 18.52.1 of Tue Sep 6 1988 on alexander.bbn.com (berkeley-unix) shell-send-input calls shell-set-directory-error-hook with funcall instead of run-hooks. This requires the hook, even if unused, to be a valid function. < Stephen diff -c2 /usr/local/emacs/lisp/shell.el shell.el *** /usr/local/emacs/lisp/shell.el Sun Jul 3 10:37:12 1988 --- shell.el Mon Jan 9 14:43:20 1989 *************** *** 186,190 buffer)) ! (defvar shell-set-directory-error-hook 'ignore "Function called with no arguments when shell-send-input recognizes a change-directory command but gets an error --- 186,190 ----- buffer)) ! (defvar shell-set-directory-error-hook nil "Function called with no arguments when shell-send-input recognizes a change-directory command but gets an error *************** *** 226,230 (goto-char last-input-start) (shell-set-directory)) ! (error (funcall shell-set-directory-error-hook))) (let ((process (get-buffer-process (current-buffer)))) (process-send-region process last-input-start last-input-end) --- 226,230 ----- (goto-char last-input-start) (shell-set-directory)) ! (error (run-hooks shell-set-directory-error-hook))) (let ((process (get-buffer-process (current-buffer)))) (process-send-region process last-input-start last-input-end)