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

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

Re: describe-key-briefly bug


From: Lute Kamstra
Subject: Re: describe-key-briefly bug
Date: Mon, 11 Apr 2005 13:01:06 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Katsumi Yamaoka <address@hidden> writes:

> Gnus uses describe-key-briefly non-interactively and causes an
> error as follows:
>
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>   aref(nil -1)
>   (stringp (aref untranslated (1- ...)))
>   (if (stringp (aref untranslated ...)) (aset untranslated (1- ...
> [...]
>   describe-key-briefly(" " nil)
>   gnus-article-describe-key-briefly(" " nil)
>   call-interactively(gnus-article-describe-key-briefly)
>
> Please fix it.  Thanks.

Does this patch fix it?

Lute.


Index: lisp/help.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/help.el,v
retrieving revision 1.279
diff -c -r1.279 help.el
*** lisp/help.el        10 Apr 2005 01:47:43 -0000      1.279
--- lisp/help.el        11 Apr 2005 10:57:03 -0000
***************
*** 590,596 ****
        ;; Don't bother user with strings from (e.g.) the select-paste menu.
        (if (stringp (aref key (1- (length key))))
            (aset key (1- (length key)) "(any string)"))
!       (if (stringp (aref untranslated (1- (length untranslated))))
            (aset untranslated (1- (length untranslated))
                  "(any string)"))
        ;; Now describe the key, perhaps as changed.
--- 590,597 ----
        ;; Don't bother user with strings from (e.g.) the select-paste menu.
        (if (stringp (aref key (1- (length key))))
            (aset key (1- (length key)) "(any string)"))
!       (if (and (> (length untranslated) 0)
!                (stringp (aref untranslated (1- (length untranslated)))))
            (aset untranslated (1- (length untranslated))
                  "(any string)"))
        ;; Now describe the key, perhaps as changed.
***************
*** 603,609 ****
                         key-desc
                         (if (symbolp defn) defn (prin1-to-string defn)))))))))
  
- 
  (defun describe-key (key &optional untranslated up-event)
    "Display documentation of the function invoked by KEY.
  KEY should be a key sequence--when calling from a program,
--- 604,609 ----




reply via email to

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