Xref: utzoo gnu.emacs:3938 comp.emacs:9119 Path: utzoo!utgpu!watserv1!watmath!uunet!crdgw1!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!pt.cs.cmu.edu!a.gp.cs.cmu.edu!shivers From: shivers@a.gp.cs.cmu.edu (Olin Shivers) Newsgroups: gnu.emacs,comp.emacs Subject: cmulisp.el bug report and fix Message-ID: <10534@pt.cs.cmu.edu> Date: 21 Sep 90 03:15:47 GMT Organization: Carnegie-Mellon University, CS/RI Lines: 20 There is a bug in cmulisp.el: the function lisp-fn-called-at is missing a save-restriction form. The following function is the correct version. The only difference is the save-restriction form. This bug and fix was reported by Lennart Staflin. The sources available by anonymous ftp from CMU have the fix installed. -Olin (defun lisp-fn-called-at-pt () "Returns the name of the function called in the current call. Nil if it can't find one." (condition-case nil (save-excursion (save-restriction (narrow-to-region (max (point-min) (- (point) 1000)) (point-max)) (backward-up-list 1) (forward-char 1) (let ((obj (read (current-buffer)))) (and (symbolp obj) obj)))) (error nil)))