44 |
(defmacro noreturn (form) |
(defmacro noreturn (form) |
45 |
"Evaluates FORM, with the expectation that the evaluation will signal an error |
"Evaluates FORM, with the expectation that the evaluation will signal an error |
46 |
instead of returning to its caller. If FORM does return, an error is |
instead of returning to its caller. If FORM does return, an error is |
47 |
signalled." |
signaled." |
48 |
`(prog1 ,form |
`(prog1 ,form |
49 |
(error "Form marked with `noreturn' did return"))) |
(error "Form marked with `noreturn' did return"))) |
50 |
|
|
51 |
(defmacro 1value (form) |
(defmacro 1value (form) |
52 |
"Evaluates FORM, with the expectation that all the same value will be returned |
"Evaluates FORM, with the expectation that the same value will be returned |
53 |
from all evaluations of FORM. This is the global do-nothing |
from all evaluations of FORM. This is the global do-nothing |
54 |
version of `1value'. There is also `testcover-1value' that |
version of `1value'. There is also `testcover-1value' that |
55 |
complains if FORM ever does return differing values." |
complains if FORM ever does return differing values." |
61 |
self-quoting; the result of evaluating the lambda expression is the |
self-quoting; the result of evaluating the lambda expression is the |
62 |
expression itself. The lambda expression may then be treated as a |
expression itself. The lambda expression may then be treated as a |
63 |
function, i.e., stored as the function value of a symbol, passed to |
function, i.e., stored as the function value of a symbol, passed to |
64 |
funcall or mapcar, etc. |
`funcall' or `mapcar', etc. |
65 |
|
|
66 |
ARGS should take the same form as an argument list for a `defun'. |
ARGS should take the same form as an argument list for a `defun'. |
67 |
DOCSTRING is an optional documentation string. |
DOCSTRING is an optional documentation string. |
347 |
(setq loop (1+ loop)))))) |
(setq loop (1+ loop)))))) |
348 |
|
|
349 |
(defvar key-substitution-in-progress nil |
(defvar key-substitution-in-progress nil |
350 |
"Used internally by substitute-key-definition.") |
"Used internally by `substitute-key-definition'.") |
351 |
|
|
352 |
(defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix) |
(defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix) |
353 |
"Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. |
"Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. |