diff options
| author | Stefan Monnier | 2000-11-23 22:57:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-11-23 22:57:46 +0000 |
| commit | e6e71807add34fcb8d466cea18b15d5a9e4be88b (patch) | |
| tree | 0e34d08856901e397926f118f8d3c7c980446ae4 | |
| parent | 79372165fe5a1ba70dd74f0333141ce40d7829af (diff) | |
| download | emacs-e6e71807add34fcb8d466cea18b15d5a9e4be88b.tar.gz emacs-e6e71807add34fcb8d466cea18b15d5a9e4be88b.zip | |
Undoing the changes erroneously committed just before.
| -rw-r--r-- | lisp/subr.el | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 6e43d28a8c6..99d06e43844 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -227,15 +227,6 @@ but optional second arg NODIGITS non-nil treats them like other chars." | |||
| 227 | (define-key map (char-to-string loop) 'digit-argument) | 227 | (define-key map (char-to-string loop) 'digit-argument) |
| 228 | (setq loop (1+ loop)))))) | 228 | (setq loop (1+ loop)))))) |
| 229 | 229 | ||
| 230 | (when (and (not (fboundp 'set-keymap-parents)) | ||
| 231 | (fboundp 'make-composed-keymap)) | ||
| 232 | (defun set-keymap-parents (map parents) | ||
| 233 | "Set MAP to inherit from PARENTS. | ||
| 234 | PARENTS can be either nil or a keymap or a list of keymaps." | ||
| 235 | (set-keymap-parent map | ||
| 236 | (if (or (null parents) (keymapp parents)) parents | ||
| 237 | (make-composed-keymap parents))))) | ||
| 238 | |||
| 239 | ;Moved to keymap.c | 230 | ;Moved to keymap.c |
| 240 | ;(defun copy-keymap (keymap) | 231 | ;(defun copy-keymap (keymap) |
| 241 | ; "Return a copy of KEYMAP" | 232 | ; "Return a copy of KEYMAP" |
| @@ -706,7 +697,6 @@ Do not use `make-local-variable' to make a hook variable buffer-local." | |||
| 706 | (make-local-variable hook) | 697 | (make-local-variable hook) |
| 707 | (set hook (list t))) | 698 | (set hook (list t))) |
| 708 | hook) | 699 | hook) |
| 709 | (make-obsolete 'make-local-hook "Not necessary any more." "21.1") | ||
| 710 | 700 | ||
| 711 | (defun add-hook (hook function &optional append local) | 701 | (defun add-hook (hook function &optional append local) |
| 712 | "Add to the value of HOOK the function FUNCTION. | 702 | "Add to the value of HOOK the function FUNCTION. |
| @@ -1255,9 +1245,13 @@ Modifies the match data; use `save-match-data' if necessary." | |||
| 1255 | (defun subst-char-in-string (fromchar tochar string &optional inplace) | 1245 | (defun subst-char-in-string (fromchar tochar string &optional inplace) |
| 1256 | "Replace FROMCHAR with TOCHAR in STRING each time it occurs. | 1246 | "Replace FROMCHAR with TOCHAR in STRING each time it occurs. |
| 1257 | Unless optional argument INPLACE is non-nil, return a new string." | 1247 | Unless optional argument INPLACE is non-nil, return a new string." |
| 1258 | (if inplace (error "bouh!")) | 1248 | (let ((i (length string)) |
| 1259 | (mapconcat (lambda (c) (char-to-string (if (equal c fromchar) tochar c))) | 1249 | (newstr (if inplace string (copy-sequence string)))) |
| 1260 | string "")) | 1250 | (while (> i 0) |
| 1251 | (setq i (1- i)) | ||
| 1252 | (if (eq (aref newstr i) fromchar) | ||
| 1253 | (aset newstr i tochar))) | ||
| 1254 | newstr)) | ||
| 1261 | 1255 | ||
| 1262 | (defun replace-regexp-in-string (regexp rep string &optional | 1256 | (defun replace-regexp-in-string (regexp rep string &optional |
| 1263 | fixedcase literal subexp start) | 1257 | fixedcase literal subexp start) |