Function: mixal-describe-operation-code
mixal-describe-operation-code is an interactive and byte-compiled
function defined in mixal-mode.el.gz.
Signature
(mixal-describe-operation-code OP-CODE)
Documentation
Display the full documentation of OP-CODE.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/mixal-mode.el.gz
(defun mixal-describe-operation-code (op-code)
"Display the full documentation of OP-CODE."
(interactive
(list
(let* ((completion-ignore-case t)
;; we already have a list, but it is not in the right format
;; transform it to a valid table so completion can use it
(table (mapcar (lambda (elm) (cons (symbol-name (car elm)) nil))
mixal-operation-codes-alist))
;; prompt is different depending on we are close to a valid op-code
(have-default (assq (intern-soft (current-word))
mixal-operation-codes-alist))
(prompt (concat "Describe operation code "
(if have-default
(concat "(default " (current-word) "): ")
": "))))
;; As the operation code to the user.
(completing-read prompt table nil t nil
'mixal-describe-operation-code-history
(current-word)))))
;; get the info on the op-code and output it to the help buffer
(let ((op-code-help (assq (intern-soft op-code) mixal-operation-codes-alist)))
(when op-code-help
(with-output-to-temp-buffer (buffer-name (get-buffer-create "*Help*"))
(princ op-code) (princ " is an mix operation code\n\n")
(princ (nth 5 op-code-help)) (terpri) (terpri)
(princ " group: ") (princ (nth 1 op-code-help)) (terpri)
(princ " nice name: ") (princ (nth 2 op-code-help)) (terpri)
(princ " OPCODE / C: ") (princ (nth 3 op-code-help)) (terpri)
(princ " MOD / F: ") (princ (nth 4 op-code-help)) (terpri)
(princ " time: ") (princ (nth 6 op-code-help)) (terpri)))))