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

Re: insert w3m-current-url into minibuffer



OK thanks! This is what I ended up putting in .emacs-w3m. It seems to work OK.
(defun minibuffer-ins-w3m-url (arg)
  (interactive "P")
  (let ((url (catch 'url
	       (dolist (b (cdr (buffer-list)))
		 (with-current-buffer b
		   (when w3m-current-url
		     (throw 'url w3m-current-url))))
	       nil)))
    (if url
	(insert url)
      (beep))))
(define-key minibuffer-local-map "\C-c\C-u"
  'minibuffer-ins-w3m-url)
(define-key minibuffer-local-ns-map "\C-c\C-u"
  'minibuffer-ins-w3m-url)
(define-key minibuffer-local-completion-map "\C-c\C-u"
  'minibuffer-ins-w3m-url)
(define-key minibuffer-local-must-match-map "\C-c\C-u"
  'minibuffer-ins-w3m-url)