aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/url
diff options
context:
space:
mode:
authorChong Yidong2012-06-12 13:47:14 +0800
committerChong Yidong2012-06-12 13:47:14 +0800
commitf1a4e679f3b0696089b4fd73717307ba5d23e1cf (patch)
treedc44016b20723e38247300b6c6eaec3cd4e98761 /lisp/url
parentbf67e61f291a82a9e90a7918f5188714853f0094 (diff)
downloademacs-f1a4e679f3b0696089b4fd73717307ba5d23e1cf.tar.gz
emacs-f1a4e679f3b0696089b4fd73717307ba5d23e1cf.zip
Various minor variable/hook cleanups.
* lisp/emacs-lisp/edebug.el (edebug-inhibit-emacs-lisp-mode-bindings): Rename from gud-inhibit-global-bindings. * lisp/emacs-lisp/eieio.el (eieio-pre-method-execution-hooks): Doc fix. * lisp/erc/erc-dcc.el (erc-dcc-chat-filter-functions): Rename from erc-dcc-chat-filter-hook, since this is an abnormal hook. * lisp/nxml/nxml-glyph.el (nxml-glyph-set-functions): Rename abnormal hook from nxml-glyph-set-hook. * lisp/progmodes/cwarn.el (cwarn-mode): Remove redundant variable declaration. * lisp/progmodes/pascal.el (pascal-toggle-completions): Doc fix. * lisp/textmodes/bibtex.el (bibtex-string-file-path, bibtex-file-path): Convert to defcustom. * lisp/url/url-handlers.el (url-handler-regexp): * lisp/url/url-nfs.el (url-nfs-automounter-directory-spec): * lisp/url/url-vars.el (url-load-hook): Convert to defcustom.
Diffstat (limited to 'lisp/url')
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-handlers.el42
-rw-r--r--lisp/url/url-nfs.el7
-rw-r--r--lisp/url/url-vars.el6
4 files changed, 39 insertions, 22 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 40295f6e1d8..32015db8405 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
12012-06-12 Chong Yidong <cyd@gnu.org>
2
3 * url-handlers.el (url-handler-regexp):
4 * url-nfs.el (url-nfs-automounter-directory-spec):
5 * url-vars.el (url-load-hook): Convert to defcustom.
6
12012-05-25 Leo Liu <sdl.web@gmail.com> 72012-05-25 Leo Liu <sdl.web@gmail.com>
2 8
3 * url-http.el (url-http-codes): Fix mal-formed defconst. 9 * url-http.el (url-http-codes): Fix mal-formed defconst.
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index d00a1174cdf..dc412c2d16d 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -90,13 +90,24 @@
90;; verify-visited-file-modtime 90;; verify-visited-file-modtime
91;; write-region 91;; write-region
92 92
93(defvar url-handler-regexp 93;;;###autoload
94 "\\`\\(https?\\|ftp\\|file\\|nfs\\)://" 94(defcustom url-handler-regexp "\\`\\(https?\\|ftp\\|file\\|nfs\\)://"
95 "A regular expression for matching URLs handled by `file-name-handler-alist'. 95 "Regular expression for URLs handled by `url-handler-mode'.
96Some valid URL protocols just do not make sense to visit interactively 96When URL Handler mode is enabled, this regular expression is
97\(about, data, info, irc, mailto, etc\). This regular expression 97added to `file-name-handler-alist'.
98avoids conflicts with local files that look like URLs \(Gnus is 98
99particularly bad at this\).") 99Some valid URL protocols just do not make sense to visit
100interactively \(about, data, info, irc, mailto, etc\). This
101regular expression avoids conflicts with local files that look
102like URLs \(Gnus is particularly bad at this\)."
103 :group 'url
104 :type 'regexp
105 :set (lambda (symbol value)
106 (let ((enable url-handler-mode))
107 (url-handler-mode 0)
108 (set-default symbol value)
109 (if enable
110 (url-handler-mode)))))
100 111
101;;;###autoload 112;;;###autoload
102(define-minor-mode url-handler-mode 113(define-minor-mode url-handler-mode
@@ -105,16 +116,13 @@ With a prefix argument ARG, enable URL Handler mode if ARG is
105positive, and disable it otherwise. If called from Lisp, enable 116positive, and disable it otherwise. If called from Lisp, enable
106the mode if ARG is omitted or nil." 117the mode if ARG is omitted or nil."
107 :global t :group 'url 118 :global t :group 'url
108 (if (not (boundp 'file-name-handler-alist)) 119 ;; Remove old entry, if any.
109 ;; Can't be turned ON anyway. 120 (setq file-name-handler-alist
110 (setq url-handler-mode nil) 121 (delq (rassq 'url-file-handler file-name-handler-alist)
111 ;; Remove old entry, if any. 122 file-name-handler-alist))
112 (setq file-name-handler-alist 123 (if url-handler-mode
113 (delq (rassq 'url-file-handler file-name-handler-alist) 124 (push (cons url-handler-regexp 'url-file-handler)
114 file-name-handler-alist)) 125 file-name-handler-alist)))
115 (if url-handler-mode
116 (push (cons url-handler-regexp 'url-file-handler)
117 file-name-handler-alist))))
118 126
119(defun url-run-real-handler (operation args) 127(defun url-run-real-handler (operation args)
120 (let ((inhibit-file-name-handlers (cons 'url-file-handler 128 (let ((inhibit-file-name-handlers (cons 'url-file-handler
diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el
index bfab147f267..cb5695b5549 100644
--- a/lisp/url/url-nfs.el
+++ b/lisp/url/url-nfs.el
@@ -27,8 +27,7 @@
27(require 'url-parse) 27(require 'url-parse)
28(require 'url-file) 28(require 'url-file)
29 29
30(defvar url-nfs-automounter-directory-spec 30(defcustom url-nfs-automounter-directory-spec "file:/net/%h%f"
31 "file:/net/%h%f"
32 "How to invoke the NFS automounter. Certain % sequences are recognized. 31 "How to invoke the NFS automounter. Certain % sequences are recognized.
33 32
34%h -- the hostname of the NFS server 33%h -- the hostname of the NFS server
@@ -38,7 +37,9 @@
38%f -- the filename on the remote server 37%f -- the filename on the remote server
39%% -- a literal % 38%% -- a literal %
40 39
41Each can be used any number of times.") 40Each can be used any number of times."
41 :group 'url
42 :type 'string)
42 43
43(defun url-nfs-unescape (format host port user pass file) 44(defun url-nfs-unescape (format host port user pass file)
44 (with-current-buffer (get-buffer-create " *nfs-parse*") 45 (with-current-buffer (get-buffer-create " *nfs-parse*")
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 6aa14b8bae1..11546e11583 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -375,8 +375,10 @@ Currently supported methods:
375(modify-syntax-entry ?> ")<" url-parse-syntax-table) 375(modify-syntax-entry ?> ")<" url-parse-syntax-table)
376(modify-syntax-entry ?/ " " url-parse-syntax-table) 376(modify-syntax-entry ?/ " " url-parse-syntax-table)
377 377
378(defvar url-load-hook nil 378(defcustom url-load-hook nil
379 "Hooks to be run after initializing the URL library.") 379 "Hook run after initializing the URL library."
380 :group 'url
381 :type 'hook)
380 382
381;;; Make OS/2 happy - yeeks 383;;; Make OS/2 happy - yeeks
382;; (defvar tcp-binary-process-input-services nil 384;; (defvar tcp-binary-process-input-services nil