aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/net/browse-url.el42
-rw-r--r--lisp/net/dictionary.el67
-rw-r--r--lisp/net/dig.el4
-rw-r--r--lisp/net/dns.el8
-rw-r--r--lisp/net/eudc-bob.el20
-rw-r--r--lisp/net/eudc-export.el78
-rw-r--r--lisp/net/eudc-hotlist.el14
-rw-r--r--lisp/net/eudc.el14
-rw-r--r--lisp/net/eudcb-bbdb.el125
-rw-r--r--lisp/net/eudcb-ldap.el18
-rw-r--r--lisp/net/eudcb-mab.el2
-rw-r--r--lisp/net/eudcb-macos-contacts.el4
-rw-r--r--lisp/net/gnutls.el7
-rw-r--r--lisp/net/goto-addr.el28
-rw-r--r--lisp/net/net-utils.el84
-rw-r--r--lisp/net/network-stream.el3
-rw-r--r--lisp/net/newst-backend.el32
-rw-r--r--lisp/net/newst-plainview.el121
-rw-r--r--lisp/net/newst-reader.el10
-rw-r--r--lisp/net/newst-ticker.el12
-rw-r--r--lisp/net/newst-treeview.el129
-rw-r--r--lisp/net/puny.el4
-rw-r--r--lisp/net/quickurl.el29
-rw-r--r--lisp/net/rcirc.el2
-rw-r--r--lisp/net/secrets.el10
-rw-r--r--lisp/net/shr-color.el14
-rw-r--r--lisp/net/shr.el26
-rw-r--r--lisp/net/sieve-mode.el6
-rw-r--r--lisp/net/soap-client.el26
-rw-r--r--lisp/net/soap-inspect.el46
-rw-r--r--lisp/net/telnet.el20
-rw-r--r--lisp/net/tramp-cmds.el2
-rw-r--r--lisp/net/tramp-compat.el2
-rw-r--r--lisp/net/tramp-integration.el2
-rw-r--r--lisp/net/tramp-sh.el4
-rw-r--r--lisp/net/tramp.el25
-rw-r--r--lisp/net/webjump.el2
37 files changed, 489 insertions, 553 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 58f01d5bf98..1c98335a20c 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -826,7 +826,7 @@ If optional arg TEMP-FILE-NAME is non-nil, delete it instead."
826 (if (and file-name (file-exists-p file-name)) 826 (if (and file-name (file-exists-p file-name))
827 (delete-file file-name)))) 827 (delete-file file-name))))
828 828
829(add-hook 'kill-buffer-hook 'browse-url-delete-temp-file) 829(add-hook 'kill-buffer-hook #'browse-url-delete-temp-file)
830 830
831(declare-function dired-get-filename "dired" 831(declare-function dired-get-filename "dired"
832 (&optional localp no-error-if-not-filep)) 832 (&optional localp no-error-if-not-filep))
@@ -1064,7 +1064,7 @@ xdg-open is a desktop utility that calls your preferred web browser."
1064 (executable-find "xdg-open"))) 1064 (executable-find "xdg-open")))
1065 1065
1066;;;###autoload 1066;;;###autoload
1067(defun browse-url-xdg-open (url &optional ignored) 1067(defun browse-url-xdg-open (url &optional _ignored)
1068 "Pass the specified URL to the \"xdg-open\" command. 1068 "Pass the specified URL to the \"xdg-open\" command.
1069xdg-open is a desktop utility that calls your preferred web browser. 1069xdg-open is a desktop utility that calls your preferred web browser.
1070The optional argument IGNORED is not used." 1070The optional argument IGNORED is not used."
@@ -1095,7 +1095,7 @@ used instead of `browse-url-new-window-flag'."
1095 (setq url (browse-url-encode-url url)) 1095 (setq url (browse-url-encode-url url))
1096 (let* ((process-environment (browse-url-process-environment)) 1096 (let* ((process-environment (browse-url-process-environment))
1097 (process 1097 (process
1098 (apply 'start-process 1098 (apply #'start-process
1099 (concat "netscape " url) nil 1099 (concat "netscape " url) nil
1100 browse-url-netscape-program 1100 browse-url-netscape-program
1101 (append 1101 (append
@@ -1125,7 +1125,7 @@ used instead of `browse-url-new-window-flag'."
1125 (let* ((process-environment (browse-url-process-environment))) 1125 (let* ((process-environment (browse-url-process-environment)))
1126 ;; Netscape not running - start it 1126 ;; Netscape not running - start it
1127 (message "Starting %s..." browse-url-netscape-program) 1127 (message "Starting %s..." browse-url-netscape-program)
1128 (apply 'start-process (concat "netscape" url) nil 1128 (apply #'start-process (concat "netscape" url) nil
1129 browse-url-netscape-program 1129 browse-url-netscape-program
1130 (append browse-url-netscape-startup-arguments (list url)))))) 1130 (append browse-url-netscape-startup-arguments (list url))))))
1131 1131
@@ -1144,7 +1144,7 @@ How depends on `browse-url-netscape-version'."
1144 "Send a remote control command to Netscape." 1144 "Send a remote control command to Netscape."
1145 (declare (obsolete nil "25.1")) 1145 (declare (obsolete nil "25.1"))
1146 (let* ((process-environment (browse-url-process-environment))) 1146 (let* ((process-environment (browse-url-process-environment)))
1147 (apply 'start-process "netscape" nil 1147 (apply #'start-process "netscape" nil
1148 browse-url-netscape-program 1148 browse-url-netscape-program
1149 (append browse-url-netscape-arguments 1149 (append browse-url-netscape-arguments
1150 (list "-remote" command))))) 1150 (list "-remote" command)))))
@@ -1170,7 +1170,7 @@ used instead of `browse-url-new-window-flag'."
1170 (setq url (browse-url-encode-url url)) 1170 (setq url (browse-url-encode-url url))
1171 (let* ((process-environment (browse-url-process-environment)) 1171 (let* ((process-environment (browse-url-process-environment))
1172 (process 1172 (process
1173 (apply 'start-process 1173 (apply #'start-process
1174 (concat "mozilla " url) nil 1174 (concat "mozilla " url) nil
1175 browse-url-mozilla-program 1175 browse-url-mozilla-program
1176 (append 1176 (append
@@ -1196,7 +1196,7 @@ used instead of `browse-url-new-window-flag'."
1196 (let* ((process-environment (browse-url-process-environment))) 1196 (let* ((process-environment (browse-url-process-environment)))
1197 ;; Mozilla is not running - start it 1197 ;; Mozilla is not running - start it
1198 (message "Starting %s..." browse-url-mozilla-program) 1198 (message "Starting %s..." browse-url-mozilla-program)
1199 (apply 'start-process (concat "mozilla " url) nil 1199 (apply #'start-process (concat "mozilla " url) nil
1200 browse-url-mozilla-program 1200 browse-url-mozilla-program
1201 (append browse-url-mozilla-startup-arguments (list url)))))) 1201 (append browse-url-mozilla-startup-arguments (list url))))))
1202 1202
@@ -1219,7 +1219,7 @@ instead of `browse-url-new-window-flag'."
1219 (interactive (browse-url-interactive-arg "URL: ")) 1219 (interactive (browse-url-interactive-arg "URL: "))
1220 (setq url (browse-url-encode-url url)) 1220 (setq url (browse-url-encode-url url))
1221 (let* ((process-environment (browse-url-process-environment))) 1221 (let* ((process-environment (browse-url-process-environment)))
1222 (apply 'start-process 1222 (apply #'start-process
1223 (concat "firefox " url) nil 1223 (concat "firefox " url) nil
1224 browse-url-firefox-program 1224 browse-url-firefox-program
1225 (append 1225 (append
@@ -1242,7 +1242,7 @@ The optional argument NEW-WINDOW is not used."
1242 (interactive (browse-url-interactive-arg "URL: ")) 1242 (interactive (browse-url-interactive-arg "URL: "))
1243 (setq url (browse-url-encode-url url)) 1243 (setq url (browse-url-encode-url url))
1244 (let* ((process-environment (browse-url-process-environment))) 1244 (let* ((process-environment (browse-url-process-environment)))
1245 (apply 'start-process 1245 (apply #'start-process
1246 (concat "chromium " url) nil 1246 (concat "chromium " url) nil
1247 browse-url-chromium-program 1247 browse-url-chromium-program
1248 (append 1248 (append
@@ -1260,7 +1260,7 @@ The optional argument NEW-WINDOW is not used."
1260 (interactive (browse-url-interactive-arg "URL: ")) 1260 (interactive (browse-url-interactive-arg "URL: "))
1261 (setq url (browse-url-encode-url url)) 1261 (setq url (browse-url-encode-url url))
1262 (let* ((process-environment (browse-url-process-environment))) 1262 (let* ((process-environment (browse-url-process-environment)))
1263 (apply 'start-process 1263 (apply #'start-process
1264 (concat "google-chrome " url) nil 1264 (concat "google-chrome " url) nil
1265 browse-url-chrome-program 1265 browse-url-chrome-program
1266 (append 1266 (append
@@ -1290,7 +1290,7 @@ used instead of `browse-url-new-window-flag'."
1290 (interactive (browse-url-interactive-arg "URL: ")) 1290 (interactive (browse-url-interactive-arg "URL: "))
1291 (setq url (browse-url-encode-url url)) 1291 (setq url (browse-url-encode-url url))
1292 (let* ((process-environment (browse-url-process-environment)) 1292 (let* ((process-environment (browse-url-process-environment))
1293 (process (apply 'start-process 1293 (process (apply #'start-process
1294 (concat "galeon " url) 1294 (concat "galeon " url)
1295 nil 1295 nil
1296 browse-url-galeon-program 1296 browse-url-galeon-program
@@ -1315,7 +1315,7 @@ used instead of `browse-url-new-window-flag'."
1315 (let* ((process-environment (browse-url-process-environment))) 1315 (let* ((process-environment (browse-url-process-environment)))
1316 ;; Galeon is not running - start it 1316 ;; Galeon is not running - start it
1317 (message "Starting %s..." browse-url-galeon-program) 1317 (message "Starting %s..." browse-url-galeon-program)
1318 (apply 'start-process (concat "galeon " url) nil 1318 (apply #'start-process (concat "galeon " url) nil
1319 browse-url-galeon-program 1319 browse-url-galeon-program
1320 (append browse-url-galeon-startup-arguments (list url)))))) 1320 (append browse-url-galeon-startup-arguments (list url))))))
1321 1321
@@ -1338,7 +1338,7 @@ used instead of `browse-url-new-window-flag'."
1338 (interactive (browse-url-interactive-arg "URL: ")) 1338 (interactive (browse-url-interactive-arg "URL: "))
1339 (setq url (browse-url-encode-url url)) 1339 (setq url (browse-url-encode-url url))
1340 (let* ((process-environment (browse-url-process-environment)) 1340 (let* ((process-environment (browse-url-process-environment))
1341 (process (apply 'start-process 1341 (process (apply #'start-process
1342 (concat "epiphany " url) 1342 (concat "epiphany " url)
1343 nil 1343 nil
1344 browse-url-epiphany-program 1344 browse-url-epiphany-program
@@ -1362,7 +1362,7 @@ used instead of `browse-url-new-window-flag'."
1362 (let* ((process-environment (browse-url-process-environment))) 1362 (let* ((process-environment (browse-url-process-environment)))
1363 ;; Epiphany is not running - start it 1363 ;; Epiphany is not running - start it
1364 (message "Starting %s..." browse-url-epiphany-program) 1364 (message "Starting %s..." browse-url-epiphany-program)
1365 (apply 'start-process (concat "epiphany " url) nil 1365 (apply #'start-process (concat "epiphany " url) nil
1366 browse-url-epiphany-program 1366 browse-url-epiphany-program
1367 (append browse-url-epiphany-startup-arguments (list url)))))) 1367 (append browse-url-epiphany-startup-arguments (list url))))))
1368 1368
@@ -1403,7 +1403,7 @@ When called non-interactively, optional second argument NEW-WINDOW is
1403used instead of `browse-url-new-window-flag'." 1403used instead of `browse-url-new-window-flag'."
1404 (declare (obsolete nil "25.1")) 1404 (declare (obsolete nil "25.1"))
1405 (interactive (browse-url-interactive-arg "URL: ")) 1405 (interactive (browse-url-interactive-arg "URL: "))
1406 (apply 'start-process (concat "gnome-moz-remote " url) 1406 (apply #'start-process (concat "gnome-moz-remote " url)
1407 nil 1407 nil
1408 browse-url-gnome-moz-program 1408 browse-url-gnome-moz-program
1409 (append 1409 (append
@@ -1437,7 +1437,7 @@ NEW-WINDOW instead of `browse-url-new-window-flag'."
1437 (interactive (browse-url-interactive-arg "URL: ")) 1437 (interactive (browse-url-interactive-arg "URL: "))
1438 (setq url (browse-url-encode-url url)) 1438 (setq url (browse-url-encode-url url))
1439 (let* ((process-environment (browse-url-process-environment))) 1439 (let* ((process-environment (browse-url-process-environment)))
1440 (apply 'start-process (format "conkeror %s" url) 1440 (apply #'start-process (format "conkeror %s" url)
1441 nil 1441 nil
1442 browse-url-conkeror-program 1442 browse-url-conkeror-program
1443 (append 1443 (append
@@ -1487,7 +1487,7 @@ The `browse-url-gnudoit-program' program is used with options given by
1487`browse-url-gnudoit-args'. Default to the URL around or before point." 1487`browse-url-gnudoit-args'. Default to the URL around or before point."
1488 (declare (obsolete nil "25.1")) 1488 (declare (obsolete nil "25.1"))
1489 (interactive (browse-url-interactive-arg "W3 URL: ")) 1489 (interactive (browse-url-interactive-arg "W3 URL: "))
1490 (apply 'start-process (concat "gnudoit:" url) nil 1490 (apply #'start-process (concat "gnudoit:" url) nil
1491 browse-url-gnudoit-program 1491 browse-url-gnudoit-program
1492 (append browse-url-gnudoit-args 1492 (append browse-url-gnudoit-args
1493 (list (concat "(w3-fetch \"" url "\")") 1493 (list (concat "(w3-fetch \"" url "\")")
@@ -1667,7 +1667,7 @@ don't offer a form of remote control."
1667 (interactive (browse-url-interactive-arg "URL: ")) 1667 (interactive (browse-url-interactive-arg "URL: "))
1668 (if (not browse-url-generic-program) 1668 (if (not browse-url-generic-program)
1669 (error "No browser defined (`browse-url-generic-program')")) 1669 (error "No browser defined (`browse-url-generic-program')"))
1670 (apply 'call-process browse-url-generic-program nil 1670 (apply #'call-process browse-url-generic-program nil
1671 0 nil 1671 0 nil
1672 (append browse-url-generic-args (list url)))) 1672 (append browse-url-generic-args (list url))))
1673 1673
@@ -1742,9 +1742,9 @@ from `browse-url-elinks-wrapper'."
1742 1742
1743(defvar browse-url-button-map 1743(defvar browse-url-button-map
1744 (let ((map (make-sparse-keymap))) 1744 (let ((map (make-sparse-keymap)))
1745 (define-key map "\r" 'browse-url-button-open) 1745 (define-key map "\r" #'browse-url-button-open)
1746 (define-key map [mouse-2] 'browse-url-button-open) 1746 (define-key map [mouse-2] #'browse-url-button-open)
1747 (define-key map "w" 'browse-url-button-copy) 1747 (define-key map "w" #'browse-url-button-copy)
1748 map) 1748 map)
1749 "The keymap used for browse-url buttons.") 1749 "The keymap used for browse-url buttons.")
1750 1750
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index aba3698a533..5148a66724b 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -76,7 +76,7 @@ You can specify here:
76- dict.org: Only use dict.org 76- dict.org: Only use dict.org
77- User-defined: You can specify your own server here" 77- User-defined: You can specify your own server here"
78 :group 'dictionary 78 :group 'dictionary
79 :set 'dictionary-set-server-var 79 :set #'dictionary-set-server-var
80 :type '(choice (const :tag "Automatic" nil) 80 :type '(choice (const :tag "Automatic" nil)
81 (const :tag "localhost" "localhost") 81 (const :tag "localhost" "localhost")
82 (const :tag "dict.org" "dict.org") 82 (const :tag "dict.org" "dict.org")
@@ -88,7 +88,7 @@ You can specify here:
88 "The port of the dictionary server. 88 "The port of the dictionary server.
89This port is propably always 2628 so there should be no need to modify it." 89This port is propably always 2628 so there should be no need to modify it."
90 :group 'dictionary 90 :group 'dictionary
91 :set 'dictionary-set-server-var 91 :set #'dictionary-set-server-var
92 :type 'number 92 :type 'number
93 :version "28.1") 93 :version "28.1")
94 94
@@ -189,7 +189,7 @@ where the current word was found."
189 nil 189 nil
190 "Connects via a HTTP proxy using the CONNECT command when not nil." 190 "Connects via a HTTP proxy using the CONNECT command when not nil."
191 :group 'dictionary-proxy 191 :group 'dictionary-proxy
192 :set 'dictionary-set-server-var 192 :set #'dictionary-set-server-var
193 :type 'boolean 193 :type 'boolean
194 :version "28.1") 194 :version "28.1")
195 195
@@ -197,7 +197,7 @@ where the current word was found."
197 "proxy" 197 "proxy"
198 "The name of the HTTP proxy to use when `dictionary-use-http-proxy' is set." 198 "The name of the HTTP proxy to use when `dictionary-use-http-proxy' is set."
199 :group 'dictionary-proxy 199 :group 'dictionary-proxy
200 :set 'dictionary-set-server-var 200 :set #'dictionary-set-server-var
201 :type 'string 201 :type 'string
202 :version "28.1") 202 :version "28.1")
203 203
@@ -205,7 +205,7 @@ where the current word was found."
205 3128 205 3128
206 "The port of the proxy server, used only when `dictionary-use-http-proxy' is set." 206 "The port of the proxy server, used only when `dictionary-use-http-proxy' is set."
207 :group 'dictionary-proxy 207 :group 'dictionary-proxy
208 :set 'dictionary-set-server-var 208 :set #'dictionary-set-server-var
209 :type 'number 209 :type 'number
210 :version "28.1") 210 :version "28.1")
211 211
@@ -331,19 +331,19 @@ is utf-8"
331 (suppress-keymap map) 331 (suppress-keymap map)
332 (set-keymap-parent map button-buffer-map) 332 (set-keymap-parent map button-buffer-map)
333 333
334 (define-key map "q" 'dictionary-close) 334 (define-key map "q" #'dictionary-close)
335 (define-key map "h" 'dictionary-help) 335 (define-key map "h" #'dictionary-help)
336 (define-key map "s" 'dictionary-search) 336 (define-key map "s" #'dictionary-search)
337 (define-key map "d" 'dictionary-lookup-definition) 337 (define-key map "d" #'dictionary-lookup-definition)
338 (define-key map "D" 'dictionary-select-dictionary) 338 (define-key map "D" #'dictionary-select-dictionary)
339 (define-key map "M" 'dictionary-select-strategy) 339 (define-key map "M" #'dictionary-select-strategy)
340 (define-key map "m" 'dictionary-match-words) 340 (define-key map "m" #'dictionary-match-words)
341 (define-key map "l" 'dictionary-previous) 341 (define-key map "l" #'dictionary-previous)
342 (define-key map "n" 'forward-button) 342 (define-key map "n" #'forward-button)
343 (define-key map "p" 'backward-button) 343 (define-key map "p" #'backward-button)
344 (define-key map " " 'scroll-up-command) 344 (define-key map " " #'scroll-up-command)
345 (define-key map [?\S-\ ] 'scroll-down-command) 345 (define-key map [?\S-\ ] #'scroll-down-command)
346 (define-key map (read-kbd-macro "M-SPC") 'scroll-down-command) 346 (define-key map (read-kbd-macro "M-SPC") #'scroll-down-command)
347 map) 347 map)
348 "Keymap for the dictionary mode.") 348 "Keymap for the dictionary mode.")
349 349
@@ -413,7 +413,7 @@ This is a quick reference to this mode describing the default key bindings:
413 (make-local-variable 'dictionary-default-dictionary) 413 (make-local-variable 'dictionary-default-dictionary)
414 (make-local-variable 'dictionary-default-strategy) 414 (make-local-variable 'dictionary-default-strategy)
415 415
416 (add-hook 'kill-buffer-hook 'dictionary-close t t) 416 (add-hook 'kill-buffer-hook #'dictionary-close t t)
417 (run-hooks 'dictionary-mode-hook)) 417 (run-hooks 'dictionary-mode-hook))
418 418
419;;;###autoload 419;;;###autoload
@@ -535,7 +535,7 @@ The connection takes the proxy setting in customization group
535;; Dealing with closing the buffer 535;; Dealing with closing the buffer
536;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 536;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
537 537
538(defun dictionary-close (&rest ignored) 538(defun dictionary-close (&rest _ignored)
539 "Close the current dictionary buffer and its connection." 539 "Close the current dictionary buffer and its connection."
540 (interactive) 540 (interactive)
541 (if (eq major-mode 'dictionary-mode) 541 (if (eq major-mode 'dictionary-mode)
@@ -669,7 +669,7 @@ previous state."
669 (setq dictionary-positions (cons (point) (window-start)))) 669 (setq dictionary-positions (cons (point) (window-start))))
670 670
671;; Restore the previous state 671;; Restore the previous state
672(defun dictionary-restore-state (&rest ignored) 672(defun dictionary-restore-state (&rest _ignored)
673 "Restore the state just before the last operation." 673 "Restore the state just before the last operation."
674 (let ((position (pop dictionary-position-stack)) 674 (let ((position (pop dictionary-position-stack))
675 (data (pop dictionary-data-stack))) 675 (data (pop dictionary-data-stack)))
@@ -872,7 +872,7 @@ The word is taken from the buffer, the DICTIONARY is given as argument."
872 'help-echo (concat "Press Mouse-2 to lookup \"" 872 'help-echo (concat "Press Mouse-2 to lookup \""
873 word "\" in \"" dictionary "\""))))) 873 word "\" in \"" dictionary "\"")))))
874 874
875(defun dictionary-select-dictionary (&rest ignored) 875(defun dictionary-select-dictionary (&rest _ignored)
876 "Save the current state and start a dictionary selection." 876 "Save the current state and start a dictionary selection."
877 (interactive) 877 (interactive)
878 (dictionary-ensure-buffer) 878 (dictionary-ensure-buffer)
@@ -880,7 +880,7 @@ The word is taken from the buffer, the DICTIONARY is given as argument."
880 (dictionary-do-select-dictionary) 880 (dictionary-do-select-dictionary)
881 (dictionary-store-state 'dictionary-do-select-dictionary nil)) 881 (dictionary-store-state 'dictionary-do-select-dictionary nil))
882 882
883(defun dictionary-do-select-dictionary (&rest ignored) 883(defun dictionary-do-select-dictionary (&rest _ignored)
884 "The workhorse for doing the dictionary selection." 884 "The workhorse for doing the dictionary selection."
885 885
886 (message "Looking up databases and descriptions") 886 (message "Looking up databases and descriptions")
@@ -916,7 +916,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
916 (dictionary-display-dictionary-line "! \"The first matching dictionary\"") 916 (dictionary-display-dictionary-line "! \"The first matching dictionary\"")
917 (let* ((reply (dictionary-read-answer)) 917 (let* ((reply (dictionary-read-answer))
918 (list (dictionary-simple-split-string reply "\n+"))) 918 (list (dictionary-simple-split-string reply "\n+")))
919 (mapc 'dictionary-display-dictionary-line list)) 919 (mapc #'dictionary-display-dictionary-line list))
920 (dictionary-post-buffer)) 920 (dictionary-post-buffer))
921 921
922(defun dictionary-display-dictionary-line (string) 922(defun dictionary-display-dictionary-line (string)
@@ -984,7 +984,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
984 984
985 (dictionary-store-state 'dictionary-display-more-info dictionary)))) 985 (dictionary-store-state 'dictionary-display-more-info dictionary))))
986 986
987(defun dictionary-select-strategy (&rest ignored) 987(defun dictionary-select-strategy (&rest _ignored)
988 "Save the current state and start a strategy selection." 988 "Save the current state and start a strategy selection."
989 (interactive) 989 (interactive)
990 (dictionary-ensure-buffer) 990 (dictionary-ensure-buffer)
@@ -1014,7 +1014,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
1014 (dictionary-display-strategy-line ". \"The servers default\"") 1014 (dictionary-display-strategy-line ". \"The servers default\"")
1015 (let* ((reply (dictionary-read-answer)) 1015 (let* ((reply (dictionary-read-answer))
1016 (list (dictionary-simple-split-string reply "\n+"))) 1016 (list (dictionary-simple-split-string reply "\n+")))
1017 (mapc 'dictionary-display-strategy-line list)) 1017 (mapc #'dictionary-display-strategy-line list))
1018 (dictionary-post-buffer)) 1018 (dictionary-post-buffer))
1019 1019
1020(defun dictionary-display-strategy-line (string) 1020(defun dictionary-display-strategy-line (string)
@@ -1030,7 +1030,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
1030 'help-echo (purecopy "Mouse-2 to select this matching algorithm")) 1030 'help-echo (purecopy "Mouse-2 to select this matching algorithm"))
1031 (insert "\n"))))) 1031 (insert "\n")))))
1032 1032
1033(defun dictionary-set-strategy (strategy &rest ignored) 1033(defun dictionary-set-strategy (strategy &rest _ignored)
1034 "Select this STRATEGY as new default." 1034 "Select this STRATEGY as new default."
1035 (setq dictionary-default-strategy strategy) 1035 (setq dictionary-default-strategy strategy)
1036 (dictionary-restore-state) 1036 (dictionary-restore-state)
@@ -1194,7 +1194,7 @@ allows editing it."
1194 (describe-function 'dictionary-mode)) 1194 (describe-function 'dictionary-mode))
1195 1195
1196;;;###autoload 1196;;;###autoload
1197(defun dictionary-match-words (&optional pattern &rest ignored) 1197(defun dictionary-match-words (&optional pattern &rest _ignored)
1198 "Search PATTERN in current default dictionary using default strategy." 1198 "Search PATTERN in current default dictionary using default strategy."
1199 (interactive) 1199 (interactive)
1200 ;; can't use interactive because of mouse events 1200 ;; can't use interactive because of mouse events
@@ -1270,7 +1270,7 @@ allows editing it."
1270 1270
1271(defun dictionary-read-definition (&ignore) 1271(defun dictionary-read-definition (&ignore)
1272 (let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+"))) 1272 (let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
1273 (mapconcat 'identity (cdr list) "\n"))) 1273 (mapconcat #'identity (cdr list) "\n")))
1274 1274
1275;;; Tooltip support for GNU Emacs 1275;;; Tooltip support for GNU Emacs
1276(defvar global-dictionary-tooltip-mode 1276(defvar global-dictionary-tooltip-mode
@@ -1322,8 +1322,8 @@ will be set to nil."
1322 (interactive) 1322 (interactive)
1323 (tooltip-mode on) 1323 (tooltip-mode on)
1324 (if on 1324 (if on
1325 (add-hook 'tooltip-functions 'dictionary-display-tooltip) 1325 (add-hook 'tooltip-functions #'dictionary-display-tooltip)
1326 (remove-hook 'tooltip-functions 'dictionary-display-tooltip))) 1326 (remove-hook 'tooltip-functions #'dictionary-display-tooltip)))
1327 1327
1328;;;###autoload 1328;;;###autoload
1329(defun dictionary-tooltip-mode (&optional arg) 1329(defun dictionary-tooltip-mode (&optional arg)
@@ -1364,9 +1364,8 @@ any buffer where (dictionary-tooltip-mode 1) has been called."
1364 (make-local-variable 'dictionary-tooltip-mouse-event) 1364 (make-local-variable 'dictionary-tooltip-mouse-event)
1365 (setq-default track-mouse on) 1365 (setq-default track-mouse on)
1366 (dictionary-switch-tooltip-mode 1) 1366 (dictionary-switch-tooltip-mode 1)
1367 (if on 1367 (global-set-key [mouse-movement]
1368 (global-set-key [mouse-movement] 'dictionary-tooltip-track-mouse) 1368 (if on #'dictionary-tooltip-track-mouse #'ignore))
1369 (global-set-key [mouse-movement] 'ignore))
1370 on)) 1369 on))
1371 1370
1372(provide 'dictionary) 1371(provide 'dictionary)
diff --git a/lisp/net/dig.el b/lisp/net/dig.el
index 92dcf73250b..ddbfb9598b8 100644
--- a/lisp/net/dig.el
+++ b/lisp/net/dig.el
@@ -79,7 +79,7 @@ and is a commonly available debugging tool."
79 (push domain cmdline) 79 (push domain cmdline)
80 (if server (push (concat "@" server) cmdline) 80 (if server (push (concat "@" server) cmdline)
81 (if dig-dns-server (push (concat "@" dig-dns-server) cmdline))) 81 (if dig-dns-server (push (concat "@" dig-dns-server) cmdline)))
82 (apply 'call-process dig-program nil buf nil cmdline) 82 (apply #'call-process dig-program nil buf nil cmdline)
83 buf)) 83 buf))
84 84
85(defun dig-extract-rr (domain &optional type class) 85(defun dig-extract-rr (domain &optional type class)
@@ -120,7 +120,7 @@ Buffer should contain output generated by `dig-invoke'."
120(defvar dig-mode-map 120(defvar dig-mode-map
121 (let ((map (make-sparse-keymap))) 121 (let ((map (make-sparse-keymap)))
122 (define-key map "g" nil) 122 (define-key map "g" nil)
123 (define-key map "q" 'dig-exit) 123 (define-key map "q" #'dig-exit)
124 map)) 124 map))
125 125
126(define-derived-mode dig-mode special-mode "Dig" 126(define-derived-mode dig-mode special-mode "Dig"
diff --git a/lisp/net/dns.el b/lisp/net/dns.el
index 90776e3c6f2..1086bab9466 100644
--- a/lisp/net/dns.el
+++ b/lisp/net/dns.el
@@ -135,8 +135,8 @@ updated. Set this variable to t to disable the check.")
135 (if (stringp ended) 135 (if (stringp ended)
136 (if (null name) 136 (if (null name)
137 ended 137 ended
138 (concat (mapconcat 'identity (nreverse name) ".") "." ended)) 138 (concat (mapconcat #'identity (nreverse name) ".") "." ended))
139 (mapconcat 'identity (nreverse name) ".")))) 139 (mapconcat #'identity (nreverse name) "."))))
140 140
141(defun dns-write (spec &optional tcp-p) 141(defun dns-write (spec &optional tcp-p)
142 "Write a DNS packet according to SPEC. 142 "Write a DNS packet according to SPEC.
@@ -283,7 +283,7 @@ If TCP-P, the first two bytes of the packet will be the length field."
283 (let ((bytes nil)) 283 (let ((bytes nil))
284 (dotimes (_ 4) 284 (dotimes (_ 4)
285 (push (dns-read-bytes 1) bytes)) 285 (push (dns-read-bytes 1) bytes))
286 (mapconcat 'number-to-string (nreverse bytes) "."))) 286 (mapconcat #'number-to-string (nreverse bytes) ".")))
287 ((eq type 'AAAA) 287 ((eq type 'AAAA)
288 (let (hextets) 288 (let (hextets)
289 (dotimes (_ 8) 289 (dotimes (_ 8)
@@ -386,7 +386,7 @@ If REVERSE, look up an IP address."
386 386
387 (when reverse 387 (when reverse
388 (setq name (concat 388 (setq name (concat
389 (mapconcat 'identity (nreverse (split-string name "\\.")) ".") 389 (mapconcat #'identity (nreverse (split-string name "\\.")) ".")
390 ".in-addr.arpa") 390 ".in-addr.arpa")
391 type 'PTR)) 391 type 'PTR))
392 392
diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el
index 456d70ee0fe..1d7af7f5b5f 100644
--- a/lisp/net/eudc-bob.el
+++ b/lisp/net/eudc-bob.el
@@ -41,38 +41,38 @@
41 41
42(defvar eudc-bob-generic-keymap 42(defvar eudc-bob-generic-keymap
43 (let ((map (make-sparse-keymap))) 43 (let ((map (make-sparse-keymap)))
44 (define-key map "s" 'eudc-bob-save-object) 44 (define-key map "s" #'eudc-bob-save-object)
45 (define-key map "!" 'eudc-bob-pipe-object-to-external-program) 45 (define-key map "!" #'eudc-bob-pipe-object-to-external-program)
46 (define-key map [down-mouse-3] 'eudc-bob-popup-menu) 46 (define-key map [down-mouse-3] #'eudc-bob-popup-menu)
47 map) 47 map)
48 "Keymap for multimedia objects.") 48 "Keymap for multimedia objects.")
49 49
50(defvar eudc-bob-image-keymap 50(defvar eudc-bob-image-keymap
51 (let ((map (make-sparse-keymap))) 51 (let ((map (make-sparse-keymap)))
52 (set-keymap-parent map eudc-bob-generic-keymap) 52 (set-keymap-parent map eudc-bob-generic-keymap)
53 (define-key map "t" 'eudc-bob-toggle-inline-display) 53 (define-key map "t" #'eudc-bob-toggle-inline-display)
54 map) 54 map)
55 "Keymap for inline images.") 55 "Keymap for inline images.")
56 56
57(defvar eudc-bob-sound-keymap 57(defvar eudc-bob-sound-keymap
58 (let ((map (make-sparse-keymap))) 58 (let ((map (make-sparse-keymap)))
59 (set-keymap-parent map eudc-bob-generic-keymap) 59 (set-keymap-parent map eudc-bob-generic-keymap)
60 (define-key map (kbd "RET") 'eudc-bob-play-sound-at-point) 60 (define-key map (kbd "RET") #'eudc-bob-play-sound-at-point)
61 (define-key map [down-mouse-2] 'eudc-bob-play-sound-at-mouse) 61 (define-key map [down-mouse-2] #'eudc-bob-play-sound-at-mouse)
62 map) 62 map)
63 "Keymap for inline sounds.") 63 "Keymap for inline sounds.")
64 64
65(defvar eudc-bob-url-keymap 65(defvar eudc-bob-url-keymap
66 (let ((map (make-sparse-keymap))) 66 (let ((map (make-sparse-keymap)))
67 (define-key map (kbd "RET") 'browse-url-at-point) 67 (define-key map (kbd "RET") #'browse-url-at-point)
68 (define-key map [down-mouse-2] 'browse-url-at-mouse) 68 (define-key map [down-mouse-2] #'browse-url-at-mouse)
69 map) 69 map)
70 "Keymap for inline urls.") 70 "Keymap for inline urls.")
71 71
72(defvar eudc-bob-mail-keymap 72(defvar eudc-bob-mail-keymap
73 (let ((map (make-sparse-keymap))) 73 (let ((map (make-sparse-keymap)))
74 (define-key map (kbd "RET") 'goto-address-at-point) 74 (define-key map (kbd "RET") #'goto-address-at-point)
75 (define-key map [down-mouse-2] 'goto-address-at-point) 75 (define-key map [down-mouse-2] #'goto-address-at-point)
76 map) 76 map)
77 "Keymap for inline e-mail addresses.") 77 "Keymap for inline e-mail addresses.")
78 78
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el
index bac75e6555d..66db7814ad8 100644
--- a/lisp/net/eudc-export.el
+++ b/lisp/net/eudc-export.el
@@ -1,4 +1,4 @@
1;;; eudc-export.el --- functions to export EUDC query results 1;;; eudc-export.el --- functions to export EUDC query results -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -35,6 +35,7 @@
35;; NOERROR is so we can compile it. 35;; NOERROR is so we can compile it.
36(require 'bbdb nil t) 36(require 'bbdb nil t)
37(require 'bbdb-com nil t) 37(require 'bbdb-com nil t)
38(require 'cl-lib)
38 39
39(defun eudc-create-bbdb-record (record &optional silent) 40(defun eudc-create-bbdb-record (record &optional silent)
40 "Create a BBDB record using the RECORD alist. 41 "Create a BBDB record using the RECORD alist.
@@ -42,24 +43,22 @@ RECORD is an alist of (KEY . VALUE) where KEY is a directory attribute name
42symbol and VALUE is the corresponding value for the record. 43symbol and VALUE is the corresponding value for the record.
43If SILENT is non-nil then the created BBDB record is not displayed." 44If SILENT is non-nil then the created BBDB record is not displayed."
44 (require 'bbdb) 45 (require 'bbdb)
46 (declare-function bbdb-create-internal "bbdb-com" (&rest spec))
47 (declare-function bbdb-display-records "bbdb"
48 (records &optional layout append))
45 ;; This function runs in a special context where lisp symbols corresponding 49 ;; This function runs in a special context where lisp symbols corresponding
46 ;; to field names in record are bound to the corresponding values 50 ;; to field names in record are bound to the corresponding values
47 (eval 51 (cl-progv (mapcar #'car record) (mapcar #'cdr record)
48 `(let* (,@(mapcar (lambda (c) 52 (let* (bbdb-name
49 (list (car c) (if (listp (cdr c)) 53 bbdb-company
50 (list 'quote (cdr c)) 54 bbdb-net
51 (cdr c)))) 55 bbdb-address
52 record) 56 bbdb-phones
53 bbdb-name 57 bbdb-notes
54 bbdb-company 58 spec
55 bbdb-net 59 bbdb-record
56 bbdb-address 60 value
57 bbdb-phones 61 (conversion-alist (symbol-value eudc-bbdb-conversion-alist)))
58 bbdb-notes
59 spec
60 bbdb-record
61 value
62 (conversion-alist (symbol-value eudc-bbdb-conversion-alist)))
63 62
64 ;; BBDB standard fields 63 ;; BBDB standard fields
65 (setq bbdb-name (eudc-parse-spec (cdr (assq 'name conversion-alist)) record nil) 64 (setq bbdb-name (eudc-parse-spec (cdr (assq 'name conversion-alist)) record nil)
@@ -68,14 +67,14 @@ If SILENT is non-nil then the created BBDB record is not displayed."
68 bbdb-notes (eudc-parse-spec (cdr (assq 'notes conversion-alist)) record nil)) 67 bbdb-notes (eudc-parse-spec (cdr (assq 'notes conversion-alist)) record nil))
69 (setq spec (cdr (assq 'address conversion-alist))) 68 (setq spec (cdr (assq 'address conversion-alist)))
70 (setq bbdb-address (delq nil (eudc-parse-spec (if (listp (car spec)) 69 (setq bbdb-address (delq nil (eudc-parse-spec (if (listp (car spec))
71 spec 70 spec
72 (list spec)) 71 (list spec))
73 record t))) 72 record t)))
74 (setq spec (cdr (assq 'phone conversion-alist))) 73 (setq spec (cdr (assq 'phone conversion-alist)))
75 (setq bbdb-phones (delq nil (eudc-parse-spec (if (listp (car spec)) 74 (setq bbdb-phones (delq nil (eudc-parse-spec (if (listp (car spec))
76 spec 75 spec
77 (list spec)) 76 (list spec))
78 record t))) 77 record t)))
79 ;; BBDB custom fields 78 ;; BBDB custom fields
80 (setq bbdb-notes (append (list (and bbdb-notes (cons 'notes bbdb-notes))) 79 (setq bbdb-notes (append (list (and bbdb-notes (cons 'notes bbdb-notes)))
81 (mapcar (lambda (mapping) 80 (mapcar (lambda (mapping)
@@ -85,19 +84,20 @@ If SILENT is non-nil then the created BBDB record is not displayed."
85 (cons (car mapping) value))) 84 (cons (car mapping) value)))
86 conversion-alist))) 85 conversion-alist)))
87 (setq bbdb-notes (delq nil bbdb-notes)) 86 (setq bbdb-notes (delq nil bbdb-notes))
88 (setq bbdb-record (bbdb-create-internal 87 (setq bbdb-record
89 bbdb-name 88 (apply #'bbdb-create-internal
90 ,@(when (eudc--using-bbdb-3-or-newer-p) 89 `(,bbdb-name
91 '(nil 90 ,@(when (eudc--using-bbdb-3-or-newer-p)
92 nil)) 91 '(nil
93 bbdb-company 92 nil))
94 bbdb-net 93 ,bbdb-company
95 ,@(if (eudc--using-bbdb-3-or-newer-p) 94 ,bbdb-net
96 '(bbdb-phones 95 ,@(if (eudc--using-bbdb-3-or-newer-p)
97 bbdb-address) 96 (list bbdb-phones
98 '(bbdb-address 97 bbdb-address)
99 bbdb-phones)) 98 (list bbdb-address
100 bbdb-notes)) 99 bbdb-phones))
100 ,bbdb-notes)))
101 (or silent 101 (or silent
102 (bbdb-display-records (list bbdb-record)))))) 102 (bbdb-display-records (list bbdb-record))))))
103 103
@@ -111,7 +111,7 @@ If RECURSE is non-nil then SPEC may be a list of atomic specs."
111 (symbolp (car spec)) 111 (symbolp (car spec))
112 (fboundp (car spec)))) 112 (fboundp (car spec))))
113 (condition-case nil 113 (condition-case nil
114 (eval spec) 114 (eval spec t)
115 (void-variable nil))) 115 (void-variable nil)))
116 ((and recurse 116 ((and recurse
117 (listp spec)) 117 (listp spec))
@@ -194,9 +194,9 @@ LOCATION is used as the phone location for BBDB."
194 (signal (car err) (cdr err))))) 194 (signal (car err) (cdr err)))))
195 (if (= 3 (length phone-list)) 195 (if (= 3 (length phone-list))
196 (setq phone-list (append phone-list '(nil)))) 196 (setq phone-list (append phone-list '(nil))))
197 (apply 'vector location phone-list))) 197 (apply #'vector location phone-list)))
198 ((listp phone) 198 ((listp phone)
199 (vector location (mapconcat 'identity phone ", "))) 199 (vector location (mapconcat #'identity phone ", ")))
200 (t 200 (t
201 (error "Invalid phone specification")))) 201 (error "Invalid phone specification"))))
202 202
diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el
index e4b7e8ae71b..a737a99ce95 100644
--- a/lisp/net/eudc-hotlist.el
+++ b/lisp/net/eudc-hotlist.el
@@ -1,4 +1,4 @@
1;;; eudc-hotlist.el --- hotlist management for EUDC 1;;; eudc-hotlist.el --- hotlist management for EUDC -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -37,12 +37,12 @@
37 37
38(defvar eudc-hotlist-mode-map 38(defvar eudc-hotlist-mode-map
39 (let ((map (make-sparse-keymap))) 39 (let ((map (make-sparse-keymap)))
40 (define-key map "a" 'eudc-hotlist-add-server) 40 (define-key map "a" #'eudc-hotlist-add-server)
41 (define-key map "d" 'eudc-hotlist-delete-server) 41 (define-key map "d" #'eudc-hotlist-delete-server)
42 (define-key map "s" 'eudc-hotlist-select-server) 42 (define-key map "s" #'eudc-hotlist-select-server)
43 (define-key map "t" 'eudc-hotlist-transpose-servers) 43 (define-key map "t" #'eudc-hotlist-transpose-servers)
44 (define-key map "q" 'eudc-hotlist-quit-edit) 44 (define-key map "q" #'eudc-hotlist-quit-edit)
45 (define-key map "x" 'kill-current-buffer) 45 (define-key map "x" #'kill-current-buffer)
46 map)) 46 map))
47 47
48(define-derived-mode eudc-hotlist-mode fundamental-mode "EUDC-Servers" 48(define-derived-mode eudc-hotlist-mode fundamental-mode "EUDC-Servers"
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index 4f048045d52..c112d273309 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -65,12 +65,12 @@
65(defvar eudc-mode-map 65(defvar eudc-mode-map
66 (let ((map (make-sparse-keymap))) 66 (let ((map (make-sparse-keymap)))
67 (set-keymap-parent map widget-keymap) 67 (set-keymap-parent map widget-keymap)
68 (define-key map "q" 'kill-current-buffer) 68 (define-key map "q" #'kill-current-buffer)
69 (define-key map "x" 'kill-current-buffer) 69 (define-key map "x" #'kill-current-buffer)
70 (define-key map "f" 'eudc-query-form) 70 (define-key map "f" #'eudc-query-form)
71 (define-key map "b" 'eudc-try-bbdb-insert) 71 (define-key map "b" #'eudc-try-bbdb-insert)
72 (define-key map "n" 'eudc-move-to-next-record) 72 (define-key map "n" #'eudc-move-to-next-record)
73 (define-key map "p" 'eudc-move-to-previous-record) 73 (define-key map "p" #'eudc-move-to-previous-record)
74 map)) 74 map))
75 75
76(defvar mode-popup-menu) 76(defvar mode-popup-menu)
@@ -407,7 +407,7 @@ if any, is called to print the value in cdr of FIELD."
407 (val (cdr field))) 407 (val (cdr field)))
408 (if match 408 (if match
409 (progn 409 (progn
410 (eval (list (cdr match) val)) 410 (funcall (cdr match) val)
411 (insert "\n")) 411 (insert "\n"))
412 (mapc 412 (mapc
413 (lambda (val-elem) 413 (lambda (val-elem)
diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el
index e11458b29cb..e241a1c2fac 100644
--- a/lisp/net/eudcb-bbdb.el
+++ b/lisp/net/eudcb-bbdb.el
@@ -1,4 +1,4 @@
1;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend 1;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -34,6 +34,7 @@
34;; Make it loadable on systems without bbdb. 34;; Make it loadable on systems without bbdb.
35(require 'bbdb nil t) 35(require 'bbdb nil t)
36(require 'bbdb-com nil t) 36(require 'bbdb-com nil t)
37(require 'seq)
37 38
38;;{{{ Internal cooking 39;;{{{ Internal cooking
39 40
@@ -87,33 +88,30 @@ BBDB < 3 used `net'; BBDB >= 3 uses `mail'."
87 "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise." 88 "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise."
88 (require 'bbdb) 89 (require 'bbdb)
89 (catch 'unmatch 90 (catch 'unmatch
90 (progn 91 (dolist (condition eudc-bbdb-current-query)
91 (dolist (condition eudc-bbdb-current-query) 92 (let ((attr (car condition))
92 (let ((attr (car condition)) 93 (val (cdr condition))
93 (val (cdr condition)) 94 (case-fold-search t))
94 (case-fold-search t) 95 (or (and (memq attr '(firstname lastname aka company phones
95 bbdb-val) 96 addresses net))
96 (or (and (memq attr '(firstname lastname aka company phones 97 (let ((bbdb-val
97 addresses net)) 98 (funcall (intern (concat "bbdb-record-"
98 (progn 99 (symbol-name
99 (setq bbdb-val 100 (eudc-bbdb-field
100 (eval (list (intern (concat "bbdb-record-" 101 attr))))
101 (symbol-name 102 record)))
102 (eudc-bbdb-field 103 (if (listp bbdb-val)
103 attr))))
104 'record)))
105 (if (listp bbdb-val)
106 (if eudc-bbdb-enable-substring-matches
107 (eval `(or ,@(mapcar (lambda (subval)
108 (string-match val subval))
109 bbdb-val)))
110 (member (downcase val)
111 (mapcar 'downcase bbdb-val)))
112 (if eudc-bbdb-enable-substring-matches 104 (if eudc-bbdb-enable-substring-matches
113 (string-match val bbdb-val) 105 (seq-some (lambda (subval)
114 (string-equal (downcase val) (downcase bbdb-val)))))) 106 (string-match val subval))
115 (throw 'unmatch nil)))) 107 bbdb-val)
116 record))) 108 (member (downcase val)
109 (mapcar #'downcase bbdb-val)))
110 (if eudc-bbdb-enable-substring-matches
111 (string-match val bbdb-val)
112 (string-equal (downcase val) (downcase bbdb-val))))))
113 (throw 'unmatch nil))))
114 record))
117 115
118;; External. 116;; External.
119(declare-function bbdb-phone-location "ext:bbdb" t) ; via bbdb-defstruct 117(declare-function bbdb-phone-location "ext:bbdb" t) ; via bbdb-defstruct
@@ -182,40 +180,34 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'."
182 (require 'bbdb) 180 (require 'bbdb)
183 (let ((attrs (or eudc-bbdb-current-return-attributes 181 (let ((attrs (or eudc-bbdb-current-return-attributes
184 '(firstname lastname aka company phones addresses net notes))) 182 '(firstname lastname aka company phones addresses net notes)))
185 attr 183 eudc-rec)
186 eudc-rec 184 (dolist (attr attrs)
187 val) 185 (let ((val
188 (while (prog1 186 (pcase attr
189 (setq attr (car attrs)) 187 ('phones (eudc-bbdb-extract-phones record))
190 (setq attrs (cdr attrs))) 188 ('addresses (eudc-bbdb-extract-addresses record))
191 (cond 189 ('notes
192 ((eq attr 'phones) 190 (if (eudc--using-bbdb-3-or-newer-p)
193 (setq val (eudc-bbdb-extract-phones record))) 191 (bbdb-record-xfield record 'notes)
194 ((eq attr 'addresses) 192 (bbdb-record-notes record)))
195 (setq val (eudc-bbdb-extract-addresses record))) 193 ((or 'firstname 'lastname 'aka 'company 'net)
196 ((eq attr 'notes) 194 (funcall (intern
197 (if (eudc--using-bbdb-3-or-newer-p) 195 (concat "bbdb-record-"
198 (setq val (bbdb-record-xfield record 'notes)) 196 (symbol-name (eudc-bbdb-field attr))))
199 (setq val (bbdb-record-notes record)))) 197 record))
200 ((memq attr '(firstname lastname aka company net)) 198 (_
201 (setq val (eval 199 (error "Unknown BBDB attribute")))))
202 (list (intern 200 (cond
203 (concat "bbdb-record-" 201 ((or (not val) (equal val ""))) ; do nothing
204 (symbol-name (eudc-bbdb-field attr)))) 202 ((memq attr '(phones addresses))
205 'record)))) 203 (setq eudc-rec (append val eudc-rec)))
206 (t 204 ((and (listp val)
207 (error "Unknown BBDB attribute"))) 205 (= 1 (length val)))
208 (cond 206 (push (cons attr (car val)) eudc-rec))
209 ((or (not val) (equal val ""))) ; do nothing 207 ((> (length val) 0)
210 ((memq attr '(phones addresses)) 208 (push (cons attr val) eudc-rec))
211 (setq eudc-rec (append val eudc-rec))) 209 (t
212 ((and (listp val) 210 (error "Unexpected attribute value")))))
213 (= 1 (length val)))
214 (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
215 ((> (length val) 0)
216 (setq eudc-rec (cons (cons attr val) eudc-rec)))
217 (t
218 (error "Unexpected attribute value"))))
219 (nreverse eudc-rec))) 211 (nreverse eudc-rec)))
220 212
221 213
@@ -240,21 +232,20 @@ RETURN-ATTRS is a list of attributes to return, defaulting to
240 (while (and records (> (length query-attrs) 0)) 232 (while (and records (> (length query-attrs) 0))
241 (setq bbdb-attrs (append bbdb-attrs (list (car query-attrs)))) 233 (setq bbdb-attrs (append bbdb-attrs (list (car query-attrs))))
242 (if (car query-attrs) 234 (if (car query-attrs)
243 (setq records (eval `(bbdb-search ,(quote records) ,@bbdb-attrs)))) 235 ;; BEWARE: `bbdb-search' is a macro!
236 (setq records (eval `(bbdb-search records ,@bbdb-attrs) t)))
244 (setq query-attrs (cdr query-attrs))) 237 (setq query-attrs (cdr query-attrs)))
245 (mapc (lambda (record) 238 (mapc (lambda (record)
246 (setq filtered (eudc-filter-duplicate-attributes record)) 239 (setq filtered (eudc-filter-duplicate-attributes record))
247 ;; If there were duplicate attributes reverse the order of the 240 ;; If there were duplicate attributes reverse the order of the
248 ;; record so the unique attributes appear first 241 ;; record so the unique attributes appear first
249 (if (> (length filtered) 1) 242 (if (> (length filtered) 1)
250 (setq filtered (mapcar (lambda (rec) 243 (setq filtered (mapcar #'reverse filtered)))
251 (reverse rec))
252 filtered)))
253 (setq result (append result filtered))) 244 (setq result (append result filtered)))
254 (delq nil 245 (delq nil
255 (mapcar 'eudc-bbdb-format-record-as-result 246 (mapcar #'eudc-bbdb-format-record-as-result
256 (delq nil 247 (delq nil
257 (mapcar 'eudc-bbdb-filter-non-matching-record 248 (mapcar #'eudc-bbdb-filter-non-matching-record
258 records))))) 249 records)))))
259 result)) 250 result))
260 251
diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el
index 4623079ea9f..0aff276475e 100644
--- a/lisp/net/eudcb-ldap.el
+++ b/lisp/net/eudcb-ldap.el
@@ -1,4 +1,4 @@
1;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend 1;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -38,10 +38,10 @@
38 38
39;;{{{ Internal cooking 39;;{{{ Internal cooking
40 40
41(eval-and-compile 41(defalias 'eudc-ldap-get-host-parameter
42 (if (fboundp 'ldap-get-host-parameter) 42 (if (fboundp 'ldap-get-host-parameter)
43 (fset 'eudc-ldap-get-host-parameter 'ldap-get-host-parameter) 43 #'ldap-get-host-parameter
44 (defun eudc-ldap-get-host-parameter (host parameter) 44 (lambda (host parameter)
45 "Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'." 45 "Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'."
46 (plist-get (cdr (assoc host ldap-host-parameters-alist)) 46 (plist-get (cdr (assoc host ldap-host-parameters-alist))
47 parameter)))) 47 parameter))))
@@ -84,7 +84,7 @@
84 record)) 84 record))
85 85
86(defun eudc-filter-$ (string) 86(defun eudc-filter-$ (string)
87 (mapconcat 'identity (split-string string "\\$") "\n")) 87 (mapconcat #'identity (split-string string "\\$") "\n"))
88 88
89(defun eudc-ldap-cleanup-record-filtering-addresses (record) 89(defun eudc-ldap-cleanup-record-filtering-addresses (record)
90 "Clean up RECORD to make it suitable for EUDC. 90 "Clean up RECORD to make it suitable for EUDC.
@@ -104,7 +104,7 @@ multiple addresses."
104 (value (cdr field))) 104 (value (cdr field)))
105 (when (and clean-up-addresses 105 (when (and clean-up-addresses
106 (memq name '(postaladdress registeredaddress))) 106 (memq name '(postaladdress registeredaddress)))
107 (setq value (mapcar 'eudc-filter-$ value))) 107 (setq value (mapcar #'eudc-filter-$ value)))
108 (if (eq name 'mail) 108 (if (eq name 'mail)
109 (setq mail-addresses (append mail-addresses value)) 109 (setq mail-addresses (append mail-addresses value))
110 (push (cons name (if (cdr value) 110 (push (cons name (if (cdr value)
@@ -126,9 +126,9 @@ RETURN-ATTRS is a list of attributes to return, defaulting to
126 (let ((result (ldap-search (eudc-ldap-format-query-as-rfc1558 query) 126 (let ((result (ldap-search (eudc-ldap-format-query-as-rfc1558 query)
127 eudc-server 127 eudc-server
128 (if (listp return-attrs) 128 (if (listp return-attrs)
129 (mapcar 'symbol-name return-attrs)))) 129 (mapcar #'symbol-name return-attrs))))
130 final-result) 130 final-result)
131 (setq result (mapcar 'eudc-ldap-cleanup-record-filtering-addresses result)) 131 (setq result (mapcar #'eudc-ldap-cleanup-record-filtering-addresses result))
132 132
133 (if (and eudc-strict-return-matches 133 (if (and eudc-strict-return-matches
134 return-attrs 134 return-attrs
@@ -154,7 +154,7 @@ attribute names are returned. Default to `person'."
154 (let ((ldap-host-parameters-alist 154 (let ((ldap-host-parameters-alist
155 (list (cons eudc-server 155 (list (cons eudc-server
156 '(scope subtree sizelimit 1))))) 156 '(scope subtree sizelimit 1)))))
157 (mapcar 'eudc-ldap-cleanup-record-filtering-addresses 157 (mapcar #'eudc-ldap-cleanup-record-filtering-addresses
158 (ldap-search 158 (ldap-search
159 (eudc-ldap-format-query-as-rfc1558 159 (eudc-ldap-format-query-as-rfc1558
160 (list (cons "objectclass" 160 (list (cons "objectclass"
diff --git a/lisp/net/eudcb-mab.el b/lisp/net/eudcb-mab.el
index eb7032ac4c8..732881f75a0 100644
--- a/lisp/net/eudcb-mab.el
+++ b/lisp/net/eudcb-mab.el
@@ -1,4 +1,4 @@
1;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend 1;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2003-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/net/eudcb-macos-contacts.el b/lisp/net/eudcb-macos-contacts.el
index b07016c1229..18c8958c160 100644
--- a/lisp/net/eudcb-macos-contacts.el
+++ b/lisp/net/eudcb-macos-contacts.el
@@ -1,4 +1,4 @@
1;;; eudcb-macos-contacts.el --- EUDC - macOS Contacts backend 1;;; eudcb-macos-contacts.el --- EUDC - macOS Contacts backend -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2020-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2020-2021 Free Software Foundation, Inc.
4 4
@@ -74,7 +74,7 @@ end tell" str))
74 "`osascript' executable not found. " 74 "`osascript' executable not found. "
75 "Is this is a macOS 10.0 or later system?")))) 75 "Is this is a macOS 10.0 or later system?"))))
76 76
77(defun eudc-macos-contacts-query-internal (query &optional return-attrs) 77(defun eudc-macos-contacts-query-internal (query &optional _return-attrs)
78 "Query macOS Contacts with QUERY. 78 "Query macOS Contacts with QUERY.
79QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid 79QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid
80macOS Contacts attribute names. 80macOS Contacts attribute names.
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index ff58cbb035e..9c7bcdc261a 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -1,4 +1,4 @@
1;;; gnutls.el --- Support SSL/TLS connections through GnuTLS 1;;; gnutls.el --- Support SSL/TLS connections through GnuTLS -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2010-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
4 4
@@ -59,7 +59,6 @@ general, Emacs network security is handled by the Network
59Security Manager (NSM), and the default value of nil delegates 59Security Manager (NSM), and the default value of nil delegates
60the job of checking the connection security to the NSM. 60the job of checking the connection security to the NSM.
61See Info node `(emacs) Network Security'." 61See Info node `(emacs) Network Security'."
62 :group 'gnutls
63 :type '(choice (const nil) 62 :type '(choice (const nil)
64 string)) 63 string))
65 64
@@ -91,7 +90,6 @@ checks are performed at the gnutls level. Instead the checks are
91performed via `open-network-stream' at a higher level by the 90performed via `open-network-stream' at a higher level by the
92Network Security Manager. See Info node `(emacs) Network 91Network Security Manager. See Info node `(emacs) Network
93Security'." 92Security'."
94 :group 'gnutls
95 :version "24.4" 93 :version "24.4"
96 :type '(choice 94 :type '(choice
97 (const t) 95 (const t)
@@ -118,7 +116,6 @@ Security'."
118If a file path contains glob wildcards, they will be expanded. 116If a file path contains glob wildcards, they will be expanded.
119The files may be in PEM or DER format, as per the GnuTLS documentation. 117The files may be in PEM or DER format, as per the GnuTLS documentation.
120The files may not exist, in which case they will be ignored." 118The files may not exist, in which case they will be ignored."
121 :group 'gnutls
122 :type '(choice (function :tag "Function to produce list of bundle filenames") 119 :type '(choice (function :tag "Function to produce list of bundle filenames")
123 (repeat (file :tag "Bundle filename")))) 120 (repeat (file :tag "Bundle filename"))))
124 121
@@ -139,7 +136,6 @@ network security is handled at a higher level via
139node `(emacs) Network Security'." 136node `(emacs) Network Security'."
140 :type '(choice (const :tag "Use default value" nil) 137 :type '(choice (const :tag "Use default value" nil)
141 (integer :tag "Number of bits" 2048)) 138 (integer :tag "Number of bits" 2048))
142 :group 'gnutls
143 :version "27.1") 139 :version "27.1")
144 140
145(defcustom gnutls-crlfiles 141(defcustom gnutls-crlfiles
@@ -150,7 +146,6 @@ node `(emacs) Network Security'."
150If a file path contains glob wildcards, they will be expanded. 146If a file path contains glob wildcards, they will be expanded.
151The files may be in PEM or DER format, as per the GnuTLS documentation. 147The files may be in PEM or DER format, as per the GnuTLS documentation.
152The files may not exist, in which case they will be ignored." 148The files may not exist, in which case they will be ignored."
153 :group 'gnutls
154 :type '(choice (function :tag "Function to produce list of CRL filenames") 149 :type '(choice (function :tag "Function to produce list of CRL filenames")
155 (repeat (file :tag "CRL filename"))) 150 (repeat (file :tag "CRL filename")))
156 :version "27.1") 151 :version "27.1")
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index d1926302470..af12f6970a6 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -1,4 +1,4 @@
1;;; goto-addr.el --- click to browse URL or to send to e-mail address 1;;; goto-addr.el --- click to browse URL or to send to e-mail address -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995, 2000-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995, 2000-2021 Free Software Foundation, Inc.
4 4
@@ -73,19 +73,16 @@
73(defcustom goto-address-fontify-p t 73(defcustom goto-address-fontify-p t
74 "Non-nil means URLs and e-mail addresses in buffer are fontified. 74 "Non-nil means URLs and e-mail addresses in buffer are fontified.
75But only if `goto-address-highlight-p' is also non-nil." 75But only if `goto-address-highlight-p' is also non-nil."
76 :type 'boolean 76 :type 'boolean)
77 :group 'goto-address)
78 77
79(defcustom goto-address-highlight-p t 78(defcustom goto-address-highlight-p t
80 "Non-nil means URLs and e-mail addresses in buffer are highlighted." 79 "Non-nil means URLs and e-mail addresses in buffer are highlighted."
81 :type 'boolean 80 :type 'boolean)
82 :group 'goto-address)
83 81
84(defcustom goto-address-fontify-maximum-size 30000 82(defcustom goto-address-fontify-maximum-size 30000
85 "Maximum size of file in which to fontify and/or highlight URLs. 83 "Maximum size of file in which to fontify and/or highlight URLs.
86A value of t means there is no limit--fontify regardless of the size." 84A value of t means there is no limit--fontify regardless of the size."
87 :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t)) 85 :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t)))
88 :group 'goto-address)
89 86
90(defvar goto-address-mail-regexp 87(defvar goto-address-mail-regexp
91 ;; Actually pretty much any char could appear in the username part. -stef 88 ;; Actually pretty much any char could appear in the username part. -stef
@@ -122,30 +119,26 @@ will have no effect.")
122 119
123(defvar goto-address-highlight-keymap 120(defvar goto-address-highlight-keymap
124 (let ((m (make-sparse-keymap))) 121 (let ((m (make-sparse-keymap)))
125 (define-key m (kbd "<mouse-2>") 'goto-address-at-point) 122 (define-key m (kbd "<mouse-2>") #'goto-address-at-point)
126 (define-key m (kbd "C-c RET") 'goto-address-at-point) 123 (define-key m (kbd "C-c RET") #'goto-address-at-point)
127 m) 124 m)
128 "Keymap to hold goto-addr's mouse key defs under highlighted URLs.") 125 "Keymap to hold goto-addr's mouse key defs under highlighted URLs.")
129 126
130(defcustom goto-address-url-face 'link 127(defcustom goto-address-url-face 'link
131 "Face to use for URLs." 128 "Face to use for URLs."
132 :type 'face 129 :type 'face)
133 :group 'goto-address)
134 130
135(defcustom goto-address-url-mouse-face 'highlight 131(defcustom goto-address-url-mouse-face 'highlight
136 "Face to use for URLs when the mouse is on them." 132 "Face to use for URLs when the mouse is on them."
137 :type 'face 133 :type 'face)
138 :group 'goto-address)
139 134
140(defcustom goto-address-mail-face 'italic 135(defcustom goto-address-mail-face 'italic
141 "Face to use for e-mail addresses." 136 "Face to use for e-mail addresses."
142 :type 'face 137 :type 'face)
143 :group 'goto-address)
144 138
145(defcustom goto-address-mail-mouse-face 'secondary-selection 139(defcustom goto-address-mail-mouse-face 'secondary-selection
146 "Face to use for e-mail addresses when the mouse is on them." 140 "Face to use for e-mail addresses when the mouse is on them."
147 :type 'face 141 :type 'face)
148 :group 'goto-address)
149 142
150(defun goto-address-unfontify (start end) 143(defun goto-address-unfontify (start end)
151 "Remove `goto-address' fontification from the given region." 144 "Remove `goto-address' fontification from the given region."
@@ -287,7 +280,6 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and
287;;;###autoload 280;;;###autoload
288(define-globalized-minor-mode global-goto-address-mode 281(define-globalized-minor-mode global-goto-address-mode
289 goto-address-mode goto-addr-mode--turn-on 282 goto-address-mode goto-addr-mode--turn-on
290 :group 'goto-address
291 :version "28.1") 283 :version "28.1")
292 284
293;;;###autoload 285;;;###autoload
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index d5aad3a3f77..3a561a0ea51 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -1,4 +1,4 @@
1;;; net-utils.el --- network functions 1;;; net-utils.el --- network functions -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -67,17 +67,14 @@
67 "tracert" 67 "tracert"
68 "traceroute") 68 "traceroute")
69 "Program to trace network hops to a destination." 69 "Program to trace network hops to a destination."
70 :group 'net-utils
71 :type 'string) 70 :type 'string)
72 71
73(defcustom traceroute-program-options nil 72(defcustom traceroute-program-options nil
74 "Options for the traceroute program." 73 "Options for the traceroute program."
75 :group 'net-utils
76 :type '(repeat string)) 74 :type '(repeat string))
77 75
78(defcustom ping-program "ping" 76(defcustom ping-program "ping"
79 "Program to send network test packets to a host." 77 "Program to send network test packets to a host."
80 :group 'net-utils
81 :type 'string) 78 :type 'string)
82 79
83;; On GNU/Linux and Irix, the system's ping program seems to send packets 80;; On GNU/Linux and Irix, the system's ping program seems to send packets
@@ -87,7 +84,6 @@
87 (list "-c" "4")) 84 (list "-c" "4"))
88 "Options for the ping program. 85 "Options for the ping program.
89These options can be used to limit how many ICMP packets are emitted." 86These options can be used to limit how many ICMP packets are emitted."
90 :group 'net-utils
91 :type '(repeat string)) 87 :type '(repeat string))
92 88
93(defcustom ifconfig-program 89(defcustom ifconfig-program
@@ -98,7 +94,6 @@ These options can be used to limit how many ICMP packets are emitted."
98 (t "ip")) 94 (t "ip"))
99 "Program to print network configuration information." 95 "Program to print network configuration information."
100 :version "25.1" ; add ip 96 :version "25.1" ; add ip
101 :group 'net-utils
102 :type 'string) 97 :type 'string)
103 98
104(defcustom ifconfig-program-options 99(defcustom ifconfig-program-options
@@ -108,7 +103,6 @@ These options can be used to limit how many ICMP packets are emitted."
108 "Options for the ifconfig program." 103 "Options for the ifconfig program."
109 :version "25.1" 104 :version "25.1"
110 :set-after '(ifconfig-program) 105 :set-after '(ifconfig-program)
111 :group 'net-utils
112 :type '(repeat string)) 106 :type '(repeat string))
113 107
114(defcustom iwconfig-program 108(defcustom iwconfig-program
@@ -116,7 +110,6 @@ These options can be used to limit how many ICMP packets are emitted."
116 ((net-utils--executable-find-sbin "iw") "iw") 110 ((net-utils--executable-find-sbin "iw") "iw")
117 (t "iw")) 111 (t "iw"))
118 "Program to print wireless network configuration information." 112 "Program to print wireless network configuration information."
119 :group 'net-utils
120 :type 'string 113 :type 'string
121 :version "26.1") 114 :version "26.1")
122 115
@@ -124,7 +117,6 @@ These options can be used to limit how many ICMP packets are emitted."
124 (cond ((string-match-p "iw\\'" iwconfig-program) (list "dev")) 117 (cond ((string-match-p "iw\\'" iwconfig-program) (list "dev"))
125 (t nil)) 118 (t nil))
126 "Options for the iwconfig program." 119 "Options for the iwconfig program."
127 :group 'net-utils
128 :type '(repeat string) 120 :type '(repeat string)
129 :version "26.1") 121 :version "26.1")
130 122
@@ -133,25 +125,21 @@ These options can be used to limit how many ICMP packets are emitted."
133 ((net-utils--executable-find-sbin "ss")) 125 ((net-utils--executable-find-sbin "ss"))
134 (t "ss")) 126 (t "ss"))
135 "Program to print network statistics." 127 "Program to print network statistics."
136 :group 'net-utils
137 :type 'string 128 :type 'string
138 :version "26.1") 129 :version "26.1")
139 130
140(defcustom netstat-program-options 131(defcustom netstat-program-options
141 (list "-a") 132 (list "-a")
142 "Options for the netstat program." 133 "Options for the netstat program."
143 :group 'net-utils
144 :type '(repeat string)) 134 :type '(repeat string))
145 135
146(defcustom arp-program (or (net-utils--executable-find-sbin "arp") "arp") 136(defcustom arp-program (or (net-utils--executable-find-sbin "arp") "arp")
147 "Program to print IP to address translation tables." 137 "Program to print IP to address translation tables."
148 :group 'net-utils
149 :type 'string) 138 :type 'string)
150 139
151(defcustom arp-program-options 140(defcustom arp-program-options
152 (list "-a") 141 (list "-a")
153 "Options for the arp program." 142 "Options for the arp program."
154 :group 'net-utils
155 :type '(repeat string)) 143 :type '(repeat string))
156 144
157(defcustom route-program 145(defcustom route-program
@@ -162,7 +150,6 @@ These options can be used to limit how many ICMP packets are emitted."
162 ((net-utils--executable-find-sbin "ip")) 150 ((net-utils--executable-find-sbin "ip"))
163 (t "ip")) 151 (t "ip"))
164 "Program to print routing tables." 152 "Program to print routing tables."
165 :group 'net-utils
166 :type 'string 153 :type 'string
167 :version "26.1") 154 :version "26.1")
168 155
@@ -171,18 +158,15 @@ These options can be used to limit how many ICMP packets are emitted."
171 ((string-match-p "netstat\\'" route-program) (list "-r")) 158 ((string-match-p "netstat\\'" route-program) (list "-r"))
172 (t (list "route"))) 159 (t (list "route")))
173 "Options for the route program." 160 "Options for the route program."
174 :group 'net-utils
175 :type '(repeat string) 161 :type '(repeat string)
176 :version "26.1") 162 :version "26.1")
177 163
178(defcustom nslookup-program "nslookup" 164(defcustom nslookup-program "nslookup"
179 "Program to interactively query DNS information." 165 "Program to interactively query DNS information."
180 :group 'net-utils
181 :type 'string) 166 :type 'string)
182 167
183(defcustom nslookup-program-options nil 168(defcustom nslookup-program-options nil
184 "Options for the nslookup program." 169 "Options for the nslookup program."
185 :group 'net-utils
186 :type '(repeat string)) 170 :type '(repeat string))
187 171
188(defcustom nslookup-prompt-regexp "^> " 172(defcustom nslookup-prompt-regexp "^> "
@@ -190,28 +174,23 @@ These options can be used to limit how many ICMP packets are emitted."
190 174
191This variable is only used if the variable 175This variable is only used if the variable
192`comint-use-prompt-regexp' is non-nil." 176`comint-use-prompt-regexp' is non-nil."
193 :group 'net-utils
194 :type 'regexp) 177 :type 'regexp)
195 178
196(defcustom dig-program "dig" 179(defcustom dig-program "dig"
197 "Program to query DNS information." 180 "Program to query DNS information."
198 :group 'net-utils
199 :type 'string) 181 :type 'string)
200 182
201(defcustom dig-program-options nil 183(defcustom dig-program-options nil
202 "Options for the dig program." 184 "Options for the dig program."
203 :group 'net-utils
204 :type '(repeat string) 185 :type '(repeat string)
205 :version "26.1") 186 :version "26.1")
206 187
207(defcustom ftp-program "ftp" 188(defcustom ftp-program "ftp"
208 "Program to run to do FTP transfers." 189 "Program to run to do FTP transfers."
209 :group 'net-utils
210 :type 'string) 190 :type 'string)
211 191
212(defcustom ftp-program-options nil 192(defcustom ftp-program-options nil
213 "Options for the ftp program." 193 "Options for the ftp program."
214 :group 'net-utils
215 :type '(repeat string)) 194 :type '(repeat string))
216 195
217(defcustom ftp-prompt-regexp "^ftp>" 196(defcustom ftp-prompt-regexp "^ftp>"
@@ -219,17 +198,14 @@ This variable is only used if the variable
219 198
220This variable is only used if the variable 199This variable is only used if the variable
221`comint-use-prompt-regexp' is non-nil." 200`comint-use-prompt-regexp' is non-nil."
222 :group 'net-utils
223 :type 'regexp) 201 :type 'regexp)
224 202
225(defcustom smbclient-program "smbclient" 203(defcustom smbclient-program "smbclient"
226 "Smbclient program." 204 "Smbclient program."
227 :group 'net-utils
228 :type 'string) 205 :type 'string)
229 206
230(defcustom smbclient-program-options nil 207(defcustom smbclient-program-options nil
231 "Options for the smbclient program." 208 "Options for the smbclient program."
232 :group 'net-utils
233 :type '(repeat string)) 209 :type '(repeat string))
234 210
235(defcustom smbclient-prompt-regexp "^smb: >" 211(defcustom smbclient-prompt-regexp "^smb: >"
@@ -237,17 +213,14 @@ This variable is only used if the variable
237 213
238This variable is only used if the variable 214This variable is only used if the variable
239`comint-use-prompt-regexp' is non-nil." 215`comint-use-prompt-regexp' is non-nil."
240 :group 'net-utils
241 :type 'regexp) 216 :type 'regexp)
242 217
243(defcustom dns-lookup-program "host" 218(defcustom dns-lookup-program "host"
244 "Program to interactively query DNS information." 219 "Program to interactively query DNS information."
245 :group 'net-utils
246 :type 'string) 220 :type 'string)
247 221
248(defcustom dns-lookup-program-options nil 222(defcustom dns-lookup-program-options nil
249 "Options for the dns-lookup program." 223 "Options for the dns-lookup program."
250 :group 'net-utils
251 :type '(repeat string)) 224 :type '(repeat string))
252 225
253;; Internal variables 226;; Internal variables
@@ -265,7 +238,7 @@ This variable is only used if the variable
265 1 'font-lock-keyword-face) 238 1 'font-lock-keyword-face)
266 ;; Dotted quads 239 ;; Dotted quads
267 (list 240 (list
268 (mapconcat 'identity 241 (mapconcat #'identity
269 (make-list 4 "[0-9]+") 242 (make-list 4 "[0-9]+")
270 "\\.") 243 "\\.")
271 0 'font-lock-variable-name-face) 244 0 'font-lock-variable-name-face)
@@ -273,7 +246,7 @@ This variable is only used if the variable
273 (list 246 (list
274 (let ((host-expression "[-A-Za-z0-9]+")) 247 (let ((host-expression "[-A-Za-z0-9]+"))
275 (concat 248 (concat
276 (mapconcat 'identity 249 (mapconcat #'identity
277 (make-list 2 host-expression) 250 (make-list 2 host-expression)
278 "\\.") 251 "\\.")
279 "\\(\\." host-expression "\\)*")) 252 "\\(\\." host-expression "\\)*"))
@@ -288,7 +261,7 @@ This variable is only used if the variable
288 (list 261 (list
289 ;; Dotted quads 262 ;; Dotted quads
290 (list 263 (list
291 (mapconcat 'identity (make-list 4 "[0-9]+") "\\.") 264 (mapconcat #'identity (make-list 4 "[0-9]+") "\\.")
292 0 'font-lock-variable-name-face) 265 0 'font-lock-variable-name-face)
293 ;; Simple rfc4291 addresses 266 ;; Simple rfc4291 addresses
294 (list (concat 267 (list (concat
@@ -300,7 +273,7 @@ This variable is only used if the variable
300 (list 273 (list
301 (let ((host-expression "[-A-Za-z0-9]+")) 274 (let ((host-expression "[-A-Za-z0-9]+"))
302 (concat 275 (concat
303 (mapconcat 'identity (make-list 2 host-expression) "\\.") 276 (mapconcat #'identity (make-list 2 host-expression) "\\.")
304 "\\(\\." host-expression "\\)*")) 277 "\\(\\." host-expression "\\)*"))
305 0 'font-lock-variable-name-face)) 278 0 'font-lock-variable-name-face))
306 "Expressions to font-lock for general network utilities.") 279 "Expressions to font-lock for general network utilities.")
@@ -371,8 +344,8 @@ This variable is only used if the variable
371 (erase-buffer) 344 (erase-buffer)
372 (insert header "\n") 345 (insert header "\n")
373 (set-process-filter 346 (set-process-filter
374 (apply 'start-process name buf program args) 347 (apply #'start-process name buf program args)
375 'net-utils-remove-ctrl-m-filter) 348 #'net-utils-remove-ctrl-m-filter)
376 (display-buffer buf) 349 (display-buffer buf)
377 buf)) 350 buf))
378 351
@@ -405,12 +378,12 @@ This variable is only used if the variable
405 `(net-utils-run-simple ,(current-buffer) 378 `(net-utils-run-simple ,(current-buffer)
406 ,program-name ,args nodisplay)) 379 ,program-name ,args nodisplay))
407 (set-process-filter 380 (set-process-filter
408 (apply 'start-process program-name 381 (apply #'start-process program-name
409 (current-buffer) program-name args) 382 (current-buffer) program-name args)
410 'net-utils-remove-ctrl-m-filter) 383 #'net-utils-remove-ctrl-m-filter)
411 (unless nodisplay (display-buffer (current-buffer))))) 384 (unless nodisplay (display-buffer (current-buffer)))))
412 385
413(defun net-utils--revert-function (&optional ignore-auto noconfirm) 386(defun net-utils--revert-function (&optional _ignore-auto _noconfirm)
414 (message "Reverting `%s'..." (buffer-name)) 387 (message "Reverting `%s'..." (buffer-name))
415 (apply (car net-utils--revert-cmd) (cdr net-utils--revert-cmd)) 388 (apply (car net-utils--revert-cmd) (cdr net-utils--revert-cmd))
416 (let ((proc (get-buffer-process (current-buffer)))) 389 (let ((proc (get-buffer-process (current-buffer))))
@@ -430,7 +403,7 @@ This variable is only used if the variable
430 ifconfig-program 403 ifconfig-program
431 ifconfig-program-options)) 404 ifconfig-program-options))
432 405
433(defalias 'ipconfig 'ifconfig) 406(defalias 'ipconfig #'ifconfig)
434 407
435;;;###autoload 408;;;###autoload
436(defun iwconfig () 409(defun iwconfig ()
@@ -532,7 +505,7 @@ in Lisp code."
532 (net-utils-run-program 505 (net-utils-run-program
533 "Nslookup" 506 "Nslookup"
534 (concat "** " 507 (concat "** "
535 (mapconcat 'identity 508 (mapconcat #'identity
536 (list "Nslookup" host nslookup-program) 509 (list "Nslookup" host nslookup-program)
537 " ** ")) 510 " ** "))
538 nslookup-program 511 nslookup-program
@@ -618,7 +591,7 @@ This command uses `nslookup-program' to look up DNS records."
618 591
619(defvar nslookup-mode-map 592(defvar nslookup-mode-map
620 (let ((map (make-sparse-keymap))) 593 (let ((map (make-sparse-keymap)))
621 (define-key map "\t" 'completion-at-point) 594 (define-key map "\t" #'completion-at-point)
622 map)) 595 map))
623 596
624;; Using a derived mode gives us keymaps, hooks, etc. 597;; Using a derived mode gives us keymaps, hooks, etc.
@@ -646,9 +619,9 @@ This command uses `dns-lookup-program' for looking up the DNS information."
646 (net-utils-run-program 619 (net-utils-run-program
647 (concat "DNS Lookup [" host "]") 620 (concat "DNS Lookup [" host "]")
648 (concat "** " 621 (concat "** "
649 (mapconcat 'identity 622 (mapconcat #'identity
650 (list "DNS Lookup" host dns-lookup-program) 623 (list "DNS Lookup" host dns-lookup-program)
651 " ** ")) 624 " ** "))
652 dns-lookup-program 625 dns-lookup-program
653 options))) 626 options)))
654 627
@@ -669,13 +642,14 @@ This command uses `dig-program' for looking up the DNS information."
669 (net-utils-run-program 642 (net-utils-run-program
670 "Dig" 643 "Dig"
671 (concat "** " 644 (concat "** "
672 (mapconcat 'identity 645 (mapconcat #'identity
673 (list "Dig" host dig-program) 646 (list "Dig" host dig-program)
674 " ** ")) 647 " ** "))
675 dig-program 648 dig-program
676 options))) 649 options)))
677 650
678(autoload 'comint-exec "comint") 651(autoload 'comint-exec "comint")
652(declare-function comint-watch-for-password-prompt "comint" (string))
679 653
680;; This is a lot less than ange-ftp, but much simpler. 654;; This is a lot less than ange-ftp, but much simpler.
681;;;###autoload 655;;;###autoload
@@ -697,7 +671,7 @@ This command uses `dig-program' for looking up the DNS information."
697(defvar ftp-mode-map 671(defvar ftp-mode-map
698 (let ((map (make-sparse-keymap))) 672 (let ((map (make-sparse-keymap)))
699 ;; Occasionally useful 673 ;; Occasionally useful
700 (define-key map "\t" 'completion-at-point) 674 (define-key map "\t" #'completion-at-point)
701 map)) 675 map))
702 676
703(define-derived-mode ftp-mode comint-mode "FTP" 677(define-derived-mode ftp-mode comint-mode "FTP"
@@ -710,9 +684,9 @@ This command uses `dig-program' for looking up the DNS information."
710 ;; password prompts will probably immediately follow the initial 684 ;; password prompts will probably immediately follow the initial
711 ;; connection), but it's better than getting prompted twice for the 685 ;; connection), but it's better than getting prompted twice for the
712 ;; same password. 686 ;; same password.
713 (unless (memq 'comint-watch-for-password-prompt 687 (unless (memq #'comint-watch-for-password-prompt
714 (default-value 'comint-output-filter-functions)) 688 (default-value 'comint-output-filter-functions))
715 (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt 689 (add-hook 'comint-output-filter-functions #'comint-watch-for-password-prompt
716 nil t))) 690 nil t)))
717 691
718(defun smbclient (host service) 692(defun smbclient (host service)
@@ -759,9 +733,9 @@ This command uses `smbclient-program' to connect to HOST."
759 ;; password prompts will probably immediately follow the initial 733 ;; password prompts will probably immediately follow the initial
760 ;; connection), but it's better than getting prompted twice for the 734 ;; connection), but it's better than getting prompted twice for the
761 ;; same password. 735 ;; same password.
762 (unless (memq 'comint-watch-for-password-prompt 736 (unless (memq #'comint-watch-for-password-prompt
763 (default-value 'comint-output-filter-functions)) 737 (default-value 'comint-output-filter-functions))
764 (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt 738 (add-hook 'comint-output-filter-functions #'comint-watch-for-password-prompt
765 nil t))) 739 nil t)))
766 740
767 741
@@ -810,7 +784,7 @@ This list is not complete.")
810 (error "Could not open connection to %s" host)) 784 (error "Could not open connection to %s" host))
811 (erase-buffer) 785 (erase-buffer)
812 (set-marker (process-mark tcp-connection) (point-min)) 786 (set-marker (process-mark tcp-connection) (point-min))
813 (set-process-filter tcp-connection 'net-utils-remove-ctrl-m-filter) 787 (set-process-filter tcp-connection #'net-utils-remove-ctrl-m-filter)
814 (and initial-string 788 (and initial-string
815 (process-send-string tcp-connection 789 (process-send-string tcp-connection
816 (concat initial-string "\r\n"))) 790 (concat initial-string "\r\n")))
@@ -825,7 +799,6 @@ This list is not complete.")
825If a host name passed to `finger' matches one of these regular 799If a host name passed to `finger' matches one of these regular
826expressions, it is assumed to be a host that doesn't accept 800expressions, it is assumed to be a host that doesn't accept
827queries of the form USER@HOST, and wants a query containing USER only." 801queries of the form USER@HOST, and wants a query containing USER only."
828 :group 'net-utils
829 :type '(repeat regexp) 802 :type '(repeat regexp)
830 :version "21.1") 803 :version "21.1")
831 804
@@ -852,7 +825,7 @@ and `network-connection-service-alist', which see."
852 (let* ((user-and-host (concat user "@" host)) 825 (let* ((user-and-host (concat user "@" host))
853 (process-name (concat "Finger [" user-and-host "]")) 826 (process-name (concat "Finger [" user-and-host "]"))
854 (regexps finger-X.500-host-regexps) 827 (regexps finger-X.500-host-regexps)
855 found) 828 ) ;; found
856 (and regexps 829 (and regexps
857 (while (not (string-match (car regexps) host)) 830 (while (not (string-match (car regexps) host))
858 (setq regexps (cdr regexps))) 831 (setq regexps (cdr regexps)))
@@ -866,7 +839,6 @@ and `network-connection-service-alist', which see."
866 839
867(defcustom whois-server-name "rs.internic.net" 840(defcustom whois-server-name "rs.internic.net"
868 "Default host name for the whois service." 841 "Default host name for the whois service."
869 :group 'net-utils
870 :type 'string) 842 :type 'string)
871 843
872(defcustom whois-server-list 844(defcustom whois-server-list
@@ -880,7 +852,6 @@ and `network-connection-service-alist', which see."
880 ("whois.nic.gov") 852 ("whois.nic.gov")
881 ("whois.ripe.net")) 853 ("whois.ripe.net"))
882 "A list of whois servers that can be queried." 854 "A list of whois servers that can be queried."
883 :group 'net-utils
884 :type '(repeat (list string))) 855 :type '(repeat (list string)))
885 856
886;; FIXME: modern whois clients include a much better tld <-> whois server 857;; FIXME: modern whois clients include a much better tld <-> whois server
@@ -903,14 +874,12 @@ and `network-connection-service-alist', which see."
903 ("whois.nic.gov" . "gov") 874 ("whois.nic.gov" . "gov")
904 ("whois.nic.mil" . "mil")) 875 ("whois.nic.mil" . "mil"))
905 "Alist to map top level domains to whois servers." 876 "Alist to map top level domains to whois servers."
906 :group 'net-utils
907 :type '(repeat (cons string string))) 877 :type '(repeat (cons string string)))
908 878
909(defcustom whois-guess-server t 879(defcustom whois-guess-server t
910 "If non-nil then whois will try to deduce the appropriate whois 880 "If non-nil then whois will try to deduce the appropriate whois
911server from the query. If the query doesn't look like a domain or hostname 881server from the query. If the query doesn't look like a domain or hostname
912then the server named by `whois-server-name' is used." 882then the server named by `whois-server-name' is used."
913 :group 'net-utils
914 :type 'boolean) 883 :type 'boolean)
915 884
916(defun whois-get-tld (host) 885(defun whois-get-tld (host)
@@ -951,7 +920,6 @@ The port is deduced from `network-connection-service-alist'."
951 920
952(defcustom whois-reverse-lookup-server "whois.arin.net" 921(defcustom whois-reverse-lookup-server "whois.arin.net"
953 "Server which provides inverse DNS mapping." 922 "Server which provides inverse DNS mapping."
954 :group 'net-utils
955 :type 'string) 923 :type 'string)
956 924
957;;;###autoload 925;;;###autoload
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index b45cefcb442..1983688cef2 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -248,8 +248,7 @@ gnutls-boot (as returned by `gnutls-boot-parameters')."
248 (list key cert))))))) 248 (list key cert)))))))
249 249
250;;;###autoload 250;;;###autoload
251(defalias 'open-protocol-stream 'open-network-stream) 251(define-obsolete-function-alias 'open-protocol-stream #'open-network-stream
252(define-obsolete-function-alias 'open-protocol-stream 'open-network-stream
253 "26.1") 252 "26.1")
254 253
255(defun network-stream-open-plain (name buffer host service parameters) 254(defun network-stream-open-plain (name buffer host service parameters)
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 418c1e2e966..c5488650b99 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -163,7 +163,7 @@ These were mostly extracted from the Radio Community Server
163You may add other entries in `newsticker-url-list'." 163You may add other entries in `newsticker-url-list'."
164 :type `(set ,@(mapcar #'newsticker--splicer 164 :type `(set ,@(mapcar #'newsticker--splicer
165 newsticker--raw-url-list-defaults)) 165 newsticker--raw-url-list-defaults))
166 :set 'newsticker--set-customvar-retrieval 166 :set #'newsticker--set-customvar-retrieval
167 :group 'newsticker-retrieval) 167 :group 'newsticker-retrieval)
168 168
169(defcustom newsticker-url-list nil 169(defcustom newsticker-url-list nil
@@ -217,7 +217,7 @@ which apply for this feed only, overriding the value of
217 (choice :tag "Wget Arguments" 217 (choice :tag "Wget Arguments"
218 (const :tag "Default arguments" nil) 218 (const :tag "Default arguments" nil)
219 (repeat :tag "Special arguments" string)))) 219 (repeat :tag "Special arguments" string))))
220 :set 'newsticker--set-customvar-retrieval 220 :set #'newsticker--set-customvar-retrieval
221 :group 'newsticker-retrieval) 221 :group 'newsticker-retrieval)
222 222
223(defcustom newsticker-retrieval-method 223(defcustom newsticker-retrieval-method
@@ -260,7 +260,7 @@ make it less than 1800 seconds (30 minutes)!"
260 (const :tag "Daily" 86400) 260 (const :tag "Daily" 86400)
261 (const :tag "Weekly" 604800) 261 (const :tag "Weekly" 604800)
262 (integer :tag "Interval")) 262 (integer :tag "Interval"))
263 :set 'newsticker--set-customvar-retrieval 263 :set #'newsticker--set-customvar-retrieval
264 :group 'newsticker-retrieval) 264 :group 'newsticker-retrieval)
265 265
266(defcustom newsticker-desc-comp-max 266(defcustom newsticker-desc-comp-max
@@ -549,7 +549,7 @@ name/timer pair to `newsticker--retrieval-timer-list'."
549 (if (<= interval 0) 549 (if (<= interval 0)
550 (setq interval nil)) 550 (setq interval nil))
551 (setq timer (run-at-time start-time interval 551 (setq timer (run-at-time start-time interval
552 'newsticker-get-news feed-name)) 552 #'newsticker-get-news feed-name))
553 (if interval 553 (if interval
554 (add-to-list 'newsticker--retrieval-timer-list 554 (add-to-list 'newsticker--retrieval-timer-list
555 (cons feed-name timer)))))) 555 (cons feed-name timer))))))
@@ -727,10 +727,10 @@ See `newsticker-get-news'."
727 (error "Another wget-process is running for %s" feed-name)) 727 (error "Another wget-process is running for %s" feed-name))
728 ;; start wget 728 ;; start wget
729 (let* ((args (append wget-arguments (list url))) 729 (let* ((args (append wget-arguments (list url)))
730 (proc (apply 'start-process feed-name buffername 730 (proc (apply #'start-process feed-name buffername
731 newsticker-wget-name args))) 731 newsticker-wget-name args)))
732 (set-process-coding-system proc 'no-conversion 'no-conversion) 732 (set-process-coding-system proc 'no-conversion 'no-conversion)
733 (set-process-sentinel proc 'newsticker--sentinel) 733 (set-process-sentinel proc #'newsticker--sentinel)
734 (process-put proc 'nt-feed-name feed-name) 734 (process-put proc 'nt-feed-name feed-name)
735 (setq newsticker--process-ids (cons (process-id proc) 735 (setq newsticker--process-ids (cons (process-id proc)
736 newsticker--process-ids)) 736 newsticker--process-ids))
@@ -1131,9 +1131,9 @@ Restore an xml-string from a an xml NODE that was returned by xml-parse..."
1131 (children (cddr node))) 1131 (children (cddr node)))
1132 (concat "<" qname 1132 (concat "<" qname
1133 (when att-list " ") 1133 (when att-list " ")
1134 (mapconcat 'newsticker--unxml-attribute att-list " ") 1134 (mapconcat #'newsticker--unxml-attribute att-list " ")
1135 ">" 1135 ">"
1136 (mapconcat 'newsticker--unxml children "") "</" qname ">"))) 1136 (mapconcat #'newsticker--unxml children "") "</" qname ">")))
1137 1137
1138(defun newsticker--unxml-attribute (attribute) 1138(defun newsticker--unxml-attribute (attribute)
1139 "Actually restore xml-string of an ATTRIBUTE of an xml node." 1139 "Actually restore xml-string of an ATTRIBUTE of an xml node."
@@ -1580,7 +1580,7 @@ Remove the pre-formatted from `newsticker--cache'."
1580 "Forget all cached pre-formatted data. 1580 "Forget all cached pre-formatted data.
1581Remove the pre-formatted from `newsticker--cache'." 1581Remove the pre-formatted from `newsticker--cache'."
1582 (mapc (lambda (feed) 1582 (mapc (lambda (feed)
1583 (mapc 'newsticker--do-forget-preformatted 1583 (mapc #'newsticker--do-forget-preformatted
1584 (cdr feed))) 1584 (cdr feed)))
1585 newsticker--cache) 1585 newsticker--cache)
1586 (when (fboundp 'newsticker--buffer-set-uptodate) 1586 (when (fboundp 'newsticker--buffer-set-uptodate)
@@ -1593,7 +1593,7 @@ This function calls `message' with arguments STRING and ARGS, if
1593 (and newsticker-debug 1593 (and newsticker-debug
1594 ;;(not (active-minibuffer-window)) 1594 ;;(not (active-minibuffer-window))
1595 ;;(not (current-message)) 1595 ;;(not (current-message))
1596 (apply 'message string args))) 1596 (apply #'message string args)))
1597 1597
1598(defun newsticker--decode-iso8601-date (string) 1598(defun newsticker--decode-iso8601-date (string)
1599 "Return ISO8601-encoded STRING in format like `encode-time'. 1599 "Return ISO8601-encoded STRING in format like `encode-time'.
@@ -1751,10 +1751,10 @@ Save image as FILENAME in DIRECTORY, download it from URL."
1751 feed-name)) 1751 feed-name))
1752 ;; start wget 1752 ;; start wget
1753 (let* ((args (append wget-arguments (list url))) 1753 (let* ((args (append wget-arguments (list url)))
1754 (proc (apply 'start-process proc-name buffername 1754 (proc (apply #'start-process proc-name buffername
1755 newsticker-wget-name args))) 1755 newsticker-wget-name args)))
1756 (set-process-coding-system proc 'no-conversion 'no-conversion) 1756 (set-process-coding-system proc 'no-conversion 'no-conversion)
1757 (set-process-sentinel proc 'newsticker--image-sentinel) 1757 (set-process-sentinel proc #'newsticker--image-sentinel)
1758 (process-put proc 'nt-directory directory) 1758 (process-put proc 'nt-directory directory)
1759 (process-put proc 'nt-feed-name feed-name) 1759 (process-put proc 'nt-feed-name feed-name)
1760 (process-put proc 'nt-filename filename))))) 1760 (process-put proc 'nt-filename filename)))))
@@ -2149,7 +2149,7 @@ FEED is a symbol!"
2149 "Save cache data for all feeds." 2149 "Save cache data for all feeds."
2150 (unless (file-directory-p newsticker-dir) 2150 (unless (file-directory-p newsticker-dir)
2151 (make-directory newsticker-dir t)) 2151 (make-directory newsticker-dir t))
2152 (mapc 'newsticker--cache-save-feed newsticker--cache) 2152 (mapc #'newsticker--cache-save-feed newsticker--cache)
2153 nil) 2153 nil)
2154 2154
2155(defun newsticker--cache-save-feed (feed) 2155(defun newsticker--cache-save-feed (feed)
@@ -2223,7 +2223,7 @@ If AGES is nil, the total number of items is returned."
2223(defun newsticker--stat-num-items-total (&optional age) 2223(defun newsticker--stat-num-items-total (&optional age)
2224 "Return total number of items in all feeds which have the given AGE. 2224 "Return total number of items in all feeds which have the given AGE.
2225If AGE is nil, the total number of items is returned." 2225If AGE is nil, the total number of items is returned."
2226 (apply '+ 2226 (apply #'+
2227 (mapcar (lambda (feed) 2227 (mapcar (lambda (feed)
2228 (if age 2228 (if age
2229 (newsticker--stat-num-items (intern (car feed)) age) 2229 (newsticker--stat-num-items (intern (car feed)) age)
@@ -2395,7 +2395,7 @@ the item."
2395 (make-directory temp-dir t)) 2395 (make-directory temp-dir t))
2396 (cd temp-dir) 2396 (cd temp-dir)
2397 (message "Getting image %s" url) 2397 (message "Getting image %s" url)
2398 (apply 'start-process "wget-image" 2398 (apply #'start-process "wget-image"
2399 " *newsticker-wget-download-images*" 2399 " *newsticker-wget-download-images*"
2400 newsticker-wget-name 2400 newsticker-wget-name
2401 (list url)) 2401 (list url))
@@ -2417,7 +2417,7 @@ This function is suited for adding it to `newsticker-new-item-functions'."
2417 (make-directory temp-dir t)) 2417 (make-directory temp-dir t))
2418 (cd temp-dir) 2418 (cd temp-dir)
2419 (message "Getting enclosure %s" url) 2419 (message "Getting enclosure %s" url)
2420 (apply 'start-process "wget-enclosure" 2420 (apply #'start-process "wget-enclosure"
2421 " *newsticker-wget-download-enclosures*" 2421 " *newsticker-wget-download-enclosures*"
2422 newsticker-wget-name 2422 newsticker-wget-name
2423 (list url)) 2423 (list url))
diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el
index 21d47b838f5..705bff666af 100644
--- a/lisp/net/newst-plainview.el
+++ b/lisp/net/newst-plainview.el
@@ -1,4 +1,4 @@
1;;; newst-plainview.el --- Single buffer frontend for newsticker. 1;;; newst-plainview.el --- Single buffer frontend for newsticker. -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2003-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
4 4
@@ -90,7 +90,7 @@ The following sort methods are available:
90 (const :tag "Keep original order" sort-by-original-order) 90 (const :tag "Keep original order" sort-by-original-order)
91 (const :tag "Sort by time" sort-by-time) 91 (const :tag "Sort by time" sort-by-time)
92 (const :tag "Sort by title" sort-by-title)) 92 (const :tag "Sort by title" sort-by-title))
93 :set 'newsticker--set-customvar-sorting 93 :set #'newsticker--set-customvar-sorting
94 :group 'newsticker-plainview) 94 :group 'newsticker-plainview)
95 95
96(defcustom newsticker-heading-format 96(defcustom newsticker-heading-format
@@ -107,7 +107,7 @@ The following printf-like specifiers can be used:
107%s The statistical data of the feed. See `newsticker-statistics-format'. 107%s The statistical data of the feed. See `newsticker-statistics-format'.
108%t The title of the feed, i.e. its name." 108%t The title of the feed, i.e. its name."
109 :type 'string 109 :type 'string
110 :set 'newsticker--set-customvar-formatting 110 :set #'newsticker--set-customvar-formatting
111 :group 'newsticker-plainview) 111 :group 'newsticker-plainview)
112 112
113(defcustom newsticker-item-format 113(defcustom newsticker-item-format
@@ -122,7 +122,7 @@ The following printf-like specifiers can be used:
122 the title of the feed is used. 122 the title of the feed is used.
123%t The title of the item." 123%t The title of the item."
124 :type 'string 124 :type 'string
125 :set 'newsticker--set-customvar-formatting 125 :set #'newsticker--set-customvar-formatting
126 :group 'newsticker-plainview) 126 :group 'newsticker-plainview)
127 127
128(defcustom newsticker-desc-format 128(defcustom newsticker-desc-format
@@ -133,7 +133,7 @@ The following printf-like specifiers can be used:
133%d The date the item was (first) retrieved. See 133%d The date the item was (first) retrieved. See
134 `newsticker-date-format'." 134 `newsticker-date-format'."
135 :type 'string 135 :type 'string
136 :set 'newsticker--set-customvar-formatting 136 :set #'newsticker--set-customvar-formatting
137 :group 'newsticker-plainview) 137 :group 'newsticker-plainview)
138 138
139(defcustom newsticker-statistics-format 139(defcustom newsticker-statistics-format
@@ -146,7 +146,7 @@ The following printf-like specifiers can be used:
146%o The number of old items in the feed. 146%o The number of old items in the feed.
147%O The number of obsolete items in the feed." 147%O The number of obsolete items in the feed."
148 :type 'string 148 :type 'string
149 :set 'newsticker--set-customvar-formatting 149 :set #'newsticker--set-customvar-formatting
150 :group 'newsticker-plainview) 150 :group 'newsticker-plainview)
151 151
152 152
@@ -195,7 +195,7 @@ If set to t old items will be completely folded and only new
195items will show up in the *newsticker* buffer. Otherwise old as 195items will show up in the *newsticker* buffer. Otherwise old as
196well as new items will be visible." 196well as new items will be visible."
197 :type 'boolean 197 :type 'boolean
198 :set 'newsticker--set-customvar-buffer 198 :set #'newsticker--set-customvar-buffer
199 :group 'newsticker-plainview) 199 :group 'newsticker-plainview)
200 200
201(defcustom newsticker-show-descriptions-of-new-items 201(defcustom newsticker-show-descriptions-of-new-items
@@ -204,14 +204,14 @@ well as new items will be visible."
204If set to t old items will be folded and new items will be 204If set to t old items will be folded and new items will be
205unfolded. Otherwise old as well as new items will be folded." 205unfolded. Otherwise old as well as new items will be folded."
206 :type 'boolean 206 :type 'boolean
207 :set 'newsticker--set-customvar-buffer 207 :set #'newsticker--set-customvar-buffer
208 :group 'newsticker-plainview) 208 :group 'newsticker-plainview)
209 209
210(defcustom newsticker-show-all-news-elements 210(defcustom newsticker-show-all-news-elements
211 nil 211 nil
212 "Show all news elements." 212 "Show all news elements."
213 :type 'boolean 213 :type 'boolean
214 ;;:set 'newsticker--set-customvar 214 ;;:set #'newsticker--set-customvar
215 :group 'newsticker-plainview) 215 :group 'newsticker-plainview)
216 216
217;; ====================================================================== 217;; ======================================================================
@@ -386,51 +386,45 @@ images."
386 386
387(defvar newsticker-mode-map 387(defvar newsticker-mode-map
388 (let ((map (make-keymap))) 388 (let ((map (make-keymap)))
389 (define-key map "sO" 'newsticker-show-old-items) 389 (define-key map "sO" #'newsticker-show-old-items)
390 (define-key map "hO" 'newsticker-hide-old-items) 390 (define-key map "hO" #'newsticker-hide-old-items)
391 (define-key map "sa" 'newsticker-show-all-desc) 391 (define-key map "sa" #'newsticker-show-all-desc)
392 (define-key map "ha" 'newsticker-hide-all-desc) 392 (define-key map "ha" #'newsticker-hide-all-desc)
393 (define-key map "sf" 'newsticker-show-feed-desc) 393 (define-key map "sf" #'newsticker-show-feed-desc)
394 (define-key map "hf" 'newsticker-hide-feed-desc) 394 (define-key map "hf" #'newsticker-hide-feed-desc)
395 (define-key map "so" 'newsticker-show-old-item-desc) 395 (define-key map "so" #'newsticker-show-old-item-desc)
396 (define-key map "ho" 'newsticker-hide-old-item-desc) 396 (define-key map "ho" #'newsticker-hide-old-item-desc)
397 (define-key map "sn" 'newsticker-show-new-item-desc) 397 (define-key map "sn" #'newsticker-show-new-item-desc)
398 (define-key map "hn" 'newsticker-hide-new-item-desc) 398 (define-key map "hn" #'newsticker-hide-new-item-desc)
399 (define-key map "se" 'newsticker-show-entry) 399 (define-key map "se" #'newsticker-show-entry)
400 (define-key map "he" 'newsticker-hide-entry) 400 (define-key map "he" #'newsticker-hide-entry)
401 (define-key map "sx" 'newsticker-show-extra) 401 (define-key map "sx" #'newsticker-show-extra)
402 (define-key map "hx" 'newsticker-hide-extra) 402 (define-key map "hx" #'newsticker-hide-extra)
403 403
404 (define-key map [?\S-\ ] 'scroll-down-command) 404 (define-key map [?\S-\ ] #'scroll-down-command)
405 (define-key map " " 'scroll-up-command) 405 (define-key map " " #'scroll-up-command)
406 (define-key map "q" 'newsticker-close-buffer) 406 (define-key map "q" #'newsticker-close-buffer)
407 (define-key map "p" 'newsticker-previous-item) 407 (define-key map "p" #'newsticker-previous-item)
408 (define-key map "P" 'newsticker-previous-new-item) 408 (define-key map "P" #'newsticker-previous-new-item)
409 (define-key map "F" 'newsticker-previous-feed) 409 (define-key map "F" #'newsticker-previous-feed)
410 (define-key map "\t" 'newsticker-next-item) 410 (define-key map "\t" #'newsticker-next-item)
411 (define-key map "n" 'newsticker-next-item) 411 (define-key map "n" #'newsticker-next-item)
412 (define-key map "N" 'newsticker-next-new-item) 412 (define-key map "N" #'newsticker-next-new-item)
413 (define-key map "f" 'newsticker-next-feed) 413 (define-key map "f" #'newsticker-next-feed)
414 (define-key map "M" 'newsticker-mark-all-items-as-read) 414 (define-key map "M" #'newsticker-mark-all-items-as-read)
415 (define-key map "m" 415 (define-key map "m" #'newsticker-mark-all-items-at-point-as-read-and-redraw)
416 'newsticker-mark-all-items-at-point-as-read-and-redraw) 416 (define-key map "o" #'newsticker-mark-item-at-point-as-read)
417 (define-key map "o" 417 (define-key map "O" #'newsticker-mark-all-items-at-point-as-read)
418 'newsticker-mark-item-at-point-as-read) 418 (define-key map "G" #'newsticker-get-all-news)
419 (define-key map "O" 419 (define-key map "g" #'newsticker-get-news-at-point)
420 'newsticker-mark-all-items-at-point-as-read) 420 (define-key map "u" #'newsticker-buffer-update)
421 (define-key map "G" 'newsticker-get-all-news) 421 (define-key map "U" #'newsticker-buffer-force-update)
422 (define-key map "g" 'newsticker-get-news-at-point) 422 (define-key map "a" #'newsticker-add-url)
423 (define-key map "u" 'newsticker-buffer-update) 423
424 (define-key map "U" 'newsticker-buffer-force-update) 424 (define-key map "i" #'newsticker-mark-item-at-point-as-immortal)
425 (define-key map "a" 'newsticker-add-url) 425
426 426 (define-key map "xf" #'newsticker-toggle-auto-narrow-to-feed)
427 (define-key map "i" 427 (define-key map "xi" #'newsticker-toggle-auto-narrow-to-item)
428 'newsticker-mark-item-at-point-as-immortal)
429
430 (define-key map "xf"
431 'newsticker-toggle-auto-narrow-to-feed)
432 (define-key map "xi"
433 'newsticker-toggle-auto-narrow-to-item)
434 428
435 ;; Bind menu to mouse. 429 ;; Bind menu to mouse.
436 (define-key map [down-mouse-3] newsticker-menu) 430 (define-key map [down-mouse-3] newsticker-menu)
@@ -479,11 +473,11 @@ images."
479;; maps for the clickable portions 473;; maps for the clickable portions
480(defvar newsticker--url-keymap 474(defvar newsticker--url-keymap
481 (let ((map (make-sparse-keymap))) 475 (let ((map (make-sparse-keymap)))
482 (define-key map [mouse-1] 'newsticker-mouse-browse-url) 476 (define-key map [mouse-1] #'newsticker-mouse-browse-url)
483 (define-key map [mouse-2] 'newsticker-mouse-browse-url) 477 (define-key map [mouse-2] #'newsticker-mouse-browse-url)
484 (define-key map "\n" 'newsticker-browse-url) 478 (define-key map "\n" #'newsticker-browse-url)
485 (define-key map "\C-m" 'newsticker-browse-url) 479 (define-key map "\C-m" #'newsticker-browse-url)
486 (define-key map [(control return)] 'newsticker-handle-url) 480 (define-key map [(control return)] #'newsticker-handle-url)
487 map) 481 map)
488 "Key map for click-able headings in the newsticker buffer.") 482 "Key map for click-able headings in the newsticker buffer.")
489 483
@@ -980,7 +974,7 @@ not get changed."
980 (let* (pos1 pos2 974 (let* (pos1 pos2
981 (inhibit-read-only t) 975 (inhibit-read-only t)
982 inv-prop org-inv-prop 976 inv-prop org-inv-prop
983 is-invisible) 977 ) ;; is-invisible
984 (newsticker--buffer-beginning-of-item) 978 (newsticker--buffer-beginning-of-item)
985 (newsticker--buffer-goto '(desc)) 979 (newsticker--buffer-goto '(desc))
986 (setq pos1 (max (point-min) (1- (point)))) 980 (setq pos1 (max (point-min) (1- (point))))
@@ -1009,7 +1003,7 @@ not get changed."
1009 (let* (pos1 pos2 1003 (let* (pos1 pos2
1010 (inhibit-read-only t) 1004 (inhibit-read-only t)
1011 inv-prop org-inv-prop 1005 inv-prop org-inv-prop
1012 is-invisible) 1006 ) ;; is-invisible
1013 (newsticker--buffer-beginning-of-item) 1007 (newsticker--buffer-beginning-of-item)
1014 (newsticker--buffer-goto '(desc)) 1008 (newsticker--buffer-goto '(desc))
1015 (setq pos1 (max (point-min) (1- (point)))) 1009 (setq pos1 (max (point-min) (1- (point))))
@@ -1147,7 +1141,7 @@ If VALUE is nil, auto-narrowing is turned off, otherwise it is turned on."
1147 (setq index-alist (list feed-list))) 1141 (setq index-alist (list feed-list)))
1148 index-alist))) 1142 index-alist)))
1149 1143
1150(defun newsticker--imenu-goto (name pos &rest args) 1144(defun newsticker--imenu-goto (_name pos &rest _args)
1151 "Go to item NAME at position POS and show item. 1145 "Go to item NAME at position POS and show item.
1152ARGS are ignored." 1146ARGS are ignored."
1153 (goto-char pos) 1147 (goto-char pos)
@@ -1236,6 +1230,9 @@ item-retrieval time is added as well."
1236 ;; insert the description 1230 ;; insert the description
1237 (newsticker--buffer-do-insert-text item 'desc feed-name-symbol)) 1231 (newsticker--buffer-do-insert-text item 'desc feed-name-symbol))
1238 1232
1233(defvar w3m-fill-column)
1234(defvar w3-maximum-line-length)
1235
1239(defun newsticker--buffer-do-insert-text (item type feed-name-symbol) 1236(defun newsticker--buffer-do-insert-text (item type feed-name-symbol)
1240 "Actually insert contents of news item, format it, render it and all that. 1237 "Actually insert contents of news item, format it, render it and all that.
1241ITEM is a news item, TYPE tells which part of the item shall be inserted, 1238ITEM is a news item, TYPE tells which part of the item shall be inserted,
diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el
index b188bd4589e..40e304402ad 100644
--- a/lisp/net/newst-reader.el
+++ b/lisp/net/newst-reader.el
@@ -1,4 +1,4 @@
1;;; newst-reader.el --- Generic RSS reader functions. 1;;; newst-reader.el --- Generic RSS reader functions. -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2003-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
4 4
@@ -94,7 +94,7 @@ done."
94 (const :tag "Right" right) 94 (const :tag "Right" right)
95 (const :tag "Center" center) 95 (const :tag "Center" center)
96 (const :tag "Full" full)) 96 (const :tag "Full" full))
97 :set 'newsticker--set-customvar-formatting 97 :set #'newsticker--set-customvar-formatting
98 :group 'newsticker-reader) 98 :group 'newsticker-reader)
99 99
100(defcustom newsticker-use-full-width 100(defcustom newsticker-use-full-width
@@ -103,7 +103,7 @@ done."
103If non-nil newsticker sets `fill-column' so that the whole 103If non-nil newsticker sets `fill-column' so that the whole
104window is used when filling. See also `newsticker-justification'." 104window is used when filling. See also `newsticker-justification'."
105 :type 'boolean 105 :type 'boolean
106 :set 'newsticker--set-customvar-formatting 106 :set #'newsticker--set-customvar-formatting
107 :group 'newsticker-reader) 107 :group 'newsticker-reader)
108 108
109(defcustom newsticker-html-renderer 109(defcustom newsticker-html-renderer
@@ -122,7 +122,7 @@ htmlr if this option is set."
122 (const :tag "w3" w3-region) 122 (const :tag "w3" w3-region)
123 (const :tag "w3m" w3m-region) 123 (const :tag "w3m" w3m-region)
124 (const :tag "htmlr" newsticker-htmlr-render)) 124 (const :tag "htmlr" newsticker-htmlr-render))
125 :set 'newsticker--set-customvar-formatting 125 :set #'newsticker--set-customvar-formatting
126 :group 'newsticker-reader) 126 :group 'newsticker-reader)
127 127
128(defcustom newsticker-date-format 128(defcustom newsticker-date-format
@@ -130,7 +130,7 @@ htmlr if this option is set."
130 "Format for the date part in item and feed lines. 130 "Format for the date part in item and feed lines.
131See `format-time-string' for a list of valid specifiers." 131See `format-time-string' for a list of valid specifiers."
132 :type 'string 132 :type 'string
133 :set 'newsticker--set-customvar-formatting 133 :set #'newsticker--set-customvar-formatting
134 :group 'newsticker-reader) 134 :group 'newsticker-reader)
135 135
136(defgroup newsticker-faces nil 136(defgroup newsticker-faces nil
diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el
index 275c91a36ea..2f764708701 100644
--- a/lisp/net/newst-ticker.el
+++ b/lisp/net/newst-ticker.el
@@ -1,4 +1,4 @@
1;; newst-ticker.el --- mode line ticker for newsticker. 1;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2003-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
4 4
@@ -83,7 +83,7 @@ smooth display (see `newsticker-scroll-smoothly') a value of 0.3 seems
83reasonable. For non-smooth display a value of 10 is a good starting 83reasonable. For non-smooth display a value of 10 is a good starting
84point." 84point."
85 :type 'number 85 :type 'number
86 :set 'newsticker--set-customvar-ticker 86 :set #'newsticker--set-customvar-ticker
87 :group 'newsticker-ticker) 87 :group 'newsticker-ticker)
88 88
89(defcustom newsticker-scroll-smoothly 89(defcustom newsticker-scroll-smoothly
@@ -104,7 +104,7 @@ at all. If you change `newsticker-scroll-smoothly' you should also change
104If t the echo area will not show immortal items. See also 104If t the echo area will not show immortal items. See also
105`newsticker-hide-old-items-in-echo-area'." 105`newsticker-hide-old-items-in-echo-area'."
106 :type 'boolean 106 :type 'boolean
107 :set 'newsticker--set-customvar-ticker 107 :set #'newsticker--set-customvar-ticker
108 :group 'newsticker-ticker) 108 :group 'newsticker-ticker)
109 109
110(defcustom newsticker-hide-old-items-in-echo-area 110(defcustom newsticker-hide-old-items-in-echo-area
@@ -113,7 +113,7 @@ If t the echo area will not show immortal items. See also
113If t the echo area will show only new items, i.e. only items which have 113If t the echo area will show only new items, i.e. only items which have
114been added between the last two retrievals." 114been added between the last two retrievals."
115 :type 'boolean 115 :type 'boolean
116 :set 'newsticker--set-customvar-ticker 116 :set #'newsticker--set-customvar-ticker
117 :group 'newsticker-ticker) 117 :group 'newsticker-ticker)
118 118
119(defcustom newsticker-hide-obsolete-items-in-echo-area 119(defcustom newsticker-hide-obsolete-items-in-echo-area
@@ -122,7 +122,7 @@ been added between the last two retrievals."
122If t the echo area will not show obsolete items. See also 122If t the echo area will not show obsolete items. See also
123`newsticker-hide-old-items-in-echo-area'." 123`newsticker-hide-old-items-in-echo-area'."
124 :type 'boolean 124 :type 'boolean
125 :set 'newsticker--set-customvar-ticker 125 :set #'newsticker--set-customvar-ticker
126 :group 'newsticker-ticker) 126 :group 'newsticker-ticker)
127 127
128(defun newsticker--display-tick () 128(defun newsticker--display-tick ()
@@ -205,7 +205,7 @@ running already."
205 (setq newsticker--ticker-timer 205 (setq newsticker--ticker-timer
206 (run-at-time newsticker-ticker-interval 206 (run-at-time newsticker-ticker-interval
207 newsticker-ticker-interval 207 newsticker-ticker-interval
208 'newsticker--display-tick)))) 208 #'newsticker--display-tick))))
209 209
210(defun newsticker-stop-ticker () 210(defun newsticker-stop-ticker ()
211 "Stop newsticker's ticker (but not the news retrieval)." 211 "Stop newsticker's ticker (but not the news retrieval)."
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 2e207be20f9..d778cc17615 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -52,86 +52,73 @@
52(defface newsticker-treeview-face 52(defface newsticker-treeview-face
53 '((((class color) (background dark)) :foreground "white") 53 '((((class color) (background dark)) :foreground "white")
54 (((class color) (background light)) :foreground "black")) 54 (((class color) (background light)) :foreground "black"))
55 "Face for newsticker tree." 55 "Face for newsticker tree.")
56 :group 'newsticker-treeview)
57 56
58(defface newsticker-treeview-new-face 57(defface newsticker-treeview-new-face
59 '((t :inherit newsticker-treeview-face :weight bold)) 58 '((t :inherit newsticker-treeview-face :weight bold))
60 "Face for newsticker tree." 59 "Face for newsticker tree.")
61 :group 'newsticker-treeview)
62 60
63(defface newsticker-treeview-old-face 61(defface newsticker-treeview-old-face
64 '((t :inherit newsticker-treeview-face)) 62 '((t :inherit newsticker-treeview-face))
65 "Face for newsticker tree." 63 "Face for newsticker tree.")
66 :group 'newsticker-treeview)
67 64
68(defface newsticker-treeview-immortal-face 65(defface newsticker-treeview-immortal-face
69 '((default :inherit newsticker-treeview-face :slant italic) 66 '((default :inherit newsticker-treeview-face :slant italic)
70 (((class color) (background dark)) :foreground "orange") 67 (((class color) (background dark)) :foreground "orange")
71 (((class color) (background light)) :foreground "blue")) 68 (((class color) (background light)) :foreground "blue"))
72 "Face for newsticker tree." 69 "Face for newsticker tree.")
73 :group 'newsticker-treeview)
74 70
75(defface newsticker-treeview-obsolete-face 71(defface newsticker-treeview-obsolete-face
76 '((t :inherit newsticker-treeview-face :strike-through t)) 72 '((t :inherit newsticker-treeview-face :strike-through t))
77 "Face for newsticker tree." 73 "Face for newsticker tree.")
78 :group 'newsticker-treeview)
79 74
80(defface newsticker-treeview-selection-face 75(defface newsticker-treeview-selection-face
81 '((((class color) (background dark)) :background "#4444aa") 76 '((((class color) (background dark)) :background "#4444aa")
82 (((class color) (background light)) :background "#bbbbff")) 77 (((class color) (background light)) :background "#bbbbff"))
83 "Face for newsticker selection." 78 "Face for newsticker selection.")
84 :group 'newsticker-treeview)
85 79
86(defcustom newsticker-treeview-date-format 80(defcustom newsticker-treeview-date-format
87 "%d.%m.%y, %H:%M" 81 "%d.%m.%y, %H:%M"
88 "Format for the date column in the treeview list buffer. 82 "Format for the date column in the treeview list buffer.
89See `format-time-string' for a list of valid specifiers." 83See `format-time-string' for a list of valid specifiers."
90 :version "25.1" 84 :version "25.1"
91 :type 'string 85 :type 'string)
92 :group 'newsticker-treeview)
93 86
94(defcustom newsticker-treeview-own-frame 87(defcustom newsticker-treeview-own-frame
95 nil 88 nil
96 "Decides whether newsticker treeview creates and uses its own frame." 89 "Decides whether newsticker treeview creates and uses its own frame."
97 :type 'boolean 90 :type 'boolean)
98 :group 'newsticker-treeview)
99 91
100(defcustom newsticker-treeview-treewindow-width 92(defcustom newsticker-treeview-treewindow-width
101 30 93 30
102 "Width of tree window in treeview layout. 94 "Width of tree window in treeview layout.
103See also `newsticker-treeview-listwindow-height'." 95See also `newsticker-treeview-listwindow-height'."
104 :type 'integer 96 :type 'integer)
105 :group 'newsticker-treeview)
106 97
107(defcustom newsticker-treeview-listwindow-height 98(defcustom newsticker-treeview-listwindow-height
108 10 99 10
109 "Height of list window in treeview layout. 100 "Height of list window in treeview layout.
110See also `newsticker-treeview-treewindow-width'." 101See also `newsticker-treeview-treewindow-width'."
111 :type 'integer 102 :type 'integer)
112 :group 'newsticker-treeview)
113 103
114(defcustom newsticker-treeview-automatically-mark-displayed-items-as-old 104(defcustom newsticker-treeview-automatically-mark-displayed-items-as-old
115 t 105 t
116 "Decides whether to automatically mark displayed items as old. 106 "Decides whether to automatically mark displayed items as old.
117If t an item is marked as old as soon as it is displayed. This 107If t an item is marked as old as soon as it is displayed. This
118applies to newsticker only." 108applies to newsticker only."
119 :type 'boolean 109 :type 'boolean)
120 :group 'newsticker-treeview)
121 110
122(defcustom newsticker-treeview-use-feed-name-from-url-list-in-treeview 111(defcustom newsticker-treeview-use-feed-name-from-url-list-in-treeview
123 t 112 t
124 "Use the feed names from 'newsticker-url-list' for display in treeview." 113 "Use the feed names from 'newsticker-url-list' for display in treeview."
125 :version "28.1" 114 :version "28.1"
126 :type 'boolean 115 :type 'boolean)
127 :group 'newsticker-treeview)
128 116
129(defcustom newsticker-treeview-use-feed-name-from-url-list-in-itemview 117(defcustom newsticker-treeview-use-feed-name-from-url-list-in-itemview
130 t 118 t
131 "Use feed names from 'newsticker-url-list' in itemview." 119 "Use feed names from 'newsticker-url-list' in itemview."
132 :version "28.1" 120 :version "28.1"
133 :type 'boolean 121 :type 'boolean)
134 :group 'newsticker-treeview)
135 122
136(defvar newsticker-groups 123(defvar newsticker-groups
137 '("Feeds") 124 '("Feeds")
@@ -166,14 +153,16 @@ Example: (\"Topmost group\" \"feed1\" (\"subgroup1\" \"feed 2\")
166(defvar newsticker--treeview-feed-tree nil) 153(defvar newsticker--treeview-feed-tree nil)
167(defvar newsticker--treeview-vfeed-tree nil) 154(defvar newsticker--treeview-vfeed-tree nil)
168 155
156(declare-function newsticker-handle-url "newst-plainview" ())
157
169;; maps for the clickable portions 158;; maps for the clickable portions
170(defvar newsticker--treeview-url-keymap 159(defvar newsticker--treeview-url-keymap
171 (let ((map (make-sparse-keymap 'newsticker--treeview-url-keymap))) 160 (let ((map (make-sparse-keymap 'newsticker--treeview-url-keymap)))
172 (define-key map [mouse-1] 'newsticker-treeview-mouse-browse-url) 161 (define-key map [mouse-1] #'newsticker-treeview-mouse-browse-url)
173 (define-key map [mouse-2] 'newsticker-treeview-mouse-browse-url) 162 (define-key map [mouse-2] #'newsticker-treeview-mouse-browse-url)
174 (define-key map "\n" 'newsticker-treeview-browse-url) 163 (define-key map "\n" #'newsticker-treeview-browse-url)
175 (define-key map "\C-m" 'newsticker-treeview-browse-url) 164 (define-key map "\C-m" #'newsticker-treeview-browse-url)
176 (define-key map [(control return)] 'newsticker-handle-url) 165 (define-key map [(control return)] #'newsticker-handle-url)
177 map) 166 map)
178 "Key map for click-able headings in the newsticker treeview buffers.") 167 "Key map for click-able headings in the newsticker treeview buffers.")
179 168
@@ -342,9 +331,9 @@ If string SHOW-FEED is non-nil it is shown in the item string."
342 (replace-match " ")) 331 (replace-match " "))
343 (let ((map (make-sparse-keymap))) 332 (let ((map (make-sparse-keymap)))
344 (dolist (key'([mouse-1] [mouse-3])) 333 (dolist (key'([mouse-1] [mouse-3]))
345 (define-key map key 'newsticker-treeview-tree-click)) 334 (define-key map key #'newsticker-treeview-tree-click))
346 (define-key map "\n" 'newsticker-treeview-show-item) 335 (define-key map "\n" #'newsticker-treeview-show-item)
347 (define-key map "\C-m" 'newsticker-treeview-show-item) 336 (define-key map "\C-m" #'newsticker-treeview-show-item)
348 (add-text-properties pos1 (point-max) 337 (add-text-properties pos1 (point-max)
349 (list :nt-item item 338 (list :nt-item item
350 :nt-feed feed 339 :nt-feed feed
@@ -626,9 +615,9 @@ If CLEAR-BUFFER is non-nil the list buffer is completely erased."
626(defvar newsticker-treeview-list-sort-button-map 615(defvar newsticker-treeview-list-sort-button-map
627 (let ((map (make-sparse-keymap))) 616 (let ((map (make-sparse-keymap)))
628 (define-key map [header-line mouse-1] 617 (define-key map [header-line mouse-1]
629 'newsticker--treeview-list-sort-by-column) 618 #'newsticker--treeview-list-sort-by-column)
630 (define-key map [header-line mouse-2] 619 (define-key map [header-line mouse-2]
631 'newsticker--treeview-list-sort-by-column) 620 #'newsticker--treeview-list-sort-by-column)
632 map) 621 map)
633 "Local keymap for newsticker treeview list window sort buttons.") 622 "Local keymap for newsticker treeview list window sort buttons.")
634 623
@@ -960,9 +949,9 @@ arguments NT-ID, FEED, VFEED and TOOLTIP are added as properties."
960 (if (and num-new (> num-new 0)) 949 (if (and num-new (> num-new 0))
961 (setq face 'newsticker-treeview-new-face)) 950 (setq face 'newsticker-treeview-new-face))
962 (dolist (key '([mouse-1] [mouse-3])) 951 (dolist (key '([mouse-1] [mouse-3]))
963 (define-key map key 'newsticker-treeview-tree-click)) 952 (define-key map key #'newsticker-treeview-tree-click))
964 (define-key map "\n" 'newsticker-treeview-tree-do-click) 953 (define-key map "\n" #'newsticker-treeview-tree-do-click)
965 (define-key map "\C-m" 'newsticker-treeview-tree-do-click) 954 (define-key map "\C-m" #'newsticker-treeview-tree-do-click)
966 (propertize tag 'face face 'keymap map 955 (propertize tag 'face face 'keymap map
967 :nt-id nt-id 956 :nt-id nt-id
968 :nt-feed feed 957 :nt-feed feed
@@ -2029,37 +2018,37 @@ Return t if groups have changed, nil otherwise."
2029 2018
2030(defvar newsticker-treeview-mode-map 2019(defvar newsticker-treeview-mode-map
2031 (let ((map (make-sparse-keymap 'newsticker-treeview-mode-map))) 2020 (let ((map (make-sparse-keymap 'newsticker-treeview-mode-map)))
2032 (define-key map " " 'newsticker-treeview-next-page) 2021 (define-key map " " #'newsticker-treeview-next-page)
2033 (define-key map "a" 'newsticker-add-url) 2022 (define-key map "a" #'newsticker-add-url)
2034 (define-key map "b" 'newsticker-treeview-browse-url-item) 2023 (define-key map "b" #'newsticker-treeview-browse-url-item)
2035 (define-key map "c" 'newsticker-treeview-customize-current-feed) 2024 (define-key map "c" #'newsticker-treeview-customize-current-feed)
2036 (define-key map "F" 'newsticker-treeview-prev-feed) 2025 (define-key map "F" #'newsticker-treeview-prev-feed)
2037 (define-key map "f" 'newsticker-treeview-next-feed) 2026 (define-key map "f" #'newsticker-treeview-next-feed)
2038 (define-key map "g" 'newsticker-treeview-get-news) 2027 (define-key map "g" #'newsticker-treeview-get-news)
2039 (define-key map "G" 'newsticker-get-all-news) 2028 (define-key map "G" #'newsticker-get-all-news)
2040 (define-key map "i" 'newsticker-treeview-toggle-item-immortal) 2029 (define-key map "i" #'newsticker-treeview-toggle-item-immortal)
2041 (define-key map "j" 'newsticker-treeview-jump) 2030 (define-key map "j" #'newsticker-treeview-jump)
2042 (define-key map "n" 'newsticker-treeview-next-item) 2031 (define-key map "n" #'newsticker-treeview-next-item)
2043 (define-key map "N" 'newsticker-treeview-next-new-or-immortal-item) 2032 (define-key map "N" #'newsticker-treeview-next-new-or-immortal-item)
2044 (define-key map "O" 'newsticker-treeview-mark-list-items-old) 2033 (define-key map "O" #'newsticker-treeview-mark-list-items-old)
2045 (define-key map "o" 'newsticker-treeview-mark-item-old) 2034 (define-key map "o" #'newsticker-treeview-mark-item-old)
2046 (define-key map "p" 'newsticker-treeview-prev-item) 2035 (define-key map "p" #'newsticker-treeview-prev-item)
2047 (define-key map "P" 'newsticker-treeview-prev-new-or-immortal-item) 2036 (define-key map "P" #'newsticker-treeview-prev-new-or-immortal-item)
2048 (define-key map "q" 'newsticker-treeview-quit) 2037 (define-key map "q" #'newsticker-treeview-quit)
2049 (define-key map "S" 'newsticker-treeview-save-item) 2038 (define-key map "S" #'newsticker-treeview-save-item)
2050 (define-key map "s" 'newsticker-treeview-save) 2039 (define-key map "s" #'newsticker-treeview-save)
2051 (define-key map "u" 'newsticker-treeview-update) 2040 (define-key map "u" #'newsticker-treeview-update)
2052 (define-key map "v" 'newsticker-treeview-browse-url) 2041 (define-key map "v" #'newsticker-treeview-browse-url)
2053 ;;(define-key map "\n" 'newsticker-treeview-scroll-item) 2042 ;;(define-key map "\n" #'newsticker-treeview-scroll-item)
2054 ;;(define-key map "\C-m" 'newsticker-treeview-scroll-item) 2043 ;;(define-key map "\C-m" #'newsticker-treeview-scroll-item)
2055 (define-key map "\M-m" 'newsticker-group-move-feed) 2044 (define-key map "\M-m" #'newsticker-group-move-feed)
2056 (define-key map "\M-a" 'newsticker-group-add-group) 2045 (define-key map "\M-a" #'newsticker-group-add-group)
2057 (define-key map "\M-d" 'newsticker-group-delete-group) 2046 (define-key map "\M-d" #'newsticker-group-delete-group)
2058 (define-key map "\M-r" 'newsticker-group-rename-group) 2047 (define-key map "\M-r" #'newsticker-group-rename-group)
2059 (define-key map [M-down] 'newsticker-group-shift-feed-down) 2048 (define-key map [M-down] #'newsticker-group-shift-feed-down)
2060 (define-key map [M-up] 'newsticker-group-shift-feed-up) 2049 (define-key map [M-up] #'newsticker-group-shift-feed-up)
2061 (define-key map [M-S-down] 'newsticker-group-shift-group-down) 2050 (define-key map [M-S-down] #'newsticker-group-shift-group-down)
2062 (define-key map [M-S-up] 'newsticker-group-shift-group-up) 2051 (define-key map [M-S-up] #'newsticker-group-shift-group-up)
2063 map) 2052 map)
2064 "Mode map for newsticker treeview.") 2053 "Mode map for newsticker treeview.")
2065 2054
diff --git a/lisp/net/puny.el b/lisp/net/puny.el
index 1cdefc08f02..42a7e796798 100644
--- a/lisp/net/puny.el
+++ b/lisp/net/puny.el
@@ -37,7 +37,7 @@ For instance, \"fśf.org\" => \"xn--ff-2sa.org\"."
37 ;; add a check first to avoid doing unnecessary work. 37 ;; add a check first to avoid doing unnecessary work.
38 (if (string-match "\\`[[:ascii:]]+\\'" domain) 38 (if (string-match "\\`[[:ascii:]]+\\'" domain)
39 domain 39 domain
40 (mapconcat 'puny-encode-string (split-string domain "[.]") "."))) 40 (mapconcat #'puny-encode-string (split-string domain "[.]") ".")))
41 41
42(defun puny-encode-string (string) 42(defun puny-encode-string (string)
43 "Encode STRING according to the IDNA/punycode algorithm. 43 "Encode STRING according to the IDNA/punycode algorithm.
@@ -57,7 +57,7 @@ For instance, \"bücher\" => \"xn--bcher-kva\"."
57(defun puny-decode-domain (domain) 57(defun puny-decode-domain (domain)
58 "Decode DOMAIN according to the IDNA/punycode algorithm. 58 "Decode DOMAIN according to the IDNA/punycode algorithm.
59For instance, \"xn--ff-2sa.org\" => \"fśf.org\"." 59For instance, \"xn--ff-2sa.org\" => \"fśf.org\"."
60 (mapconcat 'puny-decode-string (split-string domain "[.]") ".")) 60 (mapconcat #'puny-decode-string (split-string domain "[.]") "."))
61 61
62(defun puny-decode-string (string) 62(defun puny-decode-string (string)
63 "Decode an IDNA/punycode-encoded string. 63 "Decode an IDNA/punycode-encoded string.
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index ab1f43f552b..2574c8cb63e 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -1,4 +1,4 @@
1;;; quickurl.el --- insert a URL based on text at point in buffer 1;;; quickurl.el --- insert a URL based on text at point in buffer -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1999-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
4 4
@@ -97,23 +97,19 @@
97 (locate-user-emacs-file "quickurls" ".quickurls") 97 (locate-user-emacs-file "quickurls" ".quickurls")
98 "File that contains the URL list." 98 "File that contains the URL list."
99 :version "24.4" ; added locate-user-emacs-file 99 :version "24.4" ; added locate-user-emacs-file
100 :type 'file 100 :type 'file)
101 :group 'quickurl)
102 101
103(defcustom quickurl-format-function #'quickurl-format-url 102(defcustom quickurl-format-function #'quickurl-format-url
104 "Function to format the URL before insertion into the current buffer." 103 "Function to format the URL before insertion into the current buffer."
105 :type 'function 104 :type 'function)
106 :group 'quickurl)
107 105
108(defcustom quickurl-sort-function #'quickurl-sort-urls 106(defcustom quickurl-sort-function #'quickurl-sort-urls
109 "Function to sort the URL list." 107 "Function to sort the URL list."
110 :type 'function 108 :type 'function)
111 :group 'quickurl)
112 109
113(defcustom quickurl-grab-lookup-function #'current-word 110(defcustom quickurl-grab-lookup-function #'current-word
114 "Function to grab the thing to lookup." 111 "Function to grab the thing to lookup."
115 :type 'function 112 :type 'function)
116 :group 'quickurl)
117 113
118(defun quickurl--assoc-function (key alist) 114(defun quickurl--assoc-function (key alist)
119 "Default function for `quickurl-assoc-function'." 115 "Default function for `quickurl-assoc-function'."
@@ -122,31 +118,26 @@
122(defcustom quickurl-assoc-function #'quickurl--assoc-function 118(defcustom quickurl-assoc-function #'quickurl--assoc-function
123 "Function to use for alist lookup into `quickurl-urls'." 119 "Function to use for alist lookup into `quickurl-urls'."
124 :version "26.1" ; was the obsolete assoc-ignore-case 120 :version "26.1" ; was the obsolete assoc-ignore-case
125 :type 'function 121 :type 'function)
126 :group 'quickurl)
127 122
128(defcustom quickurl-completion-ignore-case t 123(defcustom quickurl-completion-ignore-case t
129 "Should `quickurl-ask' ignore case when doing the input lookup?" 124 "Should `quickurl-ask' ignore case when doing the input lookup?"
130 :type 'boolean 125 :type 'boolean)
131 :group 'quickurl)
132 126
133(defcustom quickurl-prefix ";; -*- lisp -*-\n\n" 127(defcustom quickurl-prefix ";; -*- lisp -*-\n\n"
134 "Text to write to `quickurl-url-file' before writing the URL list." 128 "Text to write to `quickurl-url-file' before writing the URL list."
135 :type 'string 129 :type 'string)
136 :group 'quickurl)
137 130
138(defcustom quickurl-postfix "" 131(defcustom quickurl-postfix ""
139 "Text to write to `quickurl-url-file' after writing the URL list. 132 "Text to write to `quickurl-url-file' after writing the URL list.
140 133
141See the constant `quickurl-reread-hook-postfix' for some example text that 134See the constant `quickurl-reread-hook-postfix' for some example text that
142could be used here." 135could be used here."
143 :type 'string 136 :type 'string)
144 :group 'quickurl)
145 137
146(defcustom quickurl-list-mode-hook nil 138(defcustom quickurl-list-mode-hook nil
147 "Hooks for `quickurl-list-mode'." 139 "Hooks for `quickurl-list-mode'."
148 :type 'hook 140 :type 'hook)
149 :group 'quickurl)
150 141
151;; Constants. 142;; Constants.
152 143
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index c80cd49c006..938fadfed74 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -293,7 +293,7 @@ The following replacements are made:
293Setting this alone will not affect the prompt; 293Setting this alone will not affect the prompt;
294use either M-x customize or also call `rcirc-update-prompt'." 294use either M-x customize or also call `rcirc-update-prompt'."
295 :type 'string 295 :type 'string
296 :set 'rcirc-set-changed 296 :set #'rcirc-set-changed
297 :initialize 'custom-initialize-default) 297 :initialize 'custom-initialize-default)
298 298
299(defcustom rcirc-keywords nil 299(defcustom rcirc-keywords nil
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index ad271679618..94db318c1b0 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -643,7 +643,7 @@ starting with a colon. Example:
643The object labels of the found items are returned as list." 643The object labels of the found items are returned as list."
644 (mapcar 644 (mapcar
645 (lambda (item-path) (secrets-get-item-property item-path "Label")) 645 (lambda (item-path) (secrets-get-item-property item-path "Label"))
646 (apply 'secrets-search-item-paths collection attributes))) 646 (apply #'secrets-search-item-paths collection attributes)))
647 647
648(defun secrets-create-item (collection item password &rest attributes) 648(defun secrets-create-item (collection item password &rest attributes)
649 "Create a new item in COLLECTION with label ITEM and password PASSWORD. 649 "Create a new item in COLLECTION with label ITEM and password PASSWORD.
@@ -780,9 +780,9 @@ ITEM can also be an object path, which is used if contained in COLLECTION."
780(defvar secrets-mode-map 780(defvar secrets-mode-map
781 (let ((map (make-sparse-keymap))) 781 (let ((map (make-sparse-keymap)))
782 (set-keymap-parent map (make-composed-keymap special-mode-map widget-keymap)) 782 (set-keymap-parent map (make-composed-keymap special-mode-map widget-keymap))
783 (define-key map "n" 'next-line) 783 (define-key map "n" #'next-line)
784 (define-key map "p" 'previous-line) 784 (define-key map "p" #'previous-line)
785 (define-key map "z" 'kill-current-buffer) 785 (define-key map "z" #'kill-current-buffer)
786 map) 786 map)
787 "Keymap used in `secrets-mode' buffers.") 787 "Keymap used in `secrets-mode' buffers.")
788 788
@@ -859,7 +859,7 @@ to their attributes."
859 ;; padding is needed to format attribute names. 859 ;; padding is needed to format attribute names.
860 (padding 860 (padding
861 (apply 861 (apply
862 'max 862 #'max
863 (cons 863 (cons
864 (1+ (length "password")) 864 (1+ (length "password"))
865 (mapcar 865 (mapcar
diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el
index ac1f701fd37..eb78a259a8c 100644
--- a/lisp/net/shr-color.el
+++ b/lisp/net/shr-color.el
@@ -36,14 +36,12 @@
36(defcustom shr-color-visible-luminance-min 40 36(defcustom shr-color-visible-luminance-min 40
37 "Minimum luminance distance between two colors to be considered visible. 37 "Minimum luminance distance between two colors to be considered visible.
38Must be between 0 and 100." 38Must be between 0 and 100."
39 :group 'shr-color
40 :type 'number) 39 :type 'number)
41 40
42(defcustom shr-color-visible-distance-min 5 41(defcustom shr-color-visible-distance-min 5
43 "Minimum color distance between two colors to be considered visible. 42 "Minimum color distance between two colors to be considered visible.
44This value is used to compare result for `ciede2000'. It's an 43This value is used to compare result for `ciede2000'. It's an
45absolute value without any unit." 44absolute value without any unit."
46 :group 'shr-color
47 :type 'integer) 45 :type 'integer)
48 46
49(defconst shr-color-html-colors-alist 47(defconst shr-color-html-colors-alist
@@ -332,8 +330,8 @@ color will be adapted to be visible on BG."
332 (if (or (null fg-norm) 330 (if (or (null fg-norm)
333 (null bg-norm)) 331 (null bg-norm))
334 (list bg fg) 332 (list bg fg)
335 (let* ((fg-lab (apply 'color-srgb-to-lab fg-norm)) 333 (let* ((fg-lab (apply #'color-srgb-to-lab fg-norm))
336 (bg-lab (apply 'color-srgb-to-lab bg-norm)) 334 (bg-lab (apply #'color-srgb-to-lab bg-norm))
337 ;; Compute color distance using CIE DE 2000 335 ;; Compute color distance using CIE DE 2000
338 (fg-bg-distance (color-cie-de2000 fg-lab bg-lab)) 336 (fg-bg-distance (color-cie-de2000 fg-lab bg-lab))
339 ;; Compute luminance distance (subtract L component) 337 ;; Compute luminance distance (subtract L component)
@@ -351,12 +349,12 @@ color will be adapted to be visible on BG."
351 (list 349 (list
352 (if fixed-background 350 (if fixed-background
353 bg 351 bg
354 (apply 'format "#%02x%02x%02x" 352 (apply #'format "#%02x%02x%02x"
355 (mapcar (lambda (x) (* (max (min 1 x) 0) 255)) 353 (mapcar (lambda (x) (* (max (min 1 x) 0) 255))
356 (apply 'color-lab-to-srgb bg-lab)))) 354 (apply #'color-lab-to-srgb bg-lab))))
357 (apply 'format "#%02x%02x%02x" 355 (apply #'format "#%02x%02x%02x"
358 (mapcar (lambda (x) (* (max (min 1 x) 0) 255)) 356 (mapcar (lambda (x) (* (max (min 1 x) 0) 255))
359 (apply 'color-lab-to-srgb fg-lab)))))))))) 357 (apply #'color-lab-to-srgb fg-lab))))))))))
360 358
361(provide 'shr-color) 359(provide 'shr-color)
362 360
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 0e89999b756..c122a19e90c 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -220,20 +220,20 @@ and other things:
220 220
221(defvar shr-map 221(defvar shr-map
222 (let ((map (make-sparse-keymap))) 222 (let ((map (make-sparse-keymap)))
223 (define-key map "a" 'shr-show-alt-text) 223 (define-key map "a" #'shr-show-alt-text)
224 (define-key map "i" 'shr-browse-image) 224 (define-key map "i" #'shr-browse-image)
225 (define-key map "z" 'shr-zoom-image) 225 (define-key map "z" #'shr-zoom-image)
226 (define-key map [?\t] 'shr-next-link) 226 (define-key map [?\t] #'shr-next-link)
227 (define-key map [?\M-\t] 'shr-previous-link) 227 (define-key map [?\M-\t] #'shr-previous-link)
228 (define-key map [follow-link] 'mouse-face) 228 (define-key map [follow-link] 'mouse-face)
229 (define-key map [mouse-2] 'shr-browse-url) 229 (define-key map [mouse-2] #'shr-browse-url)
230 (define-key map [C-down-mouse-1] 'shr-mouse-browse-url-new-window) 230 (define-key map [C-down-mouse-1] #'shr-mouse-browse-url-new-window)
231 (define-key map "I" 'shr-insert-image) 231 (define-key map "I" #'shr-insert-image)
232 (define-key map "w" 'shr-maybe-probe-and-copy-url) 232 (define-key map "w" #'shr-maybe-probe-and-copy-url)
233 (define-key map "u" 'shr-maybe-probe-and-copy-url) 233 (define-key map "u" #'shr-maybe-probe-and-copy-url)
234 (define-key map "v" 'shr-browse-url) 234 (define-key map "v" #'shr-browse-url)
235 (define-key map "O" 'shr-save-contents) 235 (define-key map "O" #'shr-save-contents)
236 (define-key map "\r" 'shr-browse-url) 236 (define-key map "\r" #'shr-browse-url)
237 map)) 237 map))
238 238
239(defvar shr-image-map 239(defvar shr-image-map
diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el
index 7bc1d16122d..966f0f056bd 100644
--- a/lisp/net/sieve-mode.el
+++ b/lisp/net/sieve-mode.el
@@ -139,9 +139,9 @@
139 139
140(defvar sieve-mode-map 140(defvar sieve-mode-map
141 (let ((map (make-sparse-keymap))) 141 (let ((map (make-sparse-keymap)))
142 (define-key map "\C-c\C-l" 'sieve-upload) 142 (define-key map "\C-c\C-l" #'sieve-upload)
143 (define-key map "\C-c\C-c" 'sieve-upload-and-kill) 143 (define-key map "\C-c\C-c" #'sieve-upload-and-kill)
144 (define-key map "\C-c\C-m" 'sieve-manage) 144 (define-key map "\C-c\C-m" #'sieve-manage)
145 map) 145 map)
146 "Key map used in sieve mode.") 146 "Key map used in sieve mode.")
147 147
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 3cc5569b55c..821ef4af8e0 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -10,6 +10,7 @@
10;; Package: soap-client 10;; Package: soap-client
11;; Homepage: https://github.com/alex-hhh/emacs-soap-client 11;; Homepage: https://github.com/alex-hhh/emacs-soap-client
12;; Package-Requires: ((cl-lib "0.6.1")) 12;; Package-Requires: ((cl-lib "0.6.1"))
13;;FIXME: Put in `Package-Requires:' the Emacs version we expect.
13 14
14;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
15 16
@@ -771,6 +772,8 @@ This is a specialization of `soap-decode-type' for
771 (Array (soap-decode-array node)))))) 772 (Array (soap-decode-array node))))))
772 773
773(defalias 'soap-type-of 774(defalias 'soap-type-of
775 ;; FIXME: Once we drop support for Emacs<25, use generic functions
776 ;; via `cl-defmethod' instead of our own ad-hoc version of it.
774 (if (eq 'soap-xs-basic-type (type-of (make-soap-xs-basic-type))) 777 (if (eq 'soap-xs-basic-type (type-of (make-soap-xs-basic-type)))
775 ;; `type-of' in Emacs ≥ 26 already does what we need. 778 ;; `type-of' in Emacs ≥ 26 already does what we need.
776 #'type-of 779 #'type-of
@@ -1263,7 +1266,7 @@ See also `soap-wsdl-resolve-references'."
1263 (soap-l2wk (xml-node-name node))) 1266 (soap-l2wk (xml-node-name node)))
1264 1267
1265 (setf (soap-xs-simple-type-base type) 1268 (setf (soap-xs-simple-type-base type)
1266 (mapcar 'soap-l2fq 1269 (mapcar #'soap-l2fq
1267 (split-string 1270 (split-string
1268 (or (xml-get-attribute-or-nil node 'memberTypes) "")))) 1271 (or (xml-get-attribute-or-nil node 'memberTypes) ""))))
1269 1272
@@ -1343,7 +1346,7 @@ See also `soap-wsdl-resolve-references'."
1343 (soap-validate-xs-basic-type value base)))) 1346 (soap-validate-xs-basic-type value base))))
1344 (error (push (cadr error-object) messages)))) 1347 (error (push (cadr error-object) messages))))
1345 (when messages 1348 (when messages
1346 (error (mapconcat 'identity (nreverse messages) "; and: ")))) 1349 (error (mapconcat #'identity (nreverse messages) "; and: "))))
1347 (cl-labels ((fail-with-message (format value) 1350 (cl-labels ((fail-with-message (format value)
1348 (push (format format value) messages) 1351 (push (format format value) messages)
1349 (throw 'invalid nil))) 1352 (throw 'invalid nil)))
@@ -2345,8 +2348,8 @@ See also `soap-resolve-references' and
2345 2348
2346 (when (= (length (soap-operation-parameter-order operation)) 0) 2349 (when (= (length (soap-operation-parameter-order operation)) 0)
2347 (setf (soap-operation-parameter-order operation) 2350 (setf (soap-operation-parameter-order operation)
2348 (mapcar 'car (soap-message-parts 2351 (mapcar #'car (soap-message-parts
2349 (cdr (soap-operation-input operation)))))) 2352 (cdr (soap-operation-input operation))))))
2350 2353
2351 (setf (soap-operation-parameter-order operation) 2354 (setf (soap-operation-parameter-order operation)
2352 (mapcar (lambda (p) 2355 (mapcar (lambda (p)
@@ -2391,13 +2394,13 @@ See also `soap-wsdl-resolve-references'."
2391;; Install resolvers for our types 2394;; Install resolvers for our types
2392(progn 2395(progn
2393 (put (soap-type-of (make-soap-message)) 'soap-resolve-references 2396 (put (soap-type-of (make-soap-message)) 'soap-resolve-references
2394 'soap-resolve-references-for-message) 2397 #'soap-resolve-references-for-message)
2395 (put (soap-type-of (make-soap-operation)) 'soap-resolve-references 2398 (put (soap-type-of (make-soap-operation)) 'soap-resolve-references
2396 'soap-resolve-references-for-operation) 2399 #'soap-resolve-references-for-operation)
2397 (put (soap-type-of (make-soap-binding)) 'soap-resolve-references 2400 (put (soap-type-of (make-soap-binding)) 'soap-resolve-references
2398 'soap-resolve-references-for-binding) 2401 #'soap-resolve-references-for-binding)
2399 (put (soap-type-of (make-soap-port)) 'soap-resolve-references 2402 (put (soap-type-of (make-soap-port)) 'soap-resolve-references
2400 'soap-resolve-references-for-port)) 2403 #'soap-resolve-references-for-port))
2401 2404
2402(defun soap-wsdl-resolve-references (wsdl) 2405(defun soap-wsdl-resolve-references (wsdl)
2403 "Resolve all references inside the WSDL structure. 2406 "Resolve all references inside the WSDL structure.
@@ -2511,7 +2514,7 @@ Build on WSDL if it is provided."
2511 (soap-wsdl-resolve-references (soap-parse-wsdl xml wsdl)) 2514 (soap-wsdl-resolve-references (soap-parse-wsdl xml wsdl))
2512 wsdl)) 2515 wsdl))
2513 2516
2514(defalias 'soap-load-wsdl-from-url 'soap-load-wsdl) 2517(defalias 'soap-load-wsdl-from-url #'soap-load-wsdl)
2515 2518
2516(defun soap-parse-wsdl-phase-validate-node (node) 2519(defun soap-parse-wsdl-phase-validate-node (node)
2517 "Assert that NODE is valid." 2520 "Assert that NODE is valid."
@@ -2884,7 +2887,7 @@ decode function to perform the actual decoding."
2884 2887
2885(if (fboundp 'define-error) 2888(if (fboundp 'define-error)
2886 (define-error 'soap-error "SOAP error") 2889 (define-error 'soap-error "SOAP error")
2887 ;; Support older Emacs versions that do not have define-error, so 2890 ;; Support Emacs<24.4 that do not have define-error, so
2888 ;; that soap-client can remain unchanged in GNU ELPA. 2891 ;; that soap-client can remain unchanged in GNU ELPA.
2889 (put 'soap-error 2892 (put 'soap-error
2890 'error-conditions 2893 'error-conditions
@@ -3123,8 +3126,7 @@ http://schemas.xmlsoap.org/soap/encoding/\"\n"))
3123 3126
3124(defcustom soap-debug nil 3127(defcustom soap-debug nil
3125 "When t, enable some debugging facilities." 3128 "When t, enable some debugging facilities."
3126 :type 'boolean 3129 :type 'boolean)
3127 :group 'soap-client)
3128 3130
3129(defun soap-find-port (wsdl service) 3131(defun soap-find-port (wsdl service)
3130 "Return the WSDL port having SERVICE name. 3132 "Return the WSDL port having SERVICE name.
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 9d4e440719d..6f9ce6a2d69 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -109,7 +109,7 @@ soap-xs-attribute objects."
109This is a specialization of `soap-sample-value' for 109This is a specialization of `soap-sample-value' for
110`soap-xs-simple-type' objects." 110`soap-xs-simple-type' objects."
111 (append 111 (append
112 (mapcar 'soap-sample-value-for-xs-attribute 112 (mapcar #'soap-sample-value-for-xs-attribute
113 (soap-xs-type-attributes type)) 113 (soap-xs-type-attributes type))
114 (cond 114 (cond
115 ((soap-xs-simple-type-enumeration type) 115 ((soap-xs-simple-type-enumeration type)
@@ -143,7 +143,7 @@ This is a specialization of `soap-sample-value' for
143This is a specialization of `soap-sample-value' for 143This is a specialization of `soap-sample-value' for
144`soap-xs-complex-type' objects." 144`soap-xs-complex-type' objects."
145 (append 145 (append
146 (mapcar 'soap-sample-value-for-xs-attribute 146 (mapcar #'soap-sample-value-for-xs-attribute
147 (soap-xs-type-attributes type)) 147 (soap-xs-type-attributes type))
148 (cl-case (soap-xs-complex-type-indicator type) 148 (cl-case (soap-xs-complex-type-indicator type)
149 (array 149 (array
@@ -176,31 +176,31 @@ This is a specialization of `soap-sample-value' for
176 ;; Install soap-sample-value methods for our types 176 ;; Install soap-sample-value methods for our types
177 (put (soap-type-of (make-soap-xs-basic-type)) 177 (put (soap-type-of (make-soap-xs-basic-type))
178 'soap-sample-value 178 'soap-sample-value
179 'soap-sample-value-for-xs-basic-type) 179 #'soap-sample-value-for-xs-basic-type)
180 180
181 (put (soap-type-of (make-soap-xs-element)) 181 (put (soap-type-of (make-soap-xs-element))
182 'soap-sample-value 182 'soap-sample-value
183 'soap-sample-value-for-xs-element) 183 #'soap-sample-value-for-xs-element)
184 184
185 (put (soap-type-of (make-soap-xs-attribute)) 185 (put (soap-type-of (make-soap-xs-attribute))
186 'soap-sample-value 186 'soap-sample-value
187 'soap-sample-value-for-xs-attribute) 187 #'soap-sample-value-for-xs-attribute)
188 188
189 (put (soap-type-of (make-soap-xs-attribute)) 189 (put (soap-type-of (make-soap-xs-attribute))
190 'soap-sample-value 190 'soap-sample-value
191 'soap-sample-value-for-xs-attribute-group) 191 #'soap-sample-value-for-xs-attribute-group)
192 192
193 (put (soap-type-of (make-soap-xs-simple-type)) 193 (put (soap-type-of (make-soap-xs-simple-type))
194 'soap-sample-value 194 'soap-sample-value
195 'soap-sample-value-for-xs-simple-type) 195 #'soap-sample-value-for-xs-simple-type)
196 196
197 (put (soap-type-of (make-soap-xs-complex-type)) 197 (put (soap-type-of (make-soap-xs-complex-type))
198 'soap-sample-value 198 'soap-sample-value
199 'soap-sample-value-for-xs-complex-type) 199 #'soap-sample-value-for-xs-complex-type)
200 200
201 (put (soap-type-of (make-soap-message)) 201 (put (soap-type-of (make-soap-message))
202 'soap-sample-value 202 'soap-sample-value
203 'soap-sample-value-for-message)) 203 #'soap-sample-value-for-message))
204 204
205 205
206 206
@@ -437,7 +437,7 @@ TYPE is a `soap-xs-complex-type'."
437 (funcall (list 'soap-invoke '*WSDL* "SomeService" 437 (funcall (list 'soap-invoke '*WSDL* "SomeService"
438 (soap-element-name operation)))) 438 (soap-element-name operation))))
439 (let ((sample-invocation 439 (let ((sample-invocation
440 (append funcall (mapcar 'cdr sample-message-value)))) 440 (append funcall (mapcar #'cdr sample-message-value))))
441 (pp sample-invocation (current-buffer))))) 441 (pp sample-invocation (current-buffer)))))
442 442
443(defun soap-inspect-port-type (port-type) 443(defun soap-inspect-port-type (port-type)
@@ -460,7 +460,7 @@ TYPE is a `soap-xs-complex-type'."
460 collect o)) 460 collect o))
461 op-name-width) 461 op-name-width)
462 462
463 (setq operations (sort operations 'string<)) 463 (setq operations (sort operations #'string<))
464 464
465 (setq op-name-width (cl-loop for o in operations maximizing (length o))) 465 (setq op-name-width (cl-loop for o in operations maximizing (length o)))
466 466
@@ -504,39 +504,39 @@ TYPE is a `soap-xs-complex-type'."
504 ;; Install the soap-inspect methods for our types 504 ;; Install the soap-inspect methods for our types
505 505
506 (put (soap-type-of (make-soap-xs-basic-type)) 'soap-inspect 506 (put (soap-type-of (make-soap-xs-basic-type)) 'soap-inspect
507 'soap-inspect-xs-basic-type) 507 #'soap-inspect-xs-basic-type)
508 508
509 (put (soap-type-of (make-soap-xs-element)) 'soap-inspect 509 (put (soap-type-of (make-soap-xs-element)) 'soap-inspect
510 'soap-inspect-xs-element) 510 #'soap-inspect-xs-element)
511 511
512 (put (soap-type-of (make-soap-xs-simple-type)) 'soap-inspect 512 (put (soap-type-of (make-soap-xs-simple-type)) 'soap-inspect
513 'soap-inspect-xs-simple-type) 513 #'soap-inspect-xs-simple-type)
514 514
515 (put (soap-type-of (make-soap-xs-complex-type)) 'soap-inspect 515 (put (soap-type-of (make-soap-xs-complex-type)) 'soap-inspect
516 'soap-inspect-xs-complex-type) 516 #'soap-inspect-xs-complex-type)
517 517
518 (put (soap-type-of (make-soap-xs-attribute)) 'soap-inspect 518 (put (soap-type-of (make-soap-xs-attribute)) 'soap-inspect
519 'soap-inspect-xs-attribute) 519 #'soap-inspect-xs-attribute)
520 520
521 (put (soap-type-of (make-soap-xs-attribute-group)) 'soap-inspect 521 (put (soap-type-of (make-soap-xs-attribute-group)) 'soap-inspect
522 'soap-inspect-xs-attribute-group) 522 #'soap-inspect-xs-attribute-group)
523 523
524 (put (soap-type-of (make-soap-message)) 'soap-inspect 524 (put (soap-type-of (make-soap-message)) 'soap-inspect
525 'soap-inspect-message) 525 #'soap-inspect-message)
526 (put (soap-type-of (make-soap-operation)) 'soap-inspect 526 (put (soap-type-of (make-soap-operation)) 'soap-inspect
527 'soap-inspect-operation) 527 #'soap-inspect-operation)
528 528
529 (put (soap-type-of (make-soap-port-type)) 'soap-inspect 529 (put (soap-type-of (make-soap-port-type)) 'soap-inspect
530 'soap-inspect-port-type) 530 #'soap-inspect-port-type)
531 531
532 (put (soap-type-of (make-soap-binding)) 'soap-inspect 532 (put (soap-type-of (make-soap-binding)) 'soap-inspect
533 'soap-inspect-binding) 533 #'soap-inspect-binding)
534 534
535 (put (soap-type-of (make-soap-port)) 'soap-inspect 535 (put (soap-type-of (make-soap-port)) 'soap-inspect
536 'soap-inspect-port) 536 #'soap-inspect-port)
537 537
538 (put (soap-type-of (soap-make-wsdl "origin")) 'soap-inspect 538 (put (soap-type-of (soap-make-wsdl "origin")) 'soap-inspect
539 'soap-inspect-wsdl)) 539 #'soap-inspect-wsdl))
540 540
541(provide 'soap-inspect) 541(provide 'soap-inspect)
542;;; soap-inspect.el ends here 542;;; soap-inspect.el ends here
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index 44f535f01c9..bb65ecaa981 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -1,4 +1,4 @@
1;;; telnet.el --- run a telnet session from within an Emacs buffer 1;;; telnet.el --- run a telnet session from within an Emacs buffer -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2021 Free Software 3;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2021 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
@@ -63,11 +63,11 @@ LOGIN-NAME, which is optional, says what to log in as on that machine.")
63(defvar telnet-new-line "\r") 63(defvar telnet-new-line "\r")
64(defvar telnet-mode-map 64(defvar telnet-mode-map
65 (let ((map (nconc (make-sparse-keymap) comint-mode-map))) 65 (let ((map (nconc (make-sparse-keymap) comint-mode-map)))
66 (define-key map "\C-m" 'telnet-send-input) 66 (define-key map "\C-m" #'telnet-send-input)
67 ;; (define-key map "\C-j" 'telnet-send-input) 67 ;; (define-key map "\C-j" #'telnet-send-input)
68 (define-key map "\C-c\C-q" 'send-process-next-char) 68 (define-key map "\C-c\C-q" #'send-process-next-char)
69 (define-key map "\C-c\C-c" 'telnet-interrupt-subjob) 69 (define-key map "\C-c\C-c" #'telnet-interrupt-subjob)
70 (define-key map "\C-c\C-z" 'telnet-c-z) 70 (define-key map "\C-c\C-z" #'telnet-c-z)
71 map)) 71 map))
72 72
73(defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *") 73(defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *")
@@ -152,7 +152,7 @@ rejecting one login and prompting again for a username and password.")
152 (t (telnet-check-software-type-initialize string) 152 (t (telnet-check-software-type-initialize string)
153 (telnet-filter proc string) 153 (telnet-filter proc string)
154 (cond ((> telnet-count telnet-maximum-count) 154 (cond ((> telnet-count telnet-maximum-count)
155 (set-process-filter proc 'telnet-filter)) 155 (set-process-filter proc #'telnet-filter))
156 (t (setq telnet-count (1+ telnet-count))))))))) 156 (t (setq telnet-count (1+ telnet-count)))))))))
157 157
158;; Identical to comint-simple-send, except that it sends telnet-new-line 158;; Identical to comint-simple-send, except that it sends telnet-new-line
@@ -227,9 +227,9 @@ Normally input is edited in Emacs and sent a line at a time."
227 (if (and buffer (get-buffer-process buffer)) 227 (if (and buffer (get-buffer-process buffer))
228 (switch-to-buffer (concat "*" name "*")) 228 (switch-to-buffer (concat "*" name "*"))
229 (switch-to-buffer 229 (switch-to-buffer
230 (apply 'make-comint name telnet-program nil telnet-options)) 230 (apply #'make-comint name telnet-program nil telnet-options))
231 (setq process (get-buffer-process (current-buffer))) 231 (setq process (get-buffer-process (current-buffer)))
232 (set-process-filter process 'telnet-initial-filter) 232 (set-process-filter process #'telnet-initial-filter)
233 ;; Don't send the `open' cmd till telnet is ready for it. 233 ;; Don't send the `open' cmd till telnet is ready for it.
234 (accept-process-output process) 234 (accept-process-output process)
235 (erase-buffer) 235 (erase-buffer)
@@ -263,7 +263,7 @@ Normally input is edited in Emacs and sent a line at a time."
263 (require 'shell) 263 (require 'shell)
264 (let ((name (concat "rsh-" host ))) 264 (let ((name (concat "rsh-" host )))
265 (switch-to-buffer (make-comint name remote-shell-program nil host)) 265 (switch-to-buffer (make-comint name remote-shell-program nil host))
266 (set-process-filter (get-process name) 'telnet-initial-filter) 266 (set-process-filter (get-process name) #'telnet-initial-filter)
267 (telnet-mode) 267 (telnet-mode)
268 (setq-local telnet-connect-command (list 'rsh host)) 268 (setq-local telnet-connect-command (list 'rsh host))
269 (setq telnet-count -16))) 269 (setq telnet-count -16)))
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 2aacf266f2b..1e48f8dbb8c 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -250,7 +250,7 @@ function returns nil"
250 (host (or (file-remote-p string 'host) "")) 250 (host (or (file-remote-p string 'host) ""))
251 item result) 251 item result)
252 (while (setq item (pop tdra)) 252 (while (setq item (pop tdra))
253 (when (string-match-p (or (eval (car item)) "") string) 253 (when (string-match-p (or (eval (car item) t) "") string)
254 (setq tdra nil 254 (setq tdra nil
255 result 255 result
256 (format-spec 256 (format-spec
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 27461e6917c..b67de1bd21b 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -70,7 +70,7 @@
70It is the default value of `temporary-file-directory'." 70It is the default value of `temporary-file-directory'."
71 ;; We must return a local directory. If it is remote, we could run 71 ;; We must return a local directory. If it is remote, we could run
72 ;; into an infloop. 72 ;; into an infloop.
73 (eval (car (get 'temporary-file-directory 'standard-value)))) 73 (eval (car (get 'temporary-file-directory 'standard-value)) t))
74 74
75(defsubst tramp-compat-make-temp-name () 75(defsubst tramp-compat-make-temp-name ()
76 "Generate a local temporary file name (compat function)." 76 "Generate a local temporary file name (compat function)."
diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el
index 64b5b48e7d4..5adc4ce354a 100644
--- a/lisp/net/tramp-integration.el
+++ b/lisp/net/tramp-integration.el
@@ -231,7 +231,7 @@ NAME must be equal to `tramp-current-connection'."
231 (delete (info-lookup->mode-cache 'symbol 'tramp-info-lookup-mode) 231 (delete (info-lookup->mode-cache 'symbol 'tramp-info-lookup-mode)
232 (info-lookup->topic-cache 'symbol))))) 232 (info-lookup->topic-cache 'symbol)))))
233 233
234 (dolist (mode (mapcar 'car (info-lookup->topic-value 'symbol))) 234 (dolist (mode (mapcar #'car (info-lookup->topic-value 'symbol)))
235 ;; Add `tramp-info-lookup-mode' to `other-modes' for either 235 ;; Add `tramp-info-lookup-mode' to `other-modes' for either
236 ;; `emacs-lisp-mode' itself, or to modes which use 236 ;; `emacs-lisp-mode' itself, or to modes which use
237 ;; `emacs-lisp-mode' as `other-modes'. Reset `info-lookup-cache'. 237 ;; `emacs-lisp-mode' as `other-modes'. Reset `info-lookup-cache'.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index dac83b82a82..7f6ecc6c327 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4918,7 +4918,7 @@ If there is just some editing, retry it after 5 seconds."
4918 (progn 4918 (progn
4919 (tramp-message 4919 (tramp-message
4920 vec 5 "Cannot timeout session, trying it again in %s seconds." 5) 4920 vec 5 "Cannot timeout session, trying it again in %s seconds." 5)
4921 (run-at-time 5 nil 'tramp-timeout-session vec)) 4921 (run-at-time 5 nil #'tramp-timeout-session vec))
4922 (tramp-message 4922 (tramp-message
4923 vec 3 "Timeout session %s" (tramp-make-tramp-file-name vec 'noloc)) 4923 vec 3 "Timeout session %s" (tramp-make-tramp-file-name vec 'noloc))
4924 (tramp-cleanup-connection vec 'keep-debug nil 'keep-processes))) 4924 (tramp-cleanup-connection vec 'keep-debug nil 'keep-processes)))
@@ -5149,7 +5149,7 @@ connection if a previous connection has died for some reason."
5149 (when (tramp-get-connection-property p "session-timeout" nil) 5149 (when (tramp-get-connection-property p "session-timeout" nil)
5150 (run-at-time 5150 (run-at-time
5151 (tramp-get-connection-property p "session-timeout" nil) nil 5151 (tramp-get-connection-property p "session-timeout" nil) nil
5152 'tramp-timeout-session vec)) 5152 #'tramp-timeout-session vec))
5153 5153
5154 ;; Make initial shell settings. 5154 ;; Make initial shell settings.
5155 (tramp-open-connection-setup-interactive-shell p vec) 5155 (tramp-open-connection-setup-interactive-shell p vec)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 47d62f38045..9f65608f3a4 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -386,6 +386,8 @@ Also see `tramp-default-method-alist'."
386 :type 'string) 386 :type 'string)
387 387
388(defcustom tramp-default-method-alist nil 388(defcustom tramp-default-method-alist nil
389 ;; FIXME: This is not an "alist", because its elements are not of
390 ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
389 "Default method to use for specific host/user pairs. 391 "Default method to use for specific host/user pairs.
390This is an alist of items (HOST USER METHOD). The first matching item 392This is an alist of items (HOST USER METHOD). The first matching item
391specifies the method to use for a file name which does not specify a 393specifies the method to use for a file name which does not specify a
@@ -413,6 +415,8 @@ This variable is regarded as obsolete, and will be removed soon."
413 :type '(choice (const nil) string)) 415 :type '(choice (const nil) string))
414 416
415(defcustom tramp-default-user-alist nil 417(defcustom tramp-default-user-alist nil
418 ;; FIXME: This is not an "alist", because its elements are not of
419 ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
416 "Default user to use for specific method/host pairs. 420 "Default user to use for specific method/host pairs.
417This is an alist of items (METHOD HOST USER). The first matching item 421This is an alist of items (METHOD HOST USER). The first matching item
418specifies the user to use for a file name which does not specify a 422specifies the user to use for a file name which does not specify a
@@ -432,6 +436,8 @@ Useful for su and sudo methods mostly."
432 :type 'string) 436 :type 'string)
433 437
434(defcustom tramp-default-host-alist nil 438(defcustom tramp-default-host-alist nil
439 ;; FIXME: This is not an "alist", because its elements are not of
440 ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
435 "Default host to use for specific method/user pairs. 441 "Default host to use for specific method/user pairs.
436This is an alist of items (METHOD USER HOST). The first matching item 442This is an alist of items (METHOD USER HOST). The first matching item
437specifies the host to use for a file name which does not specify a 443specifies the host to use for a file name which does not specify a
@@ -447,6 +453,8 @@ empty string for the method name."
447 (choice :tag " Host name" string (const nil))))) 453 (choice :tag " Host name" string (const nil)))))
448 454
449(defcustom tramp-default-proxies-alist nil 455(defcustom tramp-default-proxies-alist nil
456 ;; FIXME: This is not an "alist", because its elements are not of
457 ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
450 "Route to be followed for specific host/user pairs. 458 "Route to be followed for specific host/user pairs.
451This is an alist of items (HOST USER PROXY). The first matching 459This is an alist of items (HOST USER PROXY). The first matching
452item specifies the proxy to be passed for a file name located on 460item specifies the proxy to be passed for a file name located on
@@ -1710,6 +1718,10 @@ version, the function does nothing."
1710 "Used for highlighting Tramp debug buffers in `outline-mode'.") 1718 "Used for highlighting Tramp debug buffers in `outline-mode'.")
1711 1719
1712(defconst tramp-debug-font-lock-keywords 1720(defconst tramp-debug-font-lock-keywords
1721 ;; FIXME: Make it a function instead of an ELisp expression, so you
1722 ;; can evaluate it with `funcall' rather than `eval'!
1723 ;; Also, in `font-lock-defaults' you can specify a function name for
1724 ;; the "KEYWORDS" part, so font-lock calls it to get the actual keywords!
1713 '(list 1725 '(list
1714 (concat "^\\(?:" tramp-debug-outline-regexp "\\).+") 1726 (concat "^\\(?:" tramp-debug-outline-regexp "\\).+")
1715 '(1 font-lock-warning-face t t) 1727 '(1 font-lock-warning-face t t)
@@ -1738,8 +1750,11 @@ The outline level is equal to the verbosity of the Tramp message."
1738 (outline-mode)) 1750 (outline-mode))
1739 (setq-local outline-level 'tramp-debug-outline-level) 1751 (setq-local outline-level 'tramp-debug-outline-level)
1740 (setq-local font-lock-keywords 1752 (setq-local font-lock-keywords
1741 `(t (eval ,tramp-debug-font-lock-keywords) 1753 ;; FIXME: This `(t FOO . BAR)' representation in
1742 ,(eval tramp-debug-font-lock-keywords))) 1754 ;; `font-lock-keywords' is supposed to be an
1755 ;; internal implementation "detail". Don't abuse it here!
1756 `(t (eval ,tramp-debug-font-lock-keywords t)
1757 ,(eval tramp-debug-font-lock-keywords t)))
1743 ;; Do not edit the debug buffer. 1758 ;; Do not edit the debug buffer.
1744 (use-local-map special-mode-map)) 1759 (use-local-map special-mode-map))
1745 (current-buffer))) 1760 (current-buffer)))
@@ -3691,15 +3706,15 @@ User is always nil."
3691 (setq choices tramp-default-proxies-alist) 3706 (setq choices tramp-default-proxies-alist)
3692 (while choices 3707 (while choices
3693 (setq item (pop choices) 3708 (setq item (pop choices)
3694 proxy (eval (nth 2 item))) 3709 proxy (eval (nth 2 item) t))
3695 (when (and 3710 (when (and
3696 ;; Host. 3711 ;; Host.
3697 (string-match-p 3712 (string-match-p
3698 (or (eval (nth 0 item)) "") 3713 (or (eval (nth 0 item) t) "")
3699 (or (tramp-file-name-host-port (car target-alist)) "")) 3714 (or (tramp-file-name-host-port (car target-alist)) ""))
3700 ;; User. 3715 ;; User.
3701 (string-match-p 3716 (string-match-p
3702 (or (eval (nth 1 item)) "") 3717 (or (eval (nth 1 item) t) "")
3703 (or (tramp-file-name-user-domain (car target-alist)) ""))) 3718 (or (tramp-file-name-user-domain (car target-alist)) "")))
3704 (if (null proxy) 3719 (if (null proxy)
3705 ;; No more hops needed. 3720 ;; No more hops needed.
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 1fa625c3245..4baa657c0a5 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -252,7 +252,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
252 (cond ((not expr) "") 252 (cond ((not expr) "")
253 ((stringp expr) expr) 253 ((stringp expr) expr)
254 ((vectorp expr) (webjump-builtin expr name)) 254 ((vectorp expr) (webjump-builtin expr name))
255 ((listp expr) (eval expr)) 255 ((listp expr) (eval expr t))
256 ((symbolp expr) 256 ((symbolp expr)
257 (if (fboundp expr) 257 (if (fboundp expr)
258 (funcall expr name) 258 (funcall expr name)