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

Re: M-x w3m

>>>>> In [emacs-w3m : No.01703]
>>>>>	TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp> wrote:

土屋さん> 要は、w3m が起動済みの時に M-x w3m RET C-k RET という操作で、
土屋さん> 単にpopup するようにしたかったわけです。

これなら prefix arg は要りませんねえ。こんな感じでどうでしょう?

(defun w3m (&optional url)
  "Visit the World Wide Web page using the external command w3m, w3mmee
or w3m-m17n.  When you invoke this command interactively, it will
prompt you for a URL where you wish to go.  Except that if you enters
the empty string and the buffer for w3m exists, it will just pop up
the buffer.  URL should be a string which defaults to the value
of `w3m-home-page' or \"about:\".  Otherwise, you can run this command
in the batch mode like \"emacs -f w3m http://emacs-w3m.namazu.org/&\".
The value of `w3m-pop-up-frames' specifies whether to pop up a new
frame, however, it will be ignored (treated as nil) when this command
is called non-interactively."
  (interactive (let ((default (when (w3m-alive-p) 'popup)))
		 (unless (and current-prefix-arg default)
		   (list (w3m-input-url nil nil default)))))
  (let ((nofetch (eq url 'popup))
	(buffer (w3m-alive-p))


;; これってひどいやり取りですね。^^;;
Katsumi Yamaoka <yamaoka@namazu.org>