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

Re: Bug#118590: w3m-el: Cannot use on XEmacs21 (non-member post)



>>>>> In [emacs-w3m : No.02092]
>>>>>	Katsumi Yamaoka <yamaoka@jpl.org> wrote:

> Hmm, I don't know why both the variables `w3m-current-title' and
> `w3m-current-url' are nil.

I've just informed by TSUCHIYA-san (he is the boss of the Emacs-
W3M development team :-) that such a situation can be occurred
when there is something wrong in the startup procedures.
However, I've never been experienced such problems.

I will attach the new patch which should be applied to the
original released version of w3m-xmas.el.  The change has been
done in the cvs repository.  It may be released as a revised
version of Emacs-W3M in the near future (that I hope).
--- w3m-xmas.el~	Tue Nov  6 07:38:01 2001
+++ w3m-xmas.el	Thu Nov  8 00:38:29 2001
@@ -42,6 +42,7 @@
 (eval-when-compile
   (defvar w3m-current-image-status)
   (defvar w3m-current-url)
+  (defvar w3m-current-title)
   (defvar w3m-default-coding-system)
   (defvar w3m-history)
   (defvar w3m-history-flat)
@@ -462,15 +463,15 @@
 	       (eq 'w3m-mode major-mode))
 	  (let* ((len (specifier-instance
 		       (symbol-value 'buffers-tab-default-buffer-line-length)))
-		 (name (if (string-match "^[ -~]+$"
-					 (symbol-value 'w3m-current-title))
-			   (symbol-value 'w3m-current-title)
-			 (directory-file-name
-			  (if (string-match "^[^/:]+:/+"
-					    (symbol-value 'w3m-current-url))
-			      (substring (symbol-value 'w3m-current-url)
-					 (match-end 0))
-			    (symbol-value 'w3m-current-url)))))
+		 (name (if (and (stringp w3m-current-title)
+				(string-match "^[ -~]+$" w3m-current-title))
+			   w3m-current-title
+			 (if (stringp w3m-current-url)
+			     (directory-file-name
+			      (if (string-match "^[^/:]+:/+" w3m-current-url)
+				  (substring w3m-current-url (match-end 0))
+				w3m-current-url))
+			   "")))
 		 (num (if (string-match ".*<\\(.+\\)>$" (buffer-name buffer))
 			  (match-string 1 (buffer-name buffer))))
 		 (lnum (length num)))