]> code.delx.au - gnu-emacs/blobdiff - lisp/net/quickurl.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / net / quickurl.el
index 1e05d8db33620be855a221b60a235582c31ad355..bb9ce31307b9ad8ae09a629cf33684b7634702cb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; quickurl.el --- insert a URL based on text at point in buffer
 
-;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: Dave Pearson <davep@davep.org>
 ;; Maintainer: Dave Pearson <davep@davep.org>
@@ -97,6 +97,7 @@
 (defcustom quickurl-url-file
   (locate-user-emacs-file "quickurls" ".quickurls")
   "File that contains the URL list."
+  :version "24.4"                       ; added locate-user-emacs-file
   :type  'file
   :group 'quickurl)
 
@@ -346,7 +347,7 @@ It is assumed that the URL is either \"unguarded\" or is wrapped inside an
         ;; need to do a little more work to get to where we want to be.
         (when (thing-at-point-looking-at thing-at-point-markedup-url-regexp)
           (search-backward "<URL:"))
-        (backward-word 1)
+        (backward-word-strictly 1)
         (let ((word (funcall quickurl-grab-lookup-function)))
           (when word
             (quickurl-make-url
@@ -429,18 +430,12 @@ current buffer, this default action can be modified via
 (put 'quickurl-list-mode 'mode-class 'special)
 
 ;;;###autoload
-(defun quickurl-list-mode ()
+(define-derived-mode quickurl-list-mode fundamental-mode "quickurl list"
   "A mode for browsing the quickurl URL list.
 
 The key bindings for `quickurl-list-mode' are:
 
 \\{quickurl-list-mode-map}"
-  (interactive)
-  (kill-all-local-variables)
-  (use-local-map quickurl-list-mode-map)
-  (setq major-mode 'quickurl-list-mode
-        mode-name  "quickurl list")
-  (run-mode-hooks 'quickurl-list-mode-hook)
   (setq buffer-read-only t
         truncate-lines   t))