Function: ogonek-read-prefix
ogonek-read-prefix is a byte-compiled function defined in
ogonek.el.gz.
Signature
(ogonek-read-prefix PROMPT DEFAULT-PREFIX-VAR)
Documentation
Read a prefix character for prefix notation.
The result is stored in the variable DEFAULT-PREFIX-VAR. PROMPT is a string to be shown when the user is asked for a new prefix.
Source Code
;; Defined in /usr/src/emacs/lisp/international/ogonek.el.gz
(defun ogonek-read-prefix (prompt default-prefix-var)
"Read a prefix character for prefix notation.
The result is stored in the variable DEFAULT-PREFIX-VAR.
PROMPT is a string to be shown when the user is asked for a new prefix."
(let ((prefix-string
(read-string
(format-prompt prompt (char-to-string (eval default-prefix-var))))))
(if (> (length prefix-string) 1)
(error "! Only one character expected")
;; set the default prefix character to the one just read
(set default-prefix-var
(if (string= prefix-string "")
(eval default-prefix-var)
(string-to-char prefix-string)))
;; the new default prefix is the function's result:
(eval default-prefix-var))))