emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

somewhat-broken `recenter' or `find-function-on-key' in CVS


From: D . Goel
Subject: somewhat-broken `recenter' or `find-function-on-key' in CVS
Date: 12 May 2003 15:27:29 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings

Create a file ~/test.el with the following contents. Insert 100
newlines at the beginning of a file.  Eval the file using the current
emacs cvs.

====================================================
;; content:
(defun foo ()
  (interactive)
  (message "foo called"))

(global-set-key [f8 f8] 'foo)

====================================================


Now 

 emacscvs (-q -no-site-file) 
 M-x load-file ~/test.el
 C-x C-f ~/test.el
 M-< 
 M-x find-function-on-key f8 f8 

Emacscvs does *not* take you to the definition of foo.  Instead, you
are stuck at the beginning of the file.

Emacs21.2 does do the right thing.  


Debugging:

 I could find no difference in the function definitions. 
 The behavior of 21.2 and CVS differ at the line
       (recenter find-function-recenter-line)
        
 in the definition of find-function-do-it.  The latter variable being
 bound to 1 in both.
 
 21.2. rightly recenters to the requested line at this point, whereas
       the CVS keeps you at the beginning of buffer.

(recenter) is a build-in function, that is where the bug must lie.. 



(FWIW, A way to get around the bug will is to make
 (find-function-on-key) switch to a temporary buffer before doing its
 thing).

thanks

DG                                 http://gnufans.net/
--




reply via email to

[Prev in Thread] Current Thread [Next in Thread]