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

Re: mouse BACK



Sorry, I mistook!!.

> Put the undermentioned code in your w3m-init-file (~/.emacs-w3m)
> and try it.

(defvar w3m-mode-menu)
(defvar w3m-rmouse-menu nil)
(defadvice w3m-mouse-major-mode-menu (around rmouse-pop activate)
  (mouse-set-point event)
  (unless w3m-rmouse-menu
    (let ((menu (copy-keymap w3m-mode-menu))
	  tmp menu)
      (when w3m-use-tab-menubar
	(setq tmp (assq 'Session menu))
	(setq menu (delete tmp menu)))
      (setq tmp (assq 'Bookmark menu))
      (setq menu (delete tmp menu))
      (setq w3m-rmouse-menu menu)))
  (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
  (let* ((menu (copy-keymap (lookup-key w3m-mode-map [menu-bar])))
	 (w3m (assq 'w3m menu)))
    (setq menu (delete w3m menu))
    (popup-menu `(,@menu
		  (dummy menu-item "----")
		  (dummy menu-item "----")
		  ,@w3m-rmouse-menu)
		event)))

-- 
Hideyuki SHIRAI (mailto:shirai@xxxxxxxxxxx)
またまた、日本人向け

(defadvice w3m-mouse-major-mode-menu (around rmouse-pop activate)
  (mouse-set-point event)
  (unless w3m-rmouse-menu
    (let ((menu (copy-keymap w3m-mode-menu))
	  tmp menu)
      (if w3m-use-japanese-menu
	  (progn
	    (when w3m-use-tab-menubar
	      (setq tmp (assq 'セッション menu))
	      (setq menu (delete tmp menu)))
	    (setq tmp (assq 'ブックマーク menu))
	    (setq menu (delete tmp menu)))
	(when w3m-use-tab-menubar
	  (setq tmp (assq 'Session menu))
	  (setq menu (delete tmp menu)))
	(setq tmp (assq 'Bookmark menu))
	(setq menu (delete tmp menu)))
      (setq w3m-rmouse-menu menu)))
  (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
  (let* ((menu (copy-keymap (lookup-key w3m-mode-map [menu-bar])))
	 (w3m (assq 'w3m menu)))
    (setq menu (delete w3m menu))
    (popup-menu `(,@menu
		  (dummy menu-item "----")
		  (dummy menu-item "----")
		  ,@w3m-rmouse-menu)
		event)))

Meadow でうまく動かなかった ;_;
こういうのは、XEmacs の方が簡単そう。。。