Function: forge-edit-mark

forge-edit-mark is an interactive and byte-compiled function defined in forge-commands.el.

Signature

(forge-edit-mark ID NAME FACE DESCRIPTION)

Documentation

Define a new mark that topics can be marked with.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-commands.el
(defun forge-edit-mark (id name face description)
  "Define a new mark that topics can be marked with."
  (interactive
    (pcase-let*
        ((marks (forge-sql [:select [name id face description] :from mark]))
         (`(,name ,id ,face ,description)
          (assoc (completing-read "Edit mark" (mapcar #'car marks) nil t)
                 marks)))
      (list id
            (read-string "Name: " name)
            (magit-read-char-case "Set appearance using " nil
              (?n "a face [n]ame"
                  (read-face-name "Face name: " (and (symbolp face) face)))
              (?s "face [s]exp"
                  (read-from-minibuffer
                   "Face sexp: "
                   (if (listp face)
                       (format "%S" face)
                     "(:background \"\" :foreground \"\" :box t)")
                   read-expression-map t)))
            (let ((str (read-string "Description: " nil nil description)))
              (and (not (equal str "")) str)))))
  (forge-sql [:update mark
              :set (= [name face description] $v1)
              :where (= id $s2)]
             (vector name face description) id))