Function: kview:set-label-type

kview:set-label-type is an interactive and byte-compiled function defined in kview.el.

Signature

(kview:set-label-type KVIEW NEW-TYPE &optional ARG)

Documentation

Change KVIEW's label display type to NEW-TYPE, updating all displayed labels.

See documentation for variable, kview:default-label-type, for valid values of NEW-TYPE.

Separately, if sent an optional prefix ARG of 1, instead call kotl-mode:toggle-letter-prefix to toggle on or off the shorter C-c prefix for letter key bindings. This does not affect the default C-c ; letter prefix.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20261030.2317/kotl/kview.el
(defun kview:set-label-type (kview new-type &optional arg)
  "Change KVIEW's label display type to NEW-TYPE, updating all displayed labels.
See documentation for variable, kview:default-label-type, for
valid values of NEW-TYPE.

Separately, if sent an optional prefix ARG of 1, instead call
`kotl-mode:toggle-letter-prefix' to toggle on or off the shorter C-c prefix
for letter key bindings.  This does not affect the default C-c ; letter
prefix."
  (interactive (list kotl-kview
		     (unless (eq current-prefix-arg 1)
                       (let ((completion-ignore-case)
			     (label-type (kview:label-type kotl-kview))
			     new-type-str)
                         (if (string-equal
			      ""
			      (setq new-type-str
				    (completing-read
				     (format "View label type (current = %s): "
					     label-type)
				     '(("alpha") ("legal") ("id")
				       ;; ("no") ("partial-alpha") ("star")
				       )
				     nil t)))
			     label-type
			   (intern new-type-str))))
                     current-prefix-arg))
  (if (eq arg 1)
      (call-interactively 'kotl-mode:toggle-letter-prefix)
    ;; no partial-alpha star
    (unless (memq new-type '(alpha legal id))
      (error "(kview:set-label-type): Invalid label type, `%s'" new-type))
    (let ((old-label-type (kview:label-type kview)))
      (if (eq old-label-type new-type)
	  ;; Per kview function definitions might have changed, so reset them.
	  (kview:set-functions new-type)
        (klabel-type:set-labels new-type)
        (kview:set-attr kview 'label-type new-type)
        (kview:set-functions new-type)
        (kvspec:update t)))))