aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-04-19 00:06:54 +0000
committerRichard M. Stallman2002-04-19 00:06:54 +0000
commit2493767eaa105464c5c1a4a054ac5374fbbf82aa (patch)
treee8e0ca872ce911d84925772f92938f41cb74758e
parentcfb4f123942572dd8507cd1cb686b014be8738e4 (diff)
downloademacs-2493767eaa105464c5c1a4a054ac5374fbbf82aa.tar.gz
emacs-2493767eaa105464c5c1a4a054ac5374fbbf82aa.zip
(insert-for-yank): New function.
-rw-r--r--lisp/subr.el27
1 files changed, 25 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 16359fa87bb..c4e4d3a73ae 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1023,6 +1023,8 @@ Optional DEFAULT is a default password to use instead of empty input."
1023 (message nil) 1023 (message nil)
1024 (or pass default "")))) 1024 (or pass default ""))))
1025 1025
1026;;; Atomic change groups.
1027
1026(defmacro atomic-change-group (&rest body) 1028(defmacro atomic-change-group (&rest body)
1027 "Perform BODY as an atomic change group. 1029 "Perform BODY as an atomic change group.
1028This means that if BODY exits abnormally, 1030This means that if BODY exits abnormally,
@@ -1269,6 +1271,25 @@ for the sake of consistency."
1269 1271
1270(defalias 'user-original-login-name 'user-login-name) 1272(defalias 'user-original-login-name 'user-login-name)
1271 1273
1274(defvar yank-excluded-properties)
1275
1276(defun insert-for-yank (&rest strings)
1277 "Insert STRINGS at point, stripping some text properties.
1278Strip text properties from the inserted text
1279according to `yank-excluded-properties'.
1280Otherwise just like (insert STRINGS...)."
1281 (let ((opoint (point)))
1282
1283 (apply 'insert strings)
1284
1285 (let ((inhibit-read-only t))
1286 (if (eq yank-excluded-properties t)
1287 (set-text-properties opoint (point) nil)
1288 (remove-list-of-text-properties opoint (point)
1289 yank-excluded-properties)))))
1290
1291;; Synchronous shell commands.
1292
1272(defun start-process-shell-command (name buffer &rest args) 1293(defun start-process-shell-command (name buffer &rest args)
1273 "Start a program in a subprocess. Return the process object for it. 1294 "Start a program in a subprocess. Return the process object for it.
1274Args are NAME BUFFER COMMAND &rest COMMAND-ARGS. 1295Args are NAME BUFFER COMMAND &rest COMMAND-ARGS.
@@ -1473,6 +1494,8 @@ Value is what BODY returns."
1473 (set-buffer ,old-buffer) 1494 (set-buffer ,old-buffer)
1474 (set-syntax-table ,old-table)))))) 1495 (set-syntax-table ,old-table))))))
1475 1496
1497;;; Matching and substitution
1498
1476(defvar save-match-data-internal) 1499(defvar save-match-data-internal)
1477 1500
1478;; We use save-match-data-internal as the local variable because 1501;; We use save-match-data-internal as the local variable because
@@ -1875,7 +1898,7 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label."
1875 (nconc found (list (cons toggle keymap)) rest)) 1898 (nconc found (list (cons toggle keymap)) rest))
1876 (setq minor-mode-map-alist (cons (cons toggle keymap) 1899 (setq minor-mode-map-alist (cons (cons toggle keymap)
1877 minor-mode-map-alist)))))))) 1900 minor-mode-map-alist))))))))
1878 1901
1879;; Clones ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1902;; Clones ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1880 1903
1881(defun text-clone-maintain (ol1 after beg end &optional len) 1904(defun text-clone-maintain (ol1 after beg end &optional len)
@@ -1970,7 +1993,7 @@ clone should be incorporated in the clone."
1970 ;;(overlay-put ol2 'face 'underline) 1993 ;;(overlay-put ol2 'face 'underline)
1971 (overlay-put ol2 'evaporate t) 1994 (overlay-put ol2 'evaporate t)
1972 (overlay-put ol2 'text-clones dups))) 1995 (overlay-put ol2 'text-clones dups)))
1973 1996
1974(defun play-sound (sound) 1997(defun play-sound (sound)
1975 "SOUND is a list of the form `(sound KEYWORD VALUE...)'. 1998 "SOUND is a list of the form `(sound KEYWORD VALUE...)'.
1976The following keywords are recognized: 1999The following keywords are recognized: