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.
This commit is contained in:
Stefan Kangas 2025-03-29 12:34:37 +01:00
parent bfabae9931
commit 14cf4d5383
5 changed files with 13 additions and 13 deletions

View file

@ -282,7 +282,7 @@ Do this whenever a new project is created, as opposed to loaded."
(defun ede--directory-project-from-hash (dir)
"If there is an already loaded project for DIR, return it from the hash."
(setq dir (expand-file-name dir))
(gethash dir ede-project-directory-hash nil))
(gethash dir ede-project-directory-hash))
(defun ede--directory-project-add-description-to-hash (dir desc)
"Add to the EDE project hash DIR associated with DESC."

View file

@ -1288,7 +1288,7 @@ infinite loops when the code/environment contains a circular object.")
(while (not (eq sexp (setq sexp (edebug-unwrap sexp)))))
(cond
((consp sexp)
(or (gethash sexp edebug--unwrap-cache nil)
(or (gethash sexp edebug--unwrap-cache)
(let ((remainder sexp)
(current (cons nil nil)))
(prog1 current
@ -1303,8 +1303,8 @@ infinite loops when the code/environment contains a circular object.")
(setf (cdr current)
(edebug-unwrap* remainder))
nil)
((gethash remainder edebug--unwrap-cache nil)
(setf (cdr current) (gethash remainder edebug--unwrap-cache nil))
((gethash remainder edebug--unwrap-cache)
(setf (cdr current) (gethash remainder edebug--unwrap-cache))
nil)
(t (setq current
(setf (cdr current) (cons nil nil)))))))))))

View file

@ -296,7 +296,7 @@ iteratively copies its cdr. When VECP is non-nil, copy
vectors as well as conses."
(if (and (atom obj) (or (not vecp) (not (vectorp obj))))
obj
(let ((copy (gethash obj hash-table nil)))
(let ((copy (gethash obj hash-table)))
(unless copy
(cond
((consp obj)
@ -315,7 +315,7 @@ vectors as well as conses."
(testcover--copy-object1 rest vecp hash-table))
nil)
((gethash rest hash-table nil)
(setf (cdr current) (gethash rest hash-table nil))
(setf (cdr current) (gethash rest hash-table))
nil)
(t (setq current
(setf (cdr current) (cons nil nil)))))))))

View file

@ -380,7 +380,7 @@ TYPE. The resulting list has the format
(INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS)."
;; Due to the service browser, all known services are kept in
;; `zeroconf-services-hash'.
(gethash (concat name "/" type) zeroconf-services-hash nil))
(gethash (concat name "/" type) zeroconf-services-hash))
(defvar dbus-debug)
@ -396,7 +396,7 @@ TYPE. The resulting list has the format
(or
;; Check whether we know this service already.
(gethash key zeroconf-resolved-services-hash nil)
(gethash key zeroconf-resolved-services-hash)
;; Resolve the service. We don't propagate D-Bus errors.
(dbus-ignore-errors
@ -552,7 +552,7 @@ DOMAIN is nil, the local domain is used."
(defun zeroconf-register-service-browser (type)
"Register a service browser at the Avahi daemon."
(or (gethash type zeroconf-path-avahi-service-browser-hash nil)
(or (gethash type zeroconf-path-avahi-service-browser-hash)
(puthash type
(dbus-call-method
:system zeroconf-service-avahi zeroconf-path-avahi
@ -573,8 +573,8 @@ DOMAIN is nil, the local domain is used."
(let* ((name (zeroconf-service-name val))
(type (zeroconf-service-type val))
(key (concat name "/" type))
(ahook (gethash type zeroconf-service-added-hooks-hash nil))
(rhook (gethash type zeroconf-service-removed-hooks-hash nil)))
(ahook (gethash type zeroconf-service-added-hooks-hash))
(rhook (gethash type zeroconf-service-removed-hooks-hash)))
(cond
((string-equal (dbus-event-member-name last-input-event) "ItemNew")
;; Add new service.
@ -590,7 +590,7 @@ DOMAIN is nil, the local domain is used."
(defun zeroconf-register-service-resolver (name type)
"Register a service resolver at the Avahi daemon."
(let ((key (concat name "/" type)))
(or (gethash key zeroconf-path-avahi-service-resolver-hash nil)
(or (gethash key zeroconf-path-avahi-service-resolver-hash)
(puthash key
(dbus-call-method
:system zeroconf-service-avahi zeroconf-path-avahi

View file

@ -154,7 +154,7 @@ user for what type to save as."
(defun url-have-visited-url (url)
(url-do-setup)
(gethash url url-history-hash-table nil))
(gethash url url-history-hash-table))
(defun url-completion-function (string predicate function)
(declare (obsolete url-history-hash-table "26.1"))