X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Friece-url.el;h=1c2f4dd8468f03137ad2e4d6c444651ebefc7b42;hb=cf84c926f8a5c65fcca630a41645e53b9a5f148c;hp=6b27fcf85920a09fca2a7e6ced376cea47ffc217;hpb=6c3f2fb1e30cf84292ca7b0bce31e027abe504ae;p=elisp%2Friece.git diff --git a/lisp/riece-url.el b/lisp/riece-url.el index 6b27fcf..1c2f4dd 100644 --- a/lisp/riece-url.el +++ b/lisp/riece-url.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -30,6 +30,7 @@ (require 'riece-options) (require 'riece-menu) ;riece-menu-items +(require 'easymenu) (autoload 'browse-url "browse-url") (defvar browse-url-browser-function) @@ -59,8 +60,6 @@ This maps a string \"Bug#12345\" to a URL (defvar riece-urls nil "A list of URL which appears in Riece buffers.") -(defvar riece-url-enabled nil) - (defconst riece-url-description "Collect URL in IRC buffers.") @@ -135,17 +134,18 @@ This maps a string \"Bug#12345\" to a URL t))) (defun riece-url-uninstall () + (easy-menu-remove-item + nil (list (car riece-menu-items)) + "Open URL...") (remove-hook 'riece-after-insert-functions 'riece-url-scan-region) (remove-hook 'riece-command-mode-hook 'riece-url-command-mode-hook)) (defun riece-url-enable () - (define-key riece-dialogue-mode-map "U" 'riece-command-browse-url) - (setq riece-url-enabled t)) + (define-key riece-dialogue-mode-map "U" 'riece-command-browse-url)) (defun riece-url-disable () - (define-key riece-dialogue-mode-map "U" nil) - (setq riece-url-enabled nil)) + (define-key riece-dialogue-mode-map "U" nil)) (provide 'riece-url)