(setq inserted t)))
(setq tail (cdr tail)))))
+(defmacro kbd (keys)
+ "Convert KEYS to the internal Emacs key representation.
+KEYS should be a string constant in the format used for
+saving keyboard macros (see `insert-kbd-macro')."
+ (read-kbd-macro keys))
+
(put 'keyboard-translate-table 'char-table-extra-slots 0)
(defun keyboard-translate (from to)
argument
(if (eq system-type 'windows-nt)
(concat "\"" argument "\"")
- ;; Quote everything except POSIX filename characters.
- ;; This should be safe enough even for really weird shells.
- (let ((result "") (start 0) end)
- (while (string-match "[^-0-9a-zA-Z_./]" argument start)
- (setq end (match-beginning 0)
- result (concat result (substring argument start end)
- "\\" (substring argument end (1+ end)))
- start (1+ end)))
- (concat result (substring argument start))))))
+ (if (equal argument "")
+ "''"
+ ;; Quote everything except POSIX filename characters.
+ ;; This should be safe enough even for really weird shells.
+ (let ((result "") (start 0) end)
+ (while (string-match "[^-0-9a-zA-Z_./]" argument start)
+ (setq end (match-beginning 0)
+ result (concat result (substring argument start end)
+ "\\" (substring argument end (1+ end)))
+ start (1+ end)))
+ (concat result (substring argument start)))))))
(defun make-syntax-table (&optional oldtable)
"Return a new syntax table.
-It inherits all letters and control characters from the standard
-syntax table; other characters are copied from the standard syntax table."
+If OLDTABLE is non-nil, copy OLDTABLE.
+Otherwise, create a syntax table which inherits
+all letters and control characters from the standard syntax table;
+other characters are copied from the standard syntax table."
(if oldtable
(copy-syntax-table oldtable)
(let ((table (copy-syntax-table))
(and (consp object)
(eq (car object) 'frame-configuration)))
+(defun functionp (object)
+ "Non-nil of OBJECT is a type of object that can be called as a function."
+ (or (subrp object) (compiled-function-p object)
+ (eq (car-safe object) 'lambda)
+ (and (symbolp object) (fboundp object))))
+
;; now in fns.c
;(defun nth (n list)
; "Returns the Nth element of LIST.