emacs-devel
[Top][All Lists]
Advanced

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

Man-arguments might be nil


From: Reiner Steib
Subject: Man-arguments might be nil
Date: Wed, 09 Nov 2005 17:58:39 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Hi,

with today's CVS, I got the following error after `M-x woman RET
vgrename RET':

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("-k " nil)
  Man-highlight-references(WoMan-xref-man-page)
  woman-mode()
  woman-process-buffer()
  woman-really-find-file("/usr/share/man/man8/vgrename.8.gz" t "*WoMan
  8 vgrename*")
  woman-find-file("/usr/share/man/man8/vgrename.8.gz")
[...]
--8<---------------cut here---------------end--------------->8---

AFAIKS, the error has been introduced with this change:

,----
| 2005-11-07  Masatake YAMATO  <address@hidden>
| 
|       * man.el [...]
|       (Man-highlight-references, Man-highlight-references0):
|       Handle the case when `Man-arguments' includes "-k".
`----

It should be checked if `Man-arguments' is a string:

--8<---------------cut here---------------start------------->8---
--- man.el      07 Nov 2005 19:10:44 +0100      1.156
+++ man.el      09 Nov 2005 17:45:33 +0100      
@@ -923,7 +923,8 @@
 If XREF-MAN-TYPE is used as the button type for items
 in SEE ALSO section. If it is nil, default type, 
 `Man-xref-man-page' is used."
-  (if (string-match "-k " Man-arguments)
+  (if (and (stringp Man-arguments)
+          (string-match "-k " Man-arguments))
       (progn
        (Man-highlight-references0
         nil Man-reference-regexp 1 nil
--8<---------------cut here---------------end--------------->8---

Maybe it would also be sufficient defvar `Man-arguments' to "" instead
of nil:

--8<---------------cut here---------------start------------->8---
--- man.el      07 Nov 2005 19:10:44 +0100      1.156
+++ man.el      09 Nov 2005 17:56:41 +0100      
@@ -128,7 +128,7 @@
   :group 'man)
 
 (defvar Man-original-frame)
-(defvar Man-arguments)
+(defvar Man-arguments "")
 (defvar Man-sections-alist)
 (defvar Man-refpages-alist)
 (defvar Man-uses-untabify-flag t
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/





reply via email to

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