unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Man-arguments might be nil
@ 2005-11-09 16:58 Reiner Steib
  2005-11-09 17:14 ` Masatake YAMATO
  0 siblings, 1 reply; 3+ messages in thread
From: Reiner Steib @ 2005-11-09 16:58 UTC (permalink / raw)


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  <jet@gyve.org>
| 
| 	* 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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-10  4:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-09 16:58 Man-arguments might be nil Reiner Steib
2005-11-09 17:14 ` Masatake YAMATO
2005-11-10  4:51   ` Masatake YAMATO

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).