Mercurial > emacs
comparison lisp/subr.el @ 83548:c71725faff1a
Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned!
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-490
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-491
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-492
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-493
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-494
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-495
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-496
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-497
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-498
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-499
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-500
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-501
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-502
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-503
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-504
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-505
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-506
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-507
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-508
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-509
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-510
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-511
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-512
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-513
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-514
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-515
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-516
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-517
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-518
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-519
Update from CVS: etc/TUTORIAL.cn: Updated.
* emacs@sv.gnu.org/emacs--devo--0--patch-520
Merge from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-521
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-522
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-523
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-524
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-525
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-526
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-527
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-528
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-529
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-530
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-531
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-532
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-533
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-534
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-535
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-161
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-162
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-163
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-164
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-165
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-166
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-167
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-168
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-169
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-170
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-588
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 03 Dec 2006 15:03:30 +0000 |
parents | 034f67f59091 f4d1181a38c2 |
children | 17e0dd217877 |
comparison
equal
deleted
inserted
replaced
83547:0912b745fc75 | 83548:c71725faff1a |
---|---|
875 and `event-end' functions." | 875 and `event-end' functions." |
876 (nth 4 position)) | 876 (nth 4 position)) |
877 | 877 |
878 (defsubst posn-image (position) | 878 (defsubst posn-image (position) |
879 "Return the image object of POSITION. | 879 "Return the image object of POSITION. |
880 Value is an list (image ...), or nil if not an image. | 880 Value is a list (image ...), or nil if not an image. |
881 POSITION should be a list of the form returned by the `event-start' | 881 POSITION should be a list of the form returned by the `event-start' |
882 and `event-end' functions." | 882 and `event-end' functions." |
883 (nth 7 position)) | 883 (nth 7 position)) |
884 | 884 |
885 (defsubst posn-object (position) | 885 (defsubst posn-object (position) |
1106 ((eq compare-fn 'eq) | 1106 ((eq compare-fn 'eq) |
1107 (memq element (symbol-value list-var))) | 1107 (memq element (symbol-value list-var))) |
1108 ((eq compare-fn 'eql) | 1108 ((eq compare-fn 'eql) |
1109 (memql element (symbol-value list-var))) | 1109 (memql element (symbol-value list-var))) |
1110 (t | 1110 (t |
1111 (let (present) | 1111 (let ((lst (symbol-value list-var))) |
1112 (dolist (elt (symbol-value list-var)) | 1112 (while (and lst |
1113 (if (funcall compare-fn element elt) | 1113 (not (funcall compare-fn element (car lst)))) |
1114 (setq present t))) | 1114 (setq lst (cdr lst))) |
1115 present))) | 1115 lst))) |
1116 (symbol-value list-var) | 1116 (symbol-value list-var) |
1117 (set list-var | 1117 (set list-var |
1118 (if append | 1118 (if append |
1119 (append (symbol-value list-var) (list element)) | 1119 (append (symbol-value list-var) (list element)) |
1120 (cons element (symbol-value list-var)))))) | 1120 (cons element (symbol-value list-var)))))) |
1890 description list. EXIT-CHAR defaults to SPC. If the input is | 1890 description list. EXIT-CHAR defaults to SPC. If the input is |
1891 EXIT-CHAR it is swallowed; otherwise it is then available as | 1891 EXIT-CHAR it is swallowed; otherwise it is then available as |
1892 input (as a command if nothing else). | 1892 input (as a command if nothing else). |
1893 Display MESSAGE (optional fourth arg) in the echo area. | 1893 Display MESSAGE (optional fourth arg) in the echo area. |
1894 If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." | 1894 If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." |
1895 (or exit-char (setq exit-char ?\ )) | 1895 (or exit-char (setq exit-char ?\s)) |
1896 (let ((inhibit-read-only t) | 1896 (let ((inhibit-read-only t) |
1897 ;; Don't modify the undo list at all. | 1897 ;; Don't modify the undo list at all. |
1898 (buffer-undo-list t) | 1898 (buffer-undo-list t) |
1899 (modified (buffer-modified-p)) | 1899 (modified (buffer-modified-p)) |
1900 (name buffer-file-name) | 1900 (name buffer-file-name) |
1958 | 1958 |
1959 (defun remove-overlays (&optional beg end name val) | 1959 (defun remove-overlays (&optional beg end name val) |
1960 "Clear BEG and END of overlays whose property NAME has value VAL. | 1960 "Clear BEG and END of overlays whose property NAME has value VAL. |
1961 Overlays might be moved and/or split. | 1961 Overlays might be moved and/or split. |
1962 BEG and END default respectively to the beginning and end of buffer." | 1962 BEG and END default respectively to the beginning and end of buffer." |
1963 ;; This speeds up the loops over overlays. | |
1963 (unless beg (setq beg (point-min))) | 1964 (unless beg (setq beg (point-min))) |
1964 (unless end (setq end (point-max))) | 1965 (unless end (setq end (point-max))) |
1966 (overlay-recenter end) | |
1965 (if (< end beg) | 1967 (if (< end beg) |
1966 (setq beg (prog1 end (setq end beg)))) | 1968 (setq beg (prog1 end (setq end beg)))) |
1967 (save-excursion | 1969 (save-excursion |
1968 (dolist (o (overlays-in beg end)) | 1970 (dolist (o (overlays-in beg end)) |
1969 (when (eq (overlay-get o name) val) | 1971 (when (eq (overlay-get o name) val) |