summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/browse-url.el21
-rw-r--r--lisp/net/dbus.el2
-rw-r--r--lisp/net/eudc-export.el2
-rw-r--r--lisp/net/eudc.el34
-rw-r--r--lisp/net/eudcb-ph.el8
-rw-r--r--lisp/net/nsm.el3
-rw-r--r--lisp/net/rcirc.el13
-rw-r--r--lisp/net/secrets.el2
-rw-r--r--lisp/net/shr.el3
-rw-r--r--lisp/net/tramp-cache.el25
-rw-r--r--lisp/net/tramp-sh.el1
11 files changed, 58 insertions, 56 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index c4ed2332aba..3f8cb841c6f 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -236,21 +236,21 @@ Defaults to the value of `browse-url-mozilla-arguments' at the time
:group 'browse-url)
(defcustom browse-url-firefox-program
- (let ((candidates '("firefox" "iceweasel" "icecat")))
+ (let ((candidates '("icecat" "iceweasel" "firefox")))
(while (and candidates (not (executable-find (car candidates))))
(setq candidates (cdr candidates)))
(or (car candidates) "firefox"))
- "The name by which to invoke Firefox."
+ "The name by which to invoke Firefox or a variant of it."
:type 'string
:group 'browse-url)
(defcustom browse-url-firefox-arguments nil
- "A list of strings to pass to Firefox as arguments."
+ "A list of strings to pass to Firefox (or variant) as arguments."
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
(defcustom browse-url-firefox-startup-arguments browse-url-firefox-arguments
- "A list of strings to pass to Firefox when it starts up.
+ "A list of strings to pass to Firefox (or variant) when it starts up.
Defaults to the value of `browse-url-firefox-arguments' at the time
`browse-url' is loaded."
:type '(repeat (string :tag "Argument"))
@@ -761,10 +761,13 @@ narrowed."
;;;###autoload
(defun browse-url (url &rest args)
"Ask a WWW browser to load URL.
-Prompt for a URL, defaulting to the URL at or before point. Variable
-`browse-url-browser-function' says which browser to use.
+Prompt for a URL, defaulting to the URL at or before point.
+The variable `browse-url-browser-function' says which browser to use.
If the URL is a mailto: URL, consult `browse-url-mailto-function'
-first, if that exists."
+first, if that exists.
+
+Passes any ARGS to the browser function.
+The default is to pass `browse-url-new-window-flag'."
(interactive (browse-url-interactive-arg "URL: "))
(unless (called-interactively-p 'interactive)
(setq args (or args (list browse-url-new-window-flag))))
@@ -800,7 +803,9 @@ first, if that exists."
;;;###autoload
(defun browse-url-at-point (&optional arg)
"Ask a WWW browser to load the URL at or before point.
-Variable `browse-url-browser-function' says which browser to use."
+Variable `browse-url-browser-function' says which browser to use.
+Optional prefix argument ARG non-nil inverts the value of the option
+`browse-url-new-window-flag'."
(interactive "P")
(let ((url (browse-url-url-at-point)))
(if url
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index b2c1ba883a4..474a48ff276 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -869,7 +869,7 @@ association to the service from D-Bus."
;; Service.
(string-equal service (cadr e))
;; Non-empty object path.
- (cl-caddr e)
+ (nth 2 e)
(throw :found t)))))
dbus-registered-objects-table)
nil))))
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el
index 0e54d841d57..ec0914d636b 100644
--- a/lisp/net/eudc-export.el
+++ b/lisp/net/eudc-export.el
@@ -174,7 +174,7 @@ LOCATION is used as the phone location for BBDB."
(condition-case err
(setq phone-list (bbdb-parse-phone-number phone))
(error
- (if (string= "phone number unparsable." (eudc-cadr err))
+ (if (string= "phone number unparsable." (cadr err))
(if (not (y-or-n-p (format "BBDB claims %S to be unparsable--insert anyway? " phone)))
(error "Phone number unparsable")
(setq phone-list (list (bbdb-string-trim phone))))
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index cf5d13fce88..66dbc65da9c 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -47,6 +47,8 @@
(require 'wid-edit)
+(eval-when-compile (require 'cl-lib))
+
(eval-and-compile
(if (not (fboundp 'make-overlay))
(require 'overlay)))
@@ -105,18 +107,6 @@
;; attribute name
(defvar eudc-protocol-has-default-query-attributes nil)
-(defun eudc-cadr (obj)
- (car (cdr obj)))
-
-(defun eudc-cdar (obj)
- (cdr (car obj)))
-
-(defun eudc-caar (obj)
- (car (car obj)))
-
-(defun eudc-cdaar (obj)
- (cdr (car (car obj))))
-
(defun eudc-plist-member (plist prop)
"Return t if PROP has a value specified in PLIST."
(if (not (= 0 (% (length plist) 2)))
@@ -555,10 +545,10 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'."
;; Search for multiple records
(while (and rec
- (not (listp (eudc-cdar rec))))
+ (not (listp (cdar rec))))
(setq rec (cdr rec)))
- (if (null (eudc-cdar rec))
+ (if (null (cdar rec))
(list record) ; No duplicate attrs in this record
(mapc (function
(lambda (field)
@@ -590,7 +580,7 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'."
((eq 'first method)
(setq result
(eudc-add-field-to-records (cons (car field)
- (eudc-cadr field))
+ (cadr field))
result)))
((eq 'concat method)
(setq result
@@ -710,7 +700,7 @@ If ERROR is non-nil, report an error if there is none."
(let ((result (eudc-query (list (cons 'name name)) '(email)))
email)
(if (null (cdr result))
- (setq email (eudc-cdaar result))
+ (setq email (cl-cdaar result))
(error "Multiple match--use the query form"))
(if error
(if email
@@ -728,7 +718,7 @@ If ERROR is non-nil, report an error if there is none."
(let ((result (eudc-query (list (cons 'name name)) '(phone)))
phone)
(if (null (cdr result))
- (setq phone (eudc-cdaar result))
+ (setq phone (cl-cdaar result))
(error "Multiple match--use the query form"))
(if error
(if phone
@@ -765,8 +755,8 @@ otherwise a list of symbols is returned."
;; If the same attribute appears more than once, merge
;; the corresponding values
(while query-alist
- (setq key (eudc-caar query-alist)
- val (eudc-cdar query-alist)
+ (setq key (caar query-alist)
+ val (cdar query-alist)
cell (assq key query))
(if cell
(setcdr cell (concat (cdr cell) " " val))
@@ -863,7 +853,7 @@ see `eudc-inline-expansion-servers'"
(catch 'found
;; Loop on the servers
(while servers
- (eudc-set-server (eudc-caar servers) (eudc-cdar servers) t)
+ (eudc-set-server (caar servers) (cdar servers) t)
;; Determine which formats apply in the query-format list
(setq query-formats
@@ -1047,14 +1037,14 @@ queries the server for the existing fields and displays a corresponding form."
(point))
(setq set-server-p t))
((and (eq (car sexp) 'setq)
- (eq (eudc-cadr sexp) 'eudc-server-hotlist))
+ (eq (cadr sexp) 'eudc-server-hotlist))
(delete-region (save-excursion
(backward-sexp)
(point))
(point))
(setq set-hotlist-p t))
((and (eq (car sexp) 'provide)
- (equal (eudc-cadr sexp) '(quote eudc-options-file)))
+ (equal (cadr sexp) '(quote eudc-options-file)))
(setq provide-p t)))
(if (and provide-p
set-hotlist-p
diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el
index 1897e0b08bc..a135e9ba059 100644
--- a/lisp/net/eudcb-ph.el
+++ b/lisp/net/eudcb-ph.el
@@ -81,7 +81,7 @@ are returned"
(eudc-ph-do-request "fields")
(if full-records
(eudc-ph-parse-query-result)
- (mapcar 'eudc-caar (eudc-ph-parse-query-result))))
+ (mapcar #'caar (eudc-ph-parse-query-result))))
(defun eudc-ph-parse-query-result (&optional fields)
"Return a list of alists of key/values from in `eudc-ph-process-buffer'.
@@ -126,9 +126,9 @@ Fields not in FIELDS are discarded."
(memq current-key fields))
(if key
(setq record (cons (cons key value) record)) ; New key
- (setcdr (car record) (if (listp (eudc-cdar record))
- (append (eudc-cdar record) (list value))
- (list (eudc-cdar record) value))))))))
+ (setcdr (car record) (if (listp (cdar record))
+ (append (cdar record) (list value))
+ (list (cdar record) value))))))))
(and (not ignore)
(or (null fields)
(eq 'all fields)
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 2312e22d96a..28253e5bdf5 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -308,6 +308,7 @@ unencrypted."
(?s . session)
(?a . always)))
(prefix "")
+ (cursor-in-echo-area t)
response)
(while (not response)
(setq response
@@ -315,7 +316,7 @@ unencrypted."
(assq (downcase
(read-char
(concat prefix
- "Continue connecting? (No, Session only, Always)")))
+ "Continue connecting? (No, Session only, Always) ")))
responses)))
(unless response
(ding)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 74d03f59f3d..5ea10475cea 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2167,6 +2167,7 @@ activity. Only run if the buffer is not visible and
,interactive-form
(let ((process (or process (rcirc-buffer-process)))
(target (or target rcirc-target)))
+ (ignore target) ; mark `target' variable as ignorable
,@body))))
(defun-rcirc-command msg (message)
@@ -2693,7 +2694,7 @@ the only argument."
(defun rcirc-handler-KICK (process sender args _text)
(let* ((channel (car args))
(nick (cadr args))
- (reason (cl-caddr args))
+ (reason (nth 2 args))
(message (concat nick " " channel " " reason)))
(rcirc-print process sender "KICK" channel message t)
;; print in private chat buffer if it exists
@@ -2777,7 +2778,7 @@ the only argument."
"RPL_AWAY"
(let* ((nick (cadr args))
(rec (assoc-string nick rcirc-nick-away-alist))
- (away-message (cl-caddr args)))
+ (away-message (nth 2 args)))
(when (or (not rec)
(not (string= (cdr rec) away-message)))
;; away message has changed
@@ -2806,7 +2807,7 @@ the only argument."
(let ((buffer (or (rcirc-get-buffer process (cadr args))
(rcirc-get-temp-buffer-create process (cadr args)))))
(with-current-buffer buffer
- (setq rcirc-topic (cl-caddr args)))))
+ (setq rcirc-topic (nth 2 args)))))
(defun rcirc-handler-333 (process sender args _text)
"333 says who set the topic and when.
@@ -2814,7 +2815,7 @@ Not in rfc1459.txt"
(let ((buffer (or (rcirc-get-buffer process (cadr args))
(rcirc-get-temp-buffer-create process (cadr args)))))
(with-current-buffer buffer
- (let ((setter (cl-caddr args))
+ (let ((setter (nth 2 args))
(time (current-time-string
(seconds-to-time
(string-to-number (cl-cadddr args))))))
@@ -2823,7 +2824,7 @@ Not in rfc1459.txt"
(defun rcirc-handler-477 (process sender args _text)
"ERR_NOCHANMODES"
- (rcirc-print process sender "477" (cadr args) (cl-caddr args)))
+ (rcirc-print process sender "477" (cadr args) (nth 2 args)))
(defun rcirc-handler-MODE (process sender args _text)
(let ((target (car args))
@@ -2883,7 +2884,7 @@ Passwords are stored in `rcirc-authinfo' (which see)."
(dolist (i rcirc-authinfo)
(let ((process (rcirc-buffer-process))
(server (car i))
- (nick (cl-caddr i))
+ (nick (nth 2 i))
(method (cadr i))
(args (cl-cdddr i)))
(when (and (string-match server rcirc-server))
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index 45caf7c2339..6f4e1736937 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -702,7 +702,7 @@ If there is no such item, return nil."
(let ((item-path (secrets-item-path collection item)))
(unless (secrets-empty-path item-path)
(dbus-byte-array-to-string
- (cl-caddr
+ (nth 2
(dbus-call-method
:session secrets-service item-path secrets-interface-item
"GetSecret" :object-path secrets-session-path))))))
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 9d88d1ff441..454332e55d0 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -709,6 +709,9 @@ size, and full-buffer size."
shr-base))
(when (zerop (length url))
(setq url nil))
+ ;; Strip leading whitespace
+ (and url (string-match "\\`\\s-+" url)
+ (setq url (substring url (match-end 0))))
(cond ((or (not url)
(not base)
(string-match "\\`[a-z]*:" url))
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 1e24ea53f43..f2ee49ff6be 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -168,16 +168,18 @@ Returns VALUE."
;;;###tramp-autoload
(defun tramp-flush-file-property (key file)
"Remove all properties of FILE in the cache context of KEY."
- ;; Remove file properties of symlinks.
- (let ((truename (tramp-get-file-property key file "file-truename" nil)))
+ (let* ((file (tramp-run-real-handler
+ 'directory-file-name (list file)))
+ (truename (tramp-get-file-property key file "file-truename" nil)))
+ ;; Remove file properties of symlinks.
(when (and (stringp truename)
- (not (string-equal file truename)))
- (tramp-flush-file-property key truename)))
- ;; Unify localname.
- (setq key (copy-sequence key))
- (aset key 3 (tramp-run-real-handler 'directory-file-name (list file)))
- (tramp-message key 8 "%s" file)
- (remhash key tramp-cache-data))
+ (not (string-equal file (directory-file-name truename))))
+ (tramp-flush-file-property key truename))
+ ;; Unify localname.
+ (setq key (copy-sequence key))
+ (aset key 3 file)
+ (tramp-message key 8 "%s" file)
+ (remhash key tramp-cache-data)))
;;;###tramp-autoload
(defun tramp-flush-directory-property (key directory)
@@ -188,13 +190,14 @@ Remove also properties of all files in subdirectories."
(truename (tramp-get-file-property key directory "file-truename" nil)))
;; Remove file properties of symlinks.
(when (and (stringp truename)
- (not (string-equal directory truename)))
+ (not (string-equal directory (directory-file-name truename))))
(tramp-flush-directory-property key truename))
(tramp-message key 8 "%s" directory)
(maphash
(lambda (key _value)
(when (and (stringp (tramp-file-name-localname key))
- (string-match directory (tramp-file-name-localname key)))
+ (string-match (regexp-quote directory)
+ (tramp-file-name-localname key)))
(remhash key tramp-cache-data)))
tramp-cache-data)))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f59c5fbdf67..3f006e84dc1 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -496,7 +496,6 @@ as given in your `~/.profile'."
(defcustom tramp-remote-process-environment
`("TMOUT=0" "LC_CTYPE=''"
,(format "TERM=%s" tramp-terminal-type)
- "EMACS=t" ;; Deprecated.
,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version)
"CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat"
"autocorrect=" "correct=")