Mercurial > emacs
comparison lisp/emacs-lisp/find-func.el @ 24062:dd143e80ffcf
(find-function-on-key): Fix previous
change.
author | Dave Love <fx@gnu.org> |
---|---|
date | Wed, 13 Jan 1999 12:42:28 +0000 |
parents | 25a9e0ae5c91 |
children | 93dbc4684ddf |
comparison
equal
deleted
inserted
replaced
24061:c8311bcddab2 | 24062:dd143e80ffcf |
---|---|
350 (defun find-function-on-key (key) | 350 (defun find-function-on-key (key) |
351 "Find the function that KEY invokes. KEY is a string. | 351 "Find the function that KEY invokes. KEY is a string. |
352 Point is saved if FUNCTION is in the current buffer." | 352 Point is saved if FUNCTION is in the current buffer." |
353 (interactive "kFind function on key: ") | 353 (interactive "kFind function on key: ") |
354 (save-excursion | 354 (save-excursion |
355 (let* ((event (aref key 0)) | 355 (let* ((event (and (eventp key) (aref key 0))) ; Null event OK below. |
356 (start (event-start event)) | 356 (start (event-start event)) |
357 (modifiers (event-modifiers event)) | 357 (modifiers (event-modifiers event)) |
358 (window (and (or (memq 'click modifiers) (memq 'down modifiers) | 358 (window (and (or (memq 'click modifiers) (memq 'down modifiers) |
359 (memq 'drag modifiers)) | 359 (memq 'drag modifiers)) |
360 (posn-window start)))) | 360 (posn-window start)))) |