(if (and (keymapp defn)
;; Avoid recursively scanning
;; where KEYMAP does not have a submap.
- (keymapp (lookup-key keymap prefix1))
+ (let ((elt (lookup-key keymap prefix1)))
+ (or (null elt)
+ (keymapp elt)))
;; Avoid recursively rescanning keymap being scanned.
(not (memq inner-def
key-substitution-in-progress)))
(define-key keymap prefix1
(nconc (nreverse skipped) newdef))
(if (and (keymapp defn)
- (keymapp (lookup-key keymap prefix1))
+ (let ((elt (lookup-key keymap prefix1)))
+ (or (null elt)
+ (keymapp elt)))
(not (memq inner-def
key-substitution-in-progress)))
(substitute-key-definition olddef newdef keymap
(defun add-to-list (list-var element)
"Add to the value of LIST-VAR the element ELEMENT if it isn't there yet.
+The test for presence of ELEMENT is done with `equal'.
If you want to use `add-to-list' on a variable that is not defined
until a certain package is loaded, you should put the call to `add-to-list'
into a hook function that will be run only after loading the package.
nil)
(defun error (&rest args)
- "Signal an error, making error message by passing all args to `format'."
+ "Signal an error, making error message by passing all args to `format'.
+In Emacs, the convention is that error messages start with a capital
+letter but *do not* end with a period. Please follow this convention
+for the sake of consistency."
(while t
(signal 'error (list (apply 'format args)))))
(substring string (match-beginning num) (match-end num))
(buffer-substring (match-beginning num) (match-end num)))))
-(defun buffer-substring-no-properties (beg end)
- "Return the text from BEG to END, without text properties, as a string."
- (let ((string (buffer-substring beg end)))
- (set-text-properties 0 (length string) nil string)
- string))
-
(defun shell-quote-argument (argument)
"Quote an argument for passing as argument to an inferior shell."
(if (eq system-type 'ms-dos)
i)
(setq i 0)
(while (<= i 31)
- (aset table i 13)
+ (aset table i nil)
(setq i (1+ i)))
(setq i ?A)
(while (<= i ?Z)
- (aset table i 13)
+ (aset table i nil)
(setq i (1+ i)))
(setq i ?a)
(while (<= i ?z)
- (aset table i 13)
+ (aset table i nil)
(setq i (1+ i)))
(setq i 128)
(while (<= i 255)
- (aset table i 13)
+ (aset table i nil)
(setq i (1+ i)))
table)))
\f