aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2025-03-29 12:34:37 +0100
committerStefan Kangas2025-03-29 14:59:09 +0100
commit14cf4d538350fd2b1eda35101f5bb585f55e4659 (patch)
treea635cc599694511b26a89e777733b9456fd722e3
parentbfabae993113aa0a35298950355333497bc0d485 (diff)
downloademacs-14cf4d538350fd2b1eda35101f5bb585f55e4659.tar.gz
emacs-14cf4d538350fd2b1eda35101f5bb585f55e4659.zip
Remove redundant constant nil argument to gethash
* lisp/cedet/ede/files.el (ede--directory-project-from-hash): * lisp/emacs-lisp/edebug.el (edebug-unwrap*): * lisp/emacs-lisp/testcover.el (testcover--copy-object1): * lisp/net/zeroconf.el (zeroconf-get-service, zeroconf-resolve-service) (zeroconf-register-service-browser, zeroconf-service-browser-handler) (zeroconf-register-service-resolver): * lisp/url/url-history.el (url-have-visited-url): Remove redundant constant nil argument to gethash.
-rw-r--r--lisp/cedet/ede/files.el2
-rw-r--r--lisp/emacs-lisp/edebug.el6
-rw-r--r--lisp/emacs-lisp/testcover.el4
-rw-r--r--lisp/net/zeroconf.el12
-rw-r--r--lisp/url/url-history.el2
5 files changed, 13 insertions, 13 deletions
diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el
index 63ba30ebcdd..046acbb147e 100644
--- a/lisp/cedet/ede/files.el
+++ b/lisp/cedet/ede/files.el
@@ -282,7 +282,7 @@ Do this whenever a new project is created, as opposed to loaded."
282(defun ede--directory-project-from-hash (dir) 282(defun ede--directory-project-from-hash (dir)
283 "If there is an already loaded project for DIR, return it from the hash." 283 "If there is an already loaded project for DIR, return it from the hash."
284 (setq dir (expand-file-name dir)) 284 (setq dir (expand-file-name dir))
285 (gethash dir ede-project-directory-hash nil)) 285 (gethash dir ede-project-directory-hash))
286 286
287(defun ede--directory-project-add-description-to-hash (dir desc) 287(defun ede--directory-project-add-description-to-hash (dir desc)
288 "Add to the EDE project hash DIR associated with DESC." 288 "Add to the EDE project hash DIR associated with DESC."
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 8a10f26a7b4..284e3acd959 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -1288,7 +1288,7 @@ infinite loops when the code/environment contains a circular object.")
1288 (while (not (eq sexp (setq sexp (edebug-unwrap sexp))))) 1288 (while (not (eq sexp (setq sexp (edebug-unwrap sexp)))))
1289 (cond 1289 (cond
1290 ((consp sexp) 1290 ((consp sexp)
1291 (or (gethash sexp edebug--unwrap-cache nil) 1291 (or (gethash sexp edebug--unwrap-cache)
1292 (let ((remainder sexp) 1292 (let ((remainder sexp)
1293 (current (cons nil nil))) 1293 (current (cons nil nil)))
1294 (prog1 current 1294 (prog1 current
@@ -1303,8 +1303,8 @@ infinite loops when the code/environment contains a circular object.")
1303 (setf (cdr current) 1303 (setf (cdr current)
1304 (edebug-unwrap* remainder)) 1304 (edebug-unwrap* remainder))
1305 nil) 1305 nil)
1306 ((gethash remainder edebug--unwrap-cache nil) 1306 ((gethash remainder edebug--unwrap-cache)
1307 (setf (cdr current) (gethash remainder edebug--unwrap-cache nil)) 1307 (setf (cdr current) (gethash remainder edebug--unwrap-cache))
1308 nil) 1308 nil)
1309 (t (setq current 1309 (t (setq current
1310 (setf (cdr current) (cons nil nil))))))))))) 1310 (setf (cdr current) (cons nil nil)))))))))))
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index b007e3c9091..eb78768f0e6 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -296,7 +296,7 @@ iteratively copies its cdr. When VECP is non-nil, copy
296vectors as well as conses." 296vectors as well as conses."
297 (if (and (atom obj) (or (not vecp) (not (vectorp obj)))) 297 (if (and (atom obj) (or (not vecp) (not (vectorp obj))))
298 obj 298 obj
299 (let ((copy (gethash obj hash-table nil))) 299 (let ((copy (gethash obj hash-table)))
300 (unless copy 300 (unless copy
301 (cond 301 (cond
302 ((consp obj) 302 ((consp obj)
@@ -315,7 +315,7 @@ vectors as well as conses."
315 (testcover--copy-object1 rest vecp hash-table)) 315 (testcover--copy-object1 rest vecp hash-table))
316 nil) 316 nil)
317 ((gethash rest hash-table nil) 317 ((gethash rest hash-table nil)
318 (setf (cdr current) (gethash rest hash-table nil)) 318 (setf (cdr current) (gethash rest hash-table))
319 nil) 319 nil)
320 (t (setq current 320 (t (setq current
321 (setf (cdr current) (cons nil nil))))))))) 321 (setf (cdr current) (cons nil nil)))))))))
diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el
index faa547ddd40..0734e9b94fb 100644
--- a/lisp/net/zeroconf.el
+++ b/lisp/net/zeroconf.el
@@ -380,7 +380,7 @@ TYPE. The resulting list has the format
380 (INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS)." 380 (INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS)."
381 ;; Due to the service browser, all known services are kept in 381 ;; Due to the service browser, all known services are kept in
382 ;; `zeroconf-services-hash'. 382 ;; `zeroconf-services-hash'.
383 (gethash (concat name "/" type) zeroconf-services-hash nil)) 383 (gethash (concat name "/" type) zeroconf-services-hash))
384 384
385(defvar dbus-debug) 385(defvar dbus-debug)
386 386
@@ -396,7 +396,7 @@ TYPE. The resulting list has the format
396 396
397 (or 397 (or
398 ;; Check whether we know this service already. 398 ;; Check whether we know this service already.
399 (gethash key zeroconf-resolved-services-hash nil) 399 (gethash key zeroconf-resolved-services-hash)
400 400
401 ;; Resolve the service. We don't propagate D-Bus errors. 401 ;; Resolve the service. We don't propagate D-Bus errors.
402 (dbus-ignore-errors 402 (dbus-ignore-errors
@@ -552,7 +552,7 @@ DOMAIN is nil, the local domain is used."
552 552
553(defun zeroconf-register-service-browser (type) 553(defun zeroconf-register-service-browser (type)
554 "Register a service browser at the Avahi daemon." 554 "Register a service browser at the Avahi daemon."
555 (or (gethash type zeroconf-path-avahi-service-browser-hash nil) 555 (or (gethash type zeroconf-path-avahi-service-browser-hash)
556 (puthash type 556 (puthash type
557 (dbus-call-method 557 (dbus-call-method
558 :system zeroconf-service-avahi zeroconf-path-avahi 558 :system zeroconf-service-avahi zeroconf-path-avahi
@@ -573,8 +573,8 @@ DOMAIN is nil, the local domain is used."
573 (let* ((name (zeroconf-service-name val)) 573 (let* ((name (zeroconf-service-name val))
574 (type (zeroconf-service-type val)) 574 (type (zeroconf-service-type val))
575 (key (concat name "/" type)) 575 (key (concat name "/" type))
576 (ahook (gethash type zeroconf-service-added-hooks-hash nil)) 576 (ahook (gethash type zeroconf-service-added-hooks-hash))
577 (rhook (gethash type zeroconf-service-removed-hooks-hash nil))) 577 (rhook (gethash type zeroconf-service-removed-hooks-hash)))
578 (cond 578 (cond
579 ((string-equal (dbus-event-member-name last-input-event) "ItemNew") 579 ((string-equal (dbus-event-member-name last-input-event) "ItemNew")
580 ;; Add new service. 580 ;; Add new service.
@@ -590,7 +590,7 @@ DOMAIN is nil, the local domain is used."
590(defun zeroconf-register-service-resolver (name type) 590(defun zeroconf-register-service-resolver (name type)
591 "Register a service resolver at the Avahi daemon." 591 "Register a service resolver at the Avahi daemon."
592 (let ((key (concat name "/" type))) 592 (let ((key (concat name "/" type)))
593 (or (gethash key zeroconf-path-avahi-service-resolver-hash nil) 593 (or (gethash key zeroconf-path-avahi-service-resolver-hash)
594 (puthash key 594 (puthash key
595 (dbus-call-method 595 (dbus-call-method
596 :system zeroconf-service-avahi zeroconf-path-avahi 596 :system zeroconf-service-avahi zeroconf-path-avahi
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index d0506295f9c..825e259d330 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -154,7 +154,7 @@ user for what type to save as."
154 154
155(defun url-have-visited-url (url) 155(defun url-have-visited-url (url)
156 (url-do-setup) 156 (url-do-setup)
157 (gethash url url-history-hash-table nil)) 157 (gethash url url-history-hash-table))
158 158
159(defun url-completion-function (string predicate function) 159(defun url-completion-function (string predicate function)
160 (declare (obsolete url-history-hash-table "26.1")) 160 (declare (obsolete url-history-hash-table "26.1"))