Function: ecomplete-edit
ecomplete-edit is an interactive and byte-compiled function defined in
ecomplete.el.gz.
Signature
(ecomplete-edit)
Documentation
Prompt for an ecomplete item and allow editing it.
Probably introduced at or before Emacs version 29.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/ecomplete.el.gz
(defun ecomplete-edit ()
"Prompt for an ecomplete item and allow editing it."
(interactive)
(let* ((type (ecomplete--prompt-type))
(data (cdr (assq type ecomplete-database)))
(key (completing-read "Key to edit: " data nil t))
(new (read-string "New value (empty to remove): "
(nth 3 (assoc key data)))))
(if (zerop (length new))
(progn
(ecomplete--remove-item type key)
(message "Removed %s" key))
(ecomplete-add-item type key new t)
(message "Updated %s to %s" key new))
(ecomplete-save)))