[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Omitting optional argument of `w3m-tab-previous-buffer' causes an error
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Thu, 14 Oct 2010 07:57:49 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11388
- References: <87r5ftsonl.wl%irieshinsuke@xxxxxxxxxxx>
IRIE-san wrote:
> I found that a function `w3m-tab-previous-buffer' causes an error
> "Wrong type argument: number-or-marker-p, nil" if it is called with
> no arguments non-interactively like "(w3m-tab-previous-buffer)".
> Currently the code is as follows:
> (defun w3m-tab-previous-buffer (&optional n event)
> "Turn N pages of emacs-w3m buffers behind."
> (interactive (list (prefix-numeric-value current-prefix-arg)
> last-command-event))
> (w3m-tab-next-buffer (- n) event))
> Here, "(- n)" cannot be calculated if N is omitted. To avoid the error,
> it should be modified as:
> (defun w3m-tab-previous-buffer (&optional n event)
> "Turn N pages of emacs-w3m buffers behind."
> (interactive (list (prefix-numeric-value current-prefix-arg)
> last-command-event))
> (w3m-tab-next-buffer (- (or n 1)) event))
Yeah, that's exactly a bug. Thank you for finding it out.
Fixed in the emacs-w3m CVS trunk.
Regards,