* [PATCH] C-h k sometimes fails if the key is bound to a lambda
@ 2007-11-22 3:29 Ævar Arnfjörð Bjarmason
2007-11-26 5:34 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2007-11-22 3:29 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
If emacs is started as emacs -Q and the following evaluated:
(global-set-key (kbd "C-c C-e") (lambda () (interactive) (message "Y hlo")))
C-h k C-c C-e will always produce a help buffer with "C-c C-e runs the
command (lambda nil (interactive) (message "Y hlo"))"
However if advised.el has been loaded (and (featurep 'advice)
(ad-get-advice-info function)) at the start of the describe-function-1
function will fail.
The following patch to help-fns.el wraps the call in (ignore-errors)
which makes C-h k work on keys bound to lambdas in all cases.
consolers in irc.freenode.net #emacs deserves credit for the patch. I
just found the error.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: help-fns.el.patch --]
[-- Type: text/x-diff; name=help-fns.el.patch, Size: 663 bytes --]
Index: help-fns.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/help-fns.el,v
retrieving revision 1.109
diff -u -r1.109 help-fns.el
--- help-fns.el 10 Nov 2007 09:58:35 -0000 1.109
+++ help-fns.el 22 Nov 2007 03:17:22 -0000
@@ -250,7 +250,7 @@
;;;###autoload
(defun describe-function-1 (function)
- (let* ((advised (and (featurep 'advice) (ad-get-advice-info function)))
+ (let* ((advised (and (featurep 'advice) (ignore-errors (ad-get-advice-info function))))
;; If the function is advised, use the symbol that has the
;; real definition, if that symbol is already set up.
(real-function
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] C-h k sometimes fails if the key is bound to a lambda
2007-11-22 3:29 [PATCH] C-h k sometimes fails if the key is bound to a lambda Ævar Arnfjörð Bjarmason
@ 2007-11-26 5:34 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2007-11-26 5:34 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: emacs-devel
I will fix this a different way. Thanks for reporting it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-26 5:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-22 3:29 [PATCH] C-h k sometimes fails if the key is bound to a lambda Ævar Arnfjörð Bjarmason
2007-11-26 5:34 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.