diff options
| author | Karoly Lorentey | 2004-02-24 22:48:10 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-02-24 22:48:10 +0000 |
| commit | e39e96544557e39200234f3f855f6567f9ea6bff (patch) | |
| tree | bb2802ee28d62c72d61f46f88d089d268809a120 | |
| parent | 1cbfd764118c2fed03fc96fe6b9aad3555270c96 (diff) | |
| parent | 92f5fba2d661eb84fa67e0190cd617aa57f51f34 (diff) | |
| download | emacs-e39e96544557e39200234f3f855f6567f9ea6bff.tar.gz emacs-e39e96544557e39200234f3f855f6567f9ea6bff.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-108
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-109
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-110
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-111
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-112
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-94
| -rw-r--r-- | etc/NEWS | 10 | ||||
| -rw-r--r-- | lisp/ChangeLog | 67 | ||||
| -rw-r--r-- | lisp/abbrev.el | 15 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 21 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 6 | ||||
| -rw-r--r-- | lisp/ffap.el | 8 | ||||
| -rw-r--r-- | lisp/gdb-ui.el | 36 | ||||
| -rw-r--r-- | lisp/play/animate.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 17 | ||||
| -rw-r--r-- | lisp/saveplace.el | 63 | ||||
| -rw-r--r-- | lisp/startup.el | 98 | ||||
| -rw-r--r-- | lisp/textmodes/texinfo.el | 14 | ||||
| -rw-r--r-- | lisp/vcursor.el | 9 | ||||
| -rw-r--r-- | lispref/ChangeLog | 29 | ||||
| -rw-r--r-- | lispref/abbrevs.texi | 113 | ||||
| -rw-r--r-- | lispref/calendar.texi | 2 | ||||
| -rw-r--r-- | lispref/frames.texi | 1 | ||||
| -rw-r--r-- | lispref/syntax.texi | 70 | ||||
| -rw-r--r-- | lispref/text.texi | 200 | ||||
| -rw-r--r-- | lispref/tips.texi | 2 | ||||
| -rw-r--r-- | man/ChangeLog | 18 | ||||
| -rw-r--r-- | man/building.texi | 11 | ||||
| -rw-r--r-- | man/cmdargs.texi | 119 | ||||
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/abbrev.c | 3 | ||||
| -rw-r--r-- | src/emacs.c | 121 | ||||
| -rw-r--r-- | src/w32term.c | 46 |
27 files changed, 720 insertions, 414 deletions
| @@ -88,6 +88,15 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. | |||
| 88 | 88 | ||
| 89 | * Changes in Emacs 21.4 | 89 | * Changes in Emacs 21.4 |
| 90 | 90 | ||
| 91 | --- | ||
| 92 | ** The saveplace.el package now filters out unreadable files. | ||
| 93 | When you exit Emacs, the saved positions in visited files no longer | ||
| 94 | include files that aren't readable, e.g. files that don't exist. | ||
| 95 | Customize the new option `save-place-forget-unreadable-files' to nil | ||
| 96 | to get the old behavior. The new options `save-place-save-skipped' | ||
| 97 | and `save-place-skip-check-regexp' allow further fine-tuning of this | ||
| 98 | feature. | ||
| 99 | |||
| 91 | ** On window systems, lines which are exactly as wide as the window | 100 | ** On window systems, lines which are exactly as wide as the window |
| 92 | (not counting the final newline character) are no longer broken into | 101 | (not counting the final newline character) are no longer broken into |
| 93 | two lines on the display (with just the newline on the second line). | 102 | two lines on the display (with just the newline on the second line). |
| @@ -1871,6 +1880,7 @@ before saving buffers. This allows packages to perform various final | |||
| 1871 | tasks, for example; it can be used by the copyright package to make | 1880 | tasks, for example; it can be used by the copyright package to make |
| 1872 | sure saved files have the current year in any copyright headers. | 1881 | sure saved files have the current year in any copyright headers. |
| 1873 | 1882 | ||
| 1883 | +++ | ||
| 1874 | ** The function `insert-for-yank' now supports strings where the | 1884 | ** The function `insert-for-yank' now supports strings where the |
| 1875 | `yank-handler' property does not span the first character of the | 1885 | `yank-handler' property does not span the first character of the |
| 1876 | string. The old behavior is available if you call | 1886 | string. The old behavior is available if you call |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a1f7e0ec17..9bf1ae47cc1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,68 @@ | |||
| 1 | 2004-02-23 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * abbrev.el (write-abbrev-file): Make argument optional. Doc fix. | ||
| 4 | (abbrev-prefix-mark): Doc fix. | ||
| 5 | |||
| 6 | 2004-02-23 Nick Roberts <nick@nick.uklinux.net> | ||
| 7 | |||
| 8 | * gdb-ui.el (gud-watch): Load tooltip, if necessary. | ||
| 9 | (gdb-var-create-handler): Force speedbar-update-flag to be non-nil. | ||
| 10 | (gdb-var-delete): Make interactive (really). | ||
| 11 | (gdb-edit-value): Make non-interactive. | ||
| 12 | |||
| 13 | * progmodes/gud.el (gud-install-speedbar-variables): Bind | ||
| 14 | gdb-var-delete to "D". | ||
| 15 | (gud-speedbar-menu-items): Add gdb-var-delete and, indirectly, | ||
| 16 | gdb-edit-value. | ||
| 17 | (gud-speedbar-buttons): Remove gdb-var-delete from tag-line. | ||
| 18 | (gud-gdb-marker-filter): Add comment for annotations. | ||
| 19 | |||
| 20 | 2004-02-23 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 21 | |||
| 22 | * calendar/calendar.el (generate-calendar) | ||
| 23 | (calendar-read-date): Prevent display of BC calendars once more - | ||
| 24 | reverts 2003-10-01 change. | ||
| 25 | (generate-calendar-month): Doc fix. | ||
| 26 | |||
| 27 | 2004-02-03 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change) | ||
| 28 | |||
| 29 | * calendar/diary-lib.el (fancy-diary-display): Don't rely on | ||
| 30 | return value of increment-calendar-month. | ||
| 31 | |||
| 32 | 2004-02-21 Stephen Compall <s11@member.fsf.org> | ||
| 33 | |||
| 34 | * saveplace.el (save-place-forget-unreadable-files) | ||
| 35 | (save-place-save-skipped, save-place-skip-check-regexp): New | ||
| 36 | defcustoms. | ||
| 37 | (save-place-forget-unreadable-files): New function. | ||
| 38 | (save-place-alist-to-file): Use it to filter out files that are | ||
| 39 | no longer readable. | ||
| 40 | |||
| 41 | * textmodes/texinfo.el (texinfo-insert-@item): Look for the | ||
| 42 | current Texinfo environment, using the same method as in | ||
| 43 | `texinfo-insert-@end', and insert a space rather than a newline if | ||
| 44 | point in a @table environment. | ||
| 45 | |||
| 46 | 2004-02-21 Juri Linkov <juri@jurta.org> | ||
| 47 | |||
| 48 | * ffap.el (ffap-file-at-point): Try parent directories. | ||
| 49 | |||
| 50 | 2004-02-21 Klaus Zeitler <kzeitler@lucent.com> | ||
| 51 | |||
| 52 | * vcursor.el (vcursor-modifiers): New defcustom. | ||
| 53 | (vcursor-cs-binding): Use vcursor-modifiers instead of a | ||
| 54 | hard-coded list. | ||
| 55 | |||
| 56 | 2004-02-21 Masatake YAMATO <jet@gyve.org> | ||
| 57 | |||
| 58 | * play/animate.el (animate-birthday-present): Accept names other | ||
| 59 | than `Sarah', too. | ||
| 60 | |||
| 61 | 2004-02-21 Juri Linkov <juri@jurta.org> | ||
| 62 | |||
| 63 | * startup.el: Remove table of command line arguments from the | ||
| 64 | Commentary section. | ||
| 65 | |||
| 1 | 2004-02-20 John Wiegley <johnw@newartisans.com> | 66 | 2004-02-20 John Wiegley <johnw@newartisans.com> |
| 2 | 67 | ||
| 3 | * eshell/em-pred.el (eshell-modifier-alist): Changed the "eval | 68 | * eshell/em-pred.el (eshell-modifier-alist): Changed the "eval |
| @@ -164,7 +229,7 @@ | |||
| 164 | 229 | ||
| 165 | * newcomment.el (uncomment-region): Allow eob as comment end. | 230 | * newcomment.el (uncomment-region): Allow eob as comment end. |
| 166 | 231 | ||
| 167 | 2004-02-16 Jari Aalto <jari.aalto@poboxes.com> (tiny change) | 232 | 2004-02-16 Jari Aalto <jari.aalto@poboxes.com> |
| 168 | 233 | ||
| 169 | * filecache.el: All message and error commands now use prefix | 234 | * filecache.el: All message and error commands now use prefix |
| 170 | "Filecache:" to make it easy to read *Messages* buffer. | 235 | "Filecache:" to make it easy to read *Messages* buffer. |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 13c1f71099a..1e3eea0e359 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -201,10 +201,13 @@ Does not display any message." | |||
| 201 | ;(interactive "fRead abbrev file: ") | 201 | ;(interactive "fRead abbrev file: ") |
| 202 | (read-abbrev-file file t)) | 202 | (read-abbrev-file file t)) |
| 203 | 203 | ||
| 204 | (defun write-abbrev-file (file) | 204 | (defun write-abbrev-file (&optional file) |
| 205 | "Write all abbrev definitions to a file of Lisp code. | 205 | "Write all user-level abbrev definitions to a file of Lisp code. |
| 206 | This does not include system abbrevs; it includes only the abbrev tables | ||
| 207 | listed in listed in `abbrev-table-name-list'. | ||
| 206 | The file written can be loaded in another session to define the same abbrevs. | 208 | The file written can be loaded in another session to define the same abbrevs. |
| 207 | The argument FILE is the file name to write." | 209 | The argument FILE is the file name to write. If omitted or nil, the file |
| 210 | specified in `abbrev-file-name' is used." | ||
| 208 | (interactive | 211 | (interactive |
| 209 | (list | 212 | (list |
| 210 | (read-file-name "Write abbrev file: " | 213 | (read-file-name "Write abbrev file: " |
| @@ -307,7 +310,11 @@ Expands the abbreviation after defining it." | |||
| 307 | "Mark current point as the beginning of an abbrev. | 310 | "Mark current point as the beginning of an abbrev. |
| 308 | Abbrev to be expanded starts here rather than at beginning of word. | 311 | Abbrev to be expanded starts here rather than at beginning of word. |
| 309 | This way, you can expand an abbrev with a prefix: insert the prefix, | 312 | This way, you can expand an abbrev with a prefix: insert the prefix, |
| 310 | use this command, then insert the abbrev." | 313 | use this command, then insert the abbrev. This command inserts a |
| 314 | temporary hyphen after the prefix \(until the intended abbrev | ||
| 315 | expansion occurs). | ||
| 316 | If the prefix is itself an abbrev, this command expands it, unless | ||
| 317 | ARG is non-nil. Interactively, ARG is the prefix argument." | ||
| 311 | (interactive "P") | 318 | (interactive "P") |
| 312 | (or arg (expand-abbrev)) | 319 | (or arg (expand-abbrev)) |
| 313 | (setq abbrev-start-location (point-marker) | 320 | (setq abbrev-start-location (point-marker) |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index a0644f54aa2..c1277ca5132 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1924,12 +1924,15 @@ Or, for optional MON, YR." | |||
| 1924 | (run-hooks 'today-invisible-calendar-hook))))) | 1924 | (run-hooks 'today-invisible-calendar-hook))))) |
| 1925 | 1925 | ||
| 1926 | (defun generate-calendar (month year) | 1926 | (defun generate-calendar (month year) |
| 1927 | "Generate a three-month Gregorian calendar centered around MONTH, YEAR. | 1927 | "Generate a three-month Gregorian calendar centered around MONTH, YEAR." |
| 1928 | A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. | 1928 | ;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. |
| 1929 | Note that while calendars can be displayed for years BC, some functions (eg | 1929 | ;;; Note that while calendars for years BC could be displayed as it |
| 1930 | motion, complex holiday functions) will not work correctly for such dates." | 1930 | ;;; stands, almost all other calendar functions (eg holidays) would |
| 1931 | (setq displayed-month month) | 1931 | ;;; at best have unpredictable results for such dates. |
| 1932 | (setq displayed-year year) | 1932 | (if (< (+ month (* 12 (1- year))) 2) |
| 1933 | (error "Months before February, 1 AD are not available")) | ||
| 1934 | (setq displayed-month month | ||
| 1935 | displayed-year year) | ||
| 1933 | (erase-buffer) | 1936 | (erase-buffer) |
| 1934 | (increment-calendar-month month year -1) | 1937 | (increment-calendar-month month year -1) |
| 1935 | (calendar-for-loop i from 0 to 2 do | 1938 | (calendar-for-loop i from 0 to 2 do |
| @@ -1941,7 +1944,7 @@ motion, complex holiday functions) will not work correctly for such dates." | |||
| 1941 | The calendar is inserted at the top of the buffer in which point is currently | 1944 | The calendar is inserted at the top of the buffer in which point is currently |
| 1942 | located, but indented INDENT spaces. The indentation is done from the first | 1945 | located, but indented INDENT spaces. The indentation is done from the first |
| 1943 | character on the line and does not disturb the first INDENT characters on the | 1946 | character on the line and does not disturb the first INDENT characters on the |
| 1944 | line. A negative YEAR is interpreted as BC; -1 being 1 BC, and so on." | 1947 | line." |
| 1945 | (let* ((blank-days;; at start of month | 1948 | (let* ((blank-days;; at start of month |
| 1946 | (mod | 1949 | (mod |
| 1947 | (- (calendar-day-of-week (list month 1 year)) | 1950 | (- (calendar-day-of-week (list month 1 year)) |
| @@ -2538,8 +2541,8 @@ If optional NODAY is t, does not ask for day, but just returns | |||
| 2538 | \(month nil year); if NODAY is any other non-nil value the value returned is | 2541 | \(month nil year); if NODAY is any other non-nil value the value returned is |
| 2539 | \(month year)" | 2542 | \(month year)" |
| 2540 | (let* ((year (calendar-read | 2543 | (let* ((year (calendar-read |
| 2541 | "Year: " | 2544 | "Year (>0): " |
| 2542 | (lambda (x) (not (zerop x))) | 2545 | (lambda (x) (> x 0)) |
| 2543 | (int-to-string (extract-calendar-year | 2546 | (int-to-string (extract-calendar-year |
| 2544 | (calendar-current-date))))) | 2547 | (calendar-current-date))))) |
| 2545 | (month-array calendar-month-name-array) | 2548 | (month-array calendar-month-name-array) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index bb4ea20f804..f4150ee0825 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -587,8 +587,10 @@ This function is provided for optional use as the `diary-display-hook'." | |||
| 587 | (extract-calendar-month date)) | 587 | (extract-calendar-month date)) |
| 588 | (setq holiday-list-last-year | 588 | (setq holiday-list-last-year |
| 589 | (extract-calendar-year date)) | 589 | (extract-calendar-year date)) |
| 590 | (increment-calendar-month | 590 | (progn |
| 591 | holiday-list-last-month holiday-list-last-year 1) | 591 | (increment-calendar-month |
| 592 | holiday-list-last-month holiday-list-last-year 1) | ||
| 593 | t) | ||
| 592 | (setq holiday-list | 594 | (setq holiday-list |
| 593 | (let ((displayed-month holiday-list-last-month) | 595 | (let ((displayed-month holiday-list-last-month) |
| 594 | (displayed-year holiday-list-last-year)) | 596 | (displayed-year holiday-list-last-year)) |
diff --git a/lisp/ffap.el b/lisp/ffap.el index 668700a5c1f..27abd52f563 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -1185,6 +1185,14 @@ which may actually result in an url rather than a filename." | |||
| 1185 | remote-dir (substring name (match-end 1))))) | 1185 | remote-dir (substring name (match-end 1))))) |
| 1186 | (ffap-file-exists-string | 1186 | (ffap-file-exists-string |
| 1187 | (ffap-replace-file-component remote-dir name)))))) | 1187 | (ffap-replace-file-component remote-dir name)))))) |
| 1188 | ;; Try all parent directories by deleting the trailing directory | ||
| 1189 | ;; name until existing directory is found or name stops changing | ||
| 1190 | ((let ((dir name)) | ||
| 1191 | (while (and dir | ||
| 1192 | (not (ffap-file-exists-string dir)) | ||
| 1193 | (not (equal dir (setq dir (file-name-directory | ||
| 1194 | (directory-file-name dir))))))) | ||
| 1195 | (ffap-file-exists-string dir))) | ||
| 1188 | ) | 1196 | ) |
| 1189 | (set-match-data data)))) | 1197 | (set-match-data data)))) |
| 1190 | 1198 | ||
diff --git a/lisp/gdb-ui.el b/lisp/gdb-ui.el index 60ac57dd10f..32cce04c239 100644 --- a/lisp/gdb-ui.el +++ b/lisp/gdb-ui.el | |||
| @@ -188,6 +188,7 @@ speedbar." | |||
| 188 | (defun gud-watch () | 188 | (defun gud-watch () |
| 189 | "Watch expression at point." | 189 | "Watch expression at point." |
| 190 | (interactive) | 190 | (interactive) |
| 191 | (require 'tooltip) | ||
| 191 | (let ((expr (tooltip-identifier-from-point (point)))) | 192 | (let ((expr (tooltip-identifier-from-point (point)))) |
| 192 | (if (and (string-equal gdb-current-language "c") | 193 | (if (and (string-equal gdb-current-language "c") |
| 193 | gdb-use-colon-colon-notation) | 194 | gdb-use-colon-colon-notation) |
| @@ -214,6 +215,7 @@ speedbar." | |||
| 214 | (match-string 3) | 215 | (match-string 3) |
| 215 | nil nil))) | 216 | nil nil))) |
| 216 | (push var gdb-var-list) | 217 | (push var gdb-var-list) |
| 218 | (setq speedbar-update-flag t) | ||
| 217 | (speedbar 1) | 219 | (speedbar 1) |
| 218 | (if (equal (nth 2 var) "0") | 220 | (if (equal (nth 2 var) "0") |
| 219 | (gdb-enqueue-input | 221 | (gdb-enqueue-input |
| @@ -304,26 +306,28 @@ speedbar." | |||
| 304 | (gdb-set-pending-triggers | 306 | (gdb-set-pending-triggers |
| 305 | (delq 'gdb-var-update (gdb-get-pending-triggers)))) | 307 | (delq 'gdb-var-update (gdb-get-pending-triggers)))) |
| 306 | 308 | ||
| 307 | (defun gdb-var-delete (text token indent) | 309 | (defun gdb-var-delete () |
| 308 | "Delete watched expression." | 310 | "Delete watched expression from the speedbar." |
| 309 | (interactive) | 311 | (interactive) |
| 310 | (when (eq indent 0) | 312 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 311 | (string-match "\\(\\S-+\\)" text) | 313 | (let ((text (speedbar-line-text))) |
| 312 | (let* ((expr (match-string 1 text)) | 314 | (string-match "\\(\\S-+\\)" text) |
| 313 | (var (assoc expr gdb-var-list)) | 315 | (let* ((expr (match-string 1 text)) |
| 314 | (varnum (cadr var))) | 316 | (var (assoc expr gdb-var-list)) |
| 315 | (gdb-enqueue-input | 317 | (varnum (cadr var))) |
| 316 | (list (concat "server interpreter mi \"-var-delete " varnum "\"\n") | 318 | (unless (string-match "\\." varnum) |
| 317 | 'ignore)) | 319 | (gdb-enqueue-input |
| 318 | (setq gdb-var-list (delq var gdb-var-list)) | 320 | (list (concat "server interpreter mi \"-var-delete " |
| 319 | (dolist (varchild gdb-var-list) | 321 | varnum "\"\n") |
| 320 | (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild)) | 322 | 'ignore)) |
| 321 | (setq gdb-var-list (delq varchild gdb-var-list))))) | 323 | (setq gdb-var-list (delq var gdb-var-list)) |
| 322 | (setq gdb-var-changed t))) | 324 | (dolist (varchild gdb-var-list) |
| 325 | (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild)) | ||
| 326 | (setq gdb-var-list (delq varchild gdb-var-list)))) | ||
| 327 | (setq gdb-var-changed t)))))) | ||
| 323 | 328 | ||
| 324 | (defun gdb-edit-value (text token indent) | 329 | (defun gdb-edit-value (text token indent) |
| 325 | "Assign a value to a variable displayed in the speedbar" | 330 | "Assign a value to a variable displayed in the speedbar" |
| 326 | (interactive) | ||
| 327 | (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) | 331 | (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) |
| 328 | (varnum (cadr var)) (value)) | 332 | (varnum (cadr var)) (value)) |
| 329 | (setq value (read-string "New value: ")) | 333 | (setq value (read-string "New value: ")) |
diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 40c4696dc08..23e7939f47a 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el | |||
| @@ -151,11 +151,13 @@ Strings will be separated from each other by SPACE lines." | |||
| 151 | (setq list-of-strings (cdr list-of-strings))))) | 151 | (setq list-of-strings (cdr list-of-strings))))) |
| 152 | 152 | ||
| 153 | ;;;###autoload | 153 | ;;;###autoload |
| 154 | (defun animate-birthday-present () | 154 | (defun animate-birthday-present (&optional name) |
| 155 | "Display Sarah's birthday present in a new buffer." | 155 | "Display one's birthday present in a new buffer. |
| 156 | (interactive) | 156 | You can specify the one's name by NAME; the default value is \"Sarah\"." |
| 157 | (interactive (list (read-string "Name (default \"Sarah\"): " | ||
| 158 | nil nil "Sarah"))) | ||
| 157 | ;; Make a suitable buffer to display the birthday present in. | 159 | ;; Make a suitable buffer to display the birthday present in. |
| 158 | (switch-to-buffer (get-buffer-create "*Sarah*")) | 160 | (switch-to-buffer (get-buffer-create (format "*%s*" name))) |
| 159 | (erase-buffer) | 161 | (erase-buffer) |
| 160 | ;; Display the empty buffer. | 162 | ;; Display the empty buffer. |
| 161 | (sit-for 0) | 163 | (sit-for 0) |
| @@ -164,7 +166,7 @@ Strings will be separated from each other by SPACE lines." | |||
| 164 | (setq indent-tabs-mode nil) | 166 | (setq indent-tabs-mode nil) |
| 165 | 167 | ||
| 166 | (animate-string "Happy Birthday," 6) | 168 | (animate-string "Happy Birthday," 6) |
| 167 | (animate-string "Sarah" 7) | 169 | (animate-string (format "%s" name) 7) |
| 168 | 170 | ||
| 169 | (sit-for 1) | 171 | (sit-for 1) |
| 170 | 172 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index de68d012470..ff04c05edff 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -305,11 +305,18 @@ t means that there is no stack, and we are in display-file mode.") | |||
| 305 | 305 | ||
| 306 | (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) | 306 | (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) |
| 307 | (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) | 307 | (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) |
| 308 | (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line))) | 308 | (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) |
| 309 | (define-key gud-speedbar-key-map "D" 'gdb-var-delete))) | ||
| 310 | |||
| 309 | 311 | ||
| 310 | (defvar gud-speedbar-menu-items | 312 | (defvar gud-speedbar-menu-items |
| 311 | ;; Note to self. Add expand, and turn off items when not available. | 313 | ;; Note to self. Add expand, and turn off items when not available. |
| 312 | '(["Jump to stack frame" speedbar-edit-line t]) | 314 | '(["Jump to stack frame" speedbar-edit-line |
| 315 | (with-current-buffer gud-comint-buffer (not (eq gud-minor-mode 'gdba)))] | ||
| 316 | ["Edit value" speedbar-edit-line | ||
| 317 | (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))] | ||
| 318 | ["Delete expression" gdb-var-delete | ||
| 319 | (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))]) | ||
| 313 | "Additional menu items to add to the speedbar frame.") | 320 | "Additional menu items to add to the speedbar frame.") |
| 314 | 321 | ||
| 315 | ;; Make sure our special speedbar mode is loaded | 322 | ;; Make sure our special speedbar mode is loaded |
| @@ -353,8 +360,7 @@ off the specialized speedbar mode." | |||
| 353 | (speedbar-make-tag-line 'bracket char | 360 | (speedbar-make-tag-line 'bracket char |
| 354 | 'gdb-speedbar-expand-node varnum | 361 | 'gdb-speedbar-expand-node varnum |
| 355 | (concat (car var) "\t" (nth 3 var)) | 362 | (concat (car var) "\t" (nth 3 var)) |
| 356 | 'gdb-var-delete | 363 | nil nil nil depth))) |
| 357 | nil nil depth))) | ||
| 358 | (setq var-list (cdr var-list)))) | 364 | (setq var-list (cdr var-list)))) |
| 359 | (setq gdb-var-changed nil))) | 365 | (setq gdb-var-changed nil))) |
| 360 | (t (if (and (save-excursion | 366 | (t (if (and (save-excursion |
| @@ -450,10 +456,13 @@ off the specialized speedbar mode." | |||
| 450 | ;; Set the accumulator to the remaining text. | 456 | ;; Set the accumulator to the remaining text. |
| 451 | gud-marker-acc (substring gud-marker-acc (match-end 0)))) | 457 | gud-marker-acc (substring gud-marker-acc (match-end 0)))) |
| 452 | 458 | ||
| 459 | ;; Check for annotations and change gud-minor-mode to 'gdba if | ||
| 460 | ;; they are found. | ||
| 453 | (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) | 461 | (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) |
| 454 | (when (string-equal (match-string 1 gud-marker-acc) "prompt") | 462 | (when (string-equal (match-string 1 gud-marker-acc) "prompt") |
| 455 | (require 'gdb-ui) | 463 | (require 'gdb-ui) |
| 456 | (gdb-prompt nil)) | 464 | (gdb-prompt nil)) |
| 465 | |||
| 457 | (setq | 466 | (setq |
| 458 | ;; Append any text before the marker to the output we're going | 467 | ;; Append any text before the marker to the output we're going |
| 459 | ;; to return - we don't include the marker in this text. | 468 | ;; to return - we don't include the marker in this text. |
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index d8706de70e8..3e40f118a41 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -94,6 +94,40 @@ value of `version-control'." | |||
| 94 | (const :tag "No Limit" nil)) | 94 | (const :tag "No Limit" nil)) |
| 95 | :group 'save-place) | 95 | :group 'save-place) |
| 96 | 96 | ||
| 97 | (defcustom save-place-forget-unreadable-files t | ||
| 98 | "Non-nil means forget place in unreadable files. | ||
| 99 | |||
| 100 | The filenames in `save-place-alist' that do not match | ||
| 101 | `save-place-skip-check-regexp' are filtered through | ||
| 102 | `file-readable-p'. if nil, their alist entries are removed. | ||
| 103 | |||
| 104 | You may do this anytime by calling the complementary function, | ||
| 105 | `save-place-forget-unreadable-files'. When this option is turned on, | ||
| 106 | this happens automatically before saving `save-place-alist' to | ||
| 107 | `save-place-file'." | ||
| 108 | :type 'boolean :group 'save-place) | ||
| 109 | |||
| 110 | (defcustom save-place-save-skipped t | ||
| 111 | "If non-nil, remember files matching `save-place-skip-check-regexp'. | ||
| 112 | |||
| 113 | When filtering `save-place-alist' for unreadable files, some will not | ||
| 114 | be checked, based on said regexp, and instead saved or forgotten based | ||
| 115 | on this flag." | ||
| 116 | :type 'boolean :group 'save-place) | ||
| 117 | |||
| 118 | (defcustom save-place-skip-check-regexp | ||
| 119 | ;; thanks to ange-ftp-name-format | ||
| 120 | "\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)" | ||
| 121 | "Regexp whose file names shall not be checked for readability. | ||
| 122 | |||
| 123 | When forgetting unreadable files, file names matching this regular | ||
| 124 | expression shall not be checked for readability, but instead be | ||
| 125 | subject to `save-place-save-skipped'. | ||
| 126 | |||
| 127 | Files for which such a check may be inconvenient include those on | ||
| 128 | removable and network volumes." | ||
| 129 | :type 'regexp :group 'save-place) | ||
| 130 | |||
| 97 | (defun toggle-save-place (&optional parg) | 131 | (defun toggle-save-place (&optional parg) |
| 98 | "Toggle whether to save your place in this file between sessions. | 132 | "Toggle whether to save your place in this file between sessions. |
| 99 | If this mode is enabled, point is recorded when you kill the buffer | 133 | If this mode is enabled, point is recorded when you kill the buffer |
| @@ -138,12 +172,41 @@ To save places automatically in all files, put this in your `.emacs' file: | |||
| 138 | (cons (cons buffer-file-name position) | 172 | (cons (cons buffer-file-name position) |
| 139 | save-place-alist))))))) | 173 | save-place-alist))))))) |
| 140 | 174 | ||
| 175 | (defun save-place-forget-unreadable-files () | ||
| 176 | "Remove unreadable files from `save-place-alist'. | ||
| 177 | For each entry in the alist, if `file-readable-p' returns nil for the | ||
| 178 | filename, remove the entry. Save the new alist \(as the first pair | ||
| 179 | may have changed\) back to `save-place-alist'." | ||
| 180 | (interactive) | ||
| 181 | ;; the following was adapted from an in-place filtering function, | ||
| 182 | ;; `filter-mod', used in the original. | ||
| 183 | (unless (null save-place-alist) ;says it better than `when' | ||
| 184 | ;; first, check all except first | ||
| 185 | (let ((fmprev save-place-alist) (fmcur (cdr save-place-alist))) | ||
| 186 | (while fmcur ;not null | ||
| 187 | ;; a value is only saved when it becomes FMPREV. | ||
| 188 | (if (if (string-match save-place-skip-check-regexp (caar fmcur)) | ||
| 189 | save-place-save-skipped | ||
| 190 | (file-readable-p (caar fmcur))) | ||
| 191 | (setq fmprev fmcur) | ||
| 192 | (setcdr fmprev (cdr fmcur))) | ||
| 193 | (setq fmcur (cdr fmcur)))) | ||
| 194 | ;; test first pair, keep it if OK, otherwise 2nd element, which | ||
| 195 | ;; may be '() | ||
| 196 | (unless (if (string-match save-place-skip-check-regexp | ||
| 197 | (caar save-place-alist)) | ||
| 198 | save-place-save-skipped | ||
| 199 | (file-readable-p (caar save-place-alist))) | ||
| 200 | (setq save-place-alist (cdr save-place-alist))))) | ||
| 201 | |||
| 141 | (defun save-place-alist-to-file () | 202 | (defun save-place-alist-to-file () |
| 142 | (let ((file (expand-file-name save-place-file))) | 203 | (let ((file (expand-file-name save-place-file))) |
| 143 | (save-excursion | 204 | (save-excursion |
| 144 | (message "Saving places to %s..." file) | 205 | (message "Saving places to %s..." file) |
| 145 | (set-buffer (get-buffer-create " *Saved Places*")) | 206 | (set-buffer (get-buffer-create " *Saved Places*")) |
| 146 | (delete-region (point-min) (point-max)) | 207 | (delete-region (point-min) (point-max)) |
| 208 | (when save-place-forget-unreadable-files | ||
| 209 | (save-place-forget-unreadable-files)) | ||
| 147 | (print save-place-alist (current-buffer)) | 210 | (print save-place-alist (current-buffer)) |
| 148 | (let ((version-control | 211 | (let ((version-control |
| 149 | (cond | 212 | (cond |
diff --git a/lisp/startup.el b/lisp/startup.el index 3d03d3b68c7..e79ea4407b1 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -25,101 +25,9 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | 27 | ||
| 28 | ;; This file parses the command line and gets Emacs running. Options on | 28 | ;; This file parses the command line and gets Emacs running. Options |
| 29 | ;; the command line are handled in precedence order. The order is the | 29 | ;; on the command line are handled in precedence order. For priorities |
| 30 | ;; one in the list below; first described means first handled. Options | 30 | ;; see the structure standard_args in the emacs.c file. |
| 31 | ;; within each category (delimited by a bar) are handled in the order | ||
| 32 | ;; encountered on the command line. | ||
| 33 | |||
| 34 | ;; ------------------------- | ||
| 35 | ;; -version Print Emacs version to stderr, then exit | ||
| 36 | ;; --version successfully right away. | ||
| 37 | ;; This option is handled by emacs.c | ||
| 38 | ;; ------------------------- | ||
| 39 | ;; -help Print a short usage description and exit | ||
| 40 | ;; --help successfully right away. | ||
| 41 | ;; This option is handled by emacs.c | ||
| 42 | ;; ------------------------- | ||
| 43 | ;; -nl Do not use shared memory (for systems that | ||
| 44 | ;; -no-shared-memory support this) for the dumped Emacs data. | ||
| 45 | ;; This option is handled by emacs.c | ||
| 46 | ;; | ||
| 47 | ;; -map For VMS. | ||
| 48 | ;; --map-data This option is handled by emacs.c | ||
| 49 | ;; ------------------------- | ||
| 50 | ;; -t FILE Use FILE as the name of the terminal. | ||
| 51 | ;; --terminal FILE Using this implies "-nw" also. | ||
| 52 | ;; This option is handled by emacs.c | ||
| 53 | ;; ------------------------- | ||
| 54 | ;; -d DISPNAME Use DISPNAME as the name of the X | ||
| 55 | ;; -display DISPNAME display for the initial frame. | ||
| 56 | ;; --display DISPNAME This option is handled by emacs.c | ||
| 57 | ;; ------------------------- | ||
| 58 | ;; -nw Do not use a windows system (but use the | ||
| 59 | ;; --no-window-system terminal instead.) | ||
| 60 | ;; This option is handled by emacs.c | ||
| 61 | ;; ------------------------- | ||
| 62 | ;; -batch Execute noninteractively (messages go to stdout, | ||
| 63 | ;; --batch variable noninteractive set to t) | ||
| 64 | ;; This option is handled by emacs.c | ||
| 65 | ;; ------------------------- | ||
| 66 | ;; -q Do not load user's init file and do not load | ||
| 67 | ;; -no-init-file "default.el". Regardless of this switch, | ||
| 68 | ;; --no-init-file "site-start" is still loaded. | ||
| 69 | ;; ------------------------- | ||
| 70 | ;; -no-site-file Do not load "site-start.el". (This is the ONLY | ||
| 71 | ;; --no-site-file way to prevent loading that file.) | ||
| 72 | ;; ------------------------- | ||
| 73 | ;; -no-splash Don't display a splash screen on startup. | ||
| 74 | ;; --no-splash | ||
| 75 | ;; ------------------------- | ||
| 76 | ;; -u USER Load USER's init file instead of the init | ||
| 77 | ;; -user USER file belonging to the user starting Emacs. | ||
| 78 | ;; --user USER | ||
| 79 | ;; ------------------------- | ||
| 80 | ;; -debug-init Don't catch errors in init files; let the | ||
| 81 | ;; --debug-init debugger run. | ||
| 82 | ;; ------------------------- | ||
| 83 | ;; -i ICONTYPE Set type of icon using when Emacs is | ||
| 84 | ;; -itype ICONTYPE iconified under X. | ||
| 85 | ;; --icon-type ICONTYPE This option is passed on to term/x-win.el | ||
| 86 | ;; | ||
| 87 | ;; -iconic Start Emacs iconified. | ||
| 88 | ;; --iconic This option is passed on to term/x-win.el | ||
| 89 | ;; ------------------------- | ||
| 90 | ;; Various X options for colors/fonts/geometry/title etc. | ||
| 91 | ;; These options are passed on to term/x-win.el which see. | ||
| 92 | ;; ------------------------- | ||
| 93 | ;; FILE Visit FILE. | ||
| 94 | ;; -visit FILE | ||
| 95 | ;; --visit FILE | ||
| 96 | ;; -file FILE | ||
| 97 | ;; --file FILE | ||
| 98 | ;; | ||
| 99 | ;; -L DIRNAME Add DIRNAME to load-path | ||
| 100 | ;; -directory DIRNAME | ||
| 101 | ;; --directory DIRNAME | ||
| 102 | ;; | ||
| 103 | ;; -l FILE Load and execute the Emacs lisp code | ||
| 104 | ;; -load FILE in FILE. | ||
| 105 | ;; --load FILE | ||
| 106 | ;; | ||
| 107 | ;; -f FUNC Execute Emacs lisp function FUNC with | ||
| 108 | ;; -funcall FUNC no arguments. The "-e" form is outdated | ||
| 109 | ;; --funcall FUNC and should not be used. (It's a typo | ||
| 110 | ;; -e FUNC promoted to a feature.) | ||
| 111 | ;; | ||
| 112 | ;; -eval FORM Execute Emacs lisp form FORM. | ||
| 113 | ;; --eval FORM | ||
| 114 | ;; -execute EXPR | ||
| 115 | ;; --execute EXPR | ||
| 116 | ;; | ||
| 117 | ;; -insert FILE Insert the contents of FILE into buffer. | ||
| 118 | ;; --insert FILE | ||
| 119 | ;; ------------------------- | ||
| 120 | ;; -kill Kill (exit) Emacs right away. | ||
| 121 | ;; --kill | ||
| 122 | ;; ------------------------- | ||
| 123 | 31 | ||
| 124 | ;;; Code: | 32 | ;;; Code: |
| 125 | 33 | ||
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 3c5559897b4..8e5b94114a3 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el | |||
| @@ -803,10 +803,18 @@ The default is not to surround any existing words with the braces." | |||
| 803 | (texinfo-insert-@-with-arg "file" arg)) | 803 | (texinfo-insert-@-with-arg "file" arg)) |
| 804 | 804 | ||
| 805 | (defun texinfo-insert-@item () | 805 | (defun texinfo-insert-@item () |
| 806 | "Insert the string `@item' in a Texinfo buffer." | 806 | "Insert the string `@item' in a Texinfo buffer. |
| 807 | If in a table defined by @table, follow said string with a space. | ||
| 808 | Otherwise, follow with a newline." | ||
| 807 | (interactive) | 809 | (interactive) |
| 808 | (insert "@item") | 810 | (insert "@item" |
| 809 | (newline)) | 811 | (if (equal (ignore-errors |
| 812 | (save-excursion | ||
| 813 | (texinfo-last-unended-begin) | ||
| 814 | (match-string 1))) | ||
| 815 | "table") | ||
| 816 | ? ;space | ||
| 817 | ?\n))) | ||
| 810 | 818 | ||
| 811 | (defun texinfo-insert-@kbd (&optional arg) | 819 | (defun texinfo-insert-@kbd (&optional arg) |
| 812 | "Insert a `@kbd{...}' command in a Texinfo buffer. | 820 | "Insert a `@kbd{...}' command in a Texinfo buffer. |
diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 6d06dbdb9dc..4de92f02f0b 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el | |||
| @@ -314,7 +314,7 @@ | |||
| 314 | ;; - The logic in vcursor-find-window is rather complicated and | 314 | ;; - The logic in vcursor-find-window is rather complicated and |
| 315 | ;; therefore bug-prone, though in practice it seems to work OK. | 315 | ;; therefore bug-prone, though in practice it seems to work OK. |
| 316 | ;; | 316 | ;; |
| 317 | ;; Possible enhnacements: | 317 | ;; Possible enhancements: |
| 318 | ;; It would be easy to implement vcursor-push (save vcursor position | 318 | ;; It would be easy to implement vcursor-push (save vcursor position |
| 319 | ;; as mark and deactivate) and vcursor-pop (deactivate vcursor and | 319 | ;; as mark and deactivate) and vcursor-pop (deactivate vcursor and |
| 320 | ;; move to last pushed position) functions. | 320 | ;; move to last pushed position) functions. |
| @@ -342,9 +342,14 @@ disable the vcursor." | |||
| 342 | :type '(choice (const t) (const nil) (const copy)) | 342 | :type '(choice (const t) (const nil) (const copy)) |
| 343 | :group 'vcursor) | 343 | :group 'vcursor) |
| 344 | 344 | ||
| 345 | (defcustom vcursor-modifiers (list 'control 'shift) | ||
| 346 | "*A list of modifiers that are used to define vcursor key bindings." | ||
| 347 | :type '(repeat symbol) | ||
| 348 | :group 'vcursor) | ||
| 349 | |||
| 345 | ;; Needed for defcustom, must be up here | 350 | ;; Needed for defcustom, must be up here |
| 346 | (defun vcursor-cs-binding (base &optional meta) | 351 | (defun vcursor-cs-binding (base &optional meta) |
| 347 | (vector (let ((key (list 'control 'shift (intern base)))) | 352 | (vector (let ((key (append vcursor-modifiers (list (intern base))))) |
| 348 | (if meta | 353 | (if meta |
| 349 | (cons 'meta key) | 354 | (cons 'meta key) |
| 350 | key)))) | 355 | key)))) |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 5879c3a4596..fb88d2736d5 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2004-02-23 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * abbrevs.texi: Various corrections and clarifications in addition | ||
| 4 | to the following: | ||
| 5 | (Abbrev Tables): Delete add-abbrev (as suggested by RMS). | ||
| 6 | |||
| 7 | 2004-02-22 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change) | ||
| 8 | |||
| 9 | * calendar.texi (Holiday Customizing): Quote arg of holiday-sexp. | ||
| 10 | |||
| 11 | 2004-02-21 Luc Teirlinck <teirllm@auburn.edu> | ||
| 12 | |||
| 13 | * text.texi: Various small changes in addition to the following: | ||
| 14 | (User-Level Deletion): Mention optional BACKWARD-ONLY argument | ||
| 15 | to delete-horizontal-space. | ||
| 16 | (Kill Functions, Yanking, Low-Level Kill Ring): clarify and correct | ||
| 17 | description of yank-handler text property at various places. | ||
| 18 | |||
| 19 | * frames.texi (Window System Selections): Add anchor. | ||
| 20 | |||
| 21 | * syntax.texi (Syntax Table Functions): Clarify and correct | ||
| 22 | descriptions of make-syntax-table and copy-syntax-table. | ||
| 23 | (Motion and Syntax): Clarify SYNTAXES argument to | ||
| 24 | skip-syntax-forward. | ||
| 25 | (Parsing Expressions): Mention that the return value of | ||
| 26 | parse-partial-sexp is currently a list of ten rather than nine | ||
| 27 | elements. | ||
| 28 | (Categories): Various corrections and clarifications. | ||
| 29 | |||
| 1 | 2004-02-17 Luc Teirlinck <teirllm@auburn.edu> | 30 | 2004-02-17 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 31 | ||
| 3 | * markers.texi (Marker Insertion Types): Minor change. | 32 | * markers.texi (Marker Insertion Types): Minor change. |
diff --git a/lispref/abbrevs.texi b/lispref/abbrevs.texi index f123a3e1411..33ebecd70e5 100644 --- a/lispref/abbrevs.texi +++ b/lispref/abbrevs.texi | |||
| @@ -24,12 +24,17 @@ each abbreviation. The symbol's name is the abbreviation; its value | |||
| 24 | is the expansion; its function definition is the hook function to do | 24 | is the expansion; its function definition is the hook function to do |
| 25 | the expansion (@pxref{Defining Abbrevs}); its property list cell | 25 | the expansion (@pxref{Defining Abbrevs}); its property list cell |
| 26 | typically contains the use count, the number of times the abbreviation | 26 | typically contains the use count, the number of times the abbreviation |
| 27 | has been expanded. (Alternatively, the use count is on the | 27 | has been expanded. Alternatively, the use count is on the |
| 28 | @code{count} property and the system-abbrev flag is on the | 28 | @code{count} property and the system-abbrev flag is on the |
| 29 | @code{system-type} property.) Because these symbols are not interned | 29 | @code{system-type} property. Abbrevs with a non-@code{nil} |
| 30 | in the usual obarray, they will never appear as the result of reading | 30 | @code{system-type} property are called ``system'' abbrevs. They are |
| 31 | a Lisp expression; in fact, normally they are never used except by the | 31 | usually defined by modes or packages, instead of by the user, and are |
| 32 | code that handles abbrevs. Therefore, it is safe to use them in an | 32 | treated specially in certain respects. |
| 33 | |||
| 34 | Because the symbols used for abbrevs are not interned in the usual | ||
| 35 | obarray, they will never appear as the result of reading a Lisp | ||
| 36 | expression; in fact, normally they are never used except by the code | ||
| 37 | that handles abbrevs. Therefore, it is safe to use them in an | ||
| 33 | extremely nonstandard way. @xref{Creating Symbols}. | 38 | extremely nonstandard way. @xref{Creating Symbols}. |
| 34 | 39 | ||
| 35 | For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev | 40 | For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev |
| @@ -82,7 +87,9 @@ leaving it empty. It always returns @code{nil}. | |||
| 82 | 87 | ||
| 83 | @defun copy-abbrev-table table | 88 | @defun copy-abbrev-table table |
| 84 | This function returns a copy of abbrev table @var{table}---a new | 89 | This function returns a copy of abbrev table @var{table}---a new |
| 85 | abbrev table that contains the same abbrev definitions. | 90 | abbrev table that contains the same abbrev definitions. The only |
| 91 | difference between @var{table} and the returned copy is that this | ||
| 92 | function sets the property lists of all copied abbrevs to 0. | ||
| 86 | @end defun | 93 | @end defun |
| 87 | 94 | ||
| 88 | @defun define-abbrev-table tabname definitions | 95 | @defun define-abbrev-table tabname definitions |
| @@ -90,8 +97,16 @@ This function defines @var{tabname} (a symbol) as an abbrev table | |||
| 90 | name, i.e., as a variable whose value is an abbrev table. It defines | 97 | name, i.e., as a variable whose value is an abbrev table. It defines |
| 91 | abbrevs in the table according to @var{definitions}, a list of | 98 | abbrevs in the table according to @var{definitions}, a list of |
| 92 | elements of the form @code{(@var{abbrevname} @var{expansion} | 99 | elements of the form @code{(@var{abbrevname} @var{expansion} |
| 93 | @var{hook} @var{usecount} @r{[}@var{system-flag}@r{]})}. The return | 100 | @var{hook} @var{usecount} @var{system-flag})}. If an element of |
| 94 | value is always @code{nil}. | 101 | @var{definitions} has length less than five, omitted elements default |
| 102 | to @code{nil}. A value of @code{nil} for @var{usecount} is equivalent | ||
| 103 | to zero. The return value is always @code{nil}. | ||
| 104 | |||
| 105 | If this function is called more than once for the same @var{tabname}, | ||
| 106 | subsequent calls add the definitions in @var{definitions} to | ||
| 107 | @var{tabname}, rather than overriding the entire original contents. | ||
| 108 | (A subsequent call only overrides abbrevs explicitly redefined or | ||
| 109 | undefined in @var{definitions}.) | ||
| 95 | @end defun | 110 | @end defun |
| 96 | 111 | ||
| 97 | @defvar abbrev-table-name-list | 112 | @defvar abbrev-table-name-list |
| @@ -105,38 +120,24 @@ named @var{name}. The argument @var{name} is a symbol whose value is an | |||
| 105 | abbrev table. The return value is always @code{nil}. | 120 | abbrev table. The return value is always @code{nil}. |
| 106 | 121 | ||
| 107 | If @var{human} is non-@code{nil}, the description is human-oriented. | 122 | If @var{human} is non-@code{nil}, the description is human-oriented. |
| 108 | Otherwise the description is a Lisp expression---a call to | 123 | System abbrevs are listed and identified as such. Otherwise the |
| 109 | @code{define-abbrev-table} that would define @var{name} exactly as it | 124 | description is a Lisp expression---a call to @code{define-abbrev-table} |
| 110 | is currently defined. | 125 | that would define @var{name} as it is currently defined, but without |
| 126 | the system abbrevs. (The mode or package using @var{name} is supposed | ||
| 127 | to add these to @var{name} separately.) | ||
| 111 | @end defun | 128 | @end defun |
| 112 | 129 | ||
| 113 | @node Defining Abbrevs, Abbrev Files, Abbrev Tables, Abbrevs | 130 | @node Defining Abbrevs, Abbrev Files, Abbrev Tables, Abbrevs |
| 114 | @comment node-name, next, previous, up | 131 | @comment node-name, next, previous, up |
| 115 | @section Defining Abbrevs | 132 | @section Defining Abbrevs |
| 116 | 133 | @code{define-abbrev} is the low-level basic function for defining an | |
| 117 | These functions define an abbrev in a specified abbrev table. | 134 | abbrev in a specified abbrev table. When major modes predefine |
| 118 | @code{define-abbrev} is the low-level basic function, while | 135 | standard abbrevs, they should call @code{define-abbrev} and specify |
| 119 | @code{add-abbrev} is used by commands that ask for information from | 136 | @code{t} for @var{system-flag}. |
| 120 | the user. When major modes predefine standard abbrevs, they should | ||
| 121 | call @code{define-abbrev} and specify @code{t} for @var{system-flag}. | ||
| 122 | |||
| 123 | @defun add-abbrev table type arg | ||
| 124 | This function adds an abbreviation to abbrev table @var{table} based on | ||
| 125 | information from the user. The argument @var{type} is a string | ||
| 126 | describing in English the kind of abbrev this will be (typically, | ||
| 127 | @code{"global"} or @code{"mode-specific"}); this is used in prompting | ||
| 128 | the user. The argument @var{arg} is the number of words in the | ||
| 129 | expansion. | ||
| 130 | |||
| 131 | The return value is the symbol that internally represents the new | ||
| 132 | abbrev, or @code{nil} if the user declines to confirm redefining an | ||
| 133 | existing abbrev. | ||
| 134 | @end defun | ||
| 135 | 137 | ||
| 136 | @defun define-abbrev table name expansion &optional hook count system-flag | 138 | @defun define-abbrev table name expansion &optional hook count system-flag |
| 137 | This function defines an abbrev named @var{name}, in @var{table}, to | 139 | This function defines an abbrev named @var{name}, in @var{table}, to |
| 138 | expand to @var{expansion} and call @var{hook}. The return value is a | 140 | expand to @var{expansion} and call @var{hook}. The return value is |
| 139 | symbol that represents the abbrev inside Emacs; its name is | ||
| 140 | @var{name}. | 141 | @var{name}. |
| 141 | 142 | ||
| 142 | The value of @var{count}, if specified, initializes the abbrev's | 143 | The value of @var{count}, if specified, initializes the abbrev's |
| @@ -210,9 +211,10 @@ This function does not display any messages. It returns @code{nil}. | |||
| 210 | @end defun | 211 | @end defun |
| 211 | 212 | ||
| 212 | @defopt save-abbrevs | 213 | @defopt save-abbrevs |
| 213 | A non-@code{nil} value for @code{save-abbrev} means that Emacs should | 214 | A non-@code{nil} value for @code{save-abbrevs} means that Emacs should |
| 214 | save abbrevs when files are saved. @code{abbrev-file-name} specifies | 215 | offer the user to save abbrevs when files are saved. If the value is |
| 215 | the file to save the abbrevs in. | 216 | @code{silently}, Emacs saves the abbrevs without asking the user. |
| 217 | @code{abbrev-file-name} specifies the file to save the abbrevs in. | ||
| 216 | @end defopt | 218 | @end defopt |
| 217 | 219 | ||
| 218 | @defvar abbrevs-changed | 220 | @defvar abbrevs-changed |
| @@ -222,11 +224,11 @@ various Emacs commands to offer to save your abbrevs. | |||
| 222 | @end defvar | 224 | @end defvar |
| 223 | 225 | ||
| 224 | @deffn Command write-abbrev-file &optional filename | 226 | @deffn Command write-abbrev-file &optional filename |
| 225 | Save all abbrev definitions (except ``system'' abbrevs), in all abbrev | 227 | Save all abbrev definitions (except ``system'' abbrevs), for all abbrev |
| 226 | tables, in the file @var{filename}, in the form of a Lisp program that | 228 | tables listed in @code{abbrev-table-name-list}, in the file |
| 227 | when loaded will define the same abbrevs. If @var{filename} is | 229 | @var{filename}, in the form of a Lisp program that when loaded will |
| 228 | @code{nil} or omitted, @code{abbrev-file-name} is used. This function | 230 | define the same abbrevs. If @var{filename} is @code{nil} or omitted, |
| 229 | returns @code{nil}. | 231 | @code{abbrev-file-name} is used. This function returns @code{nil}. |
| 230 | @end deffn | 232 | @end deffn |
| 231 | 233 | ||
| 232 | @node Abbrev Expansion, Standard Abbrev Tables, Abbrev Files, Abbrevs | 234 | @node Abbrev Expansion, Standard Abbrev Tables, Abbrev Files, Abbrevs |
| @@ -249,9 +251,10 @@ abbrev table. | |||
| 249 | 251 | ||
| 250 | @defun abbrev-expansion abbrev &optional table | 252 | @defun abbrev-expansion abbrev &optional table |
| 251 | This function returns the string that @var{abbrev} would expand into (as | 253 | This function returns the string that @var{abbrev} would expand into (as |
| 252 | defined by the abbrev tables used for the current buffer). The optional | 254 | defined by the abbrev tables used for the current buffer). If |
| 253 | argument @var{table} specifies the abbrev table to use, as in | 255 | @var{abbrev} is not a valid abbrev, the function returns @code{nil}. |
| 254 | @code{abbrev-symbol}. | 256 | The optional argument @var{table} specifies the abbrev table to use, |
| 257 | as in @code{abbrev-symbol}. | ||
| 255 | @end defun | 258 | @end defun |
| 256 | 259 | ||
| 257 | @deffn Command expand-abbrev | 260 | @deffn Command expand-abbrev |
| @@ -266,10 +269,15 @@ returns @code{nil} even though expansion did occur. | |||
| 266 | @end deffn | 269 | @end deffn |
| 267 | 270 | ||
| 268 | @deffn Command abbrev-prefix-mark &optional arg | 271 | @deffn Command abbrev-prefix-mark &optional arg |
| 269 | Mark current point as the beginning of an abbrev. The next call to | 272 | This command marks current point as the beginning of an abbrev. The |
| 270 | @code{expand-abbrev} will use the text from here to point (where it is | 273 | next call to @code{expand-abbrev} will use the text from here to point |
| 271 | then) as the abbrev to expand, rather than using the previous word as | 274 | (where it is then) as the abbrev to expand, rather than using the |
| 272 | usual. | 275 | previous word as usual. |
| 276 | |||
| 277 | First, this command expands any abbrev before point, unless @var{arg} | ||
| 278 | is non-@code{nil}. (Interactively, @var{arg} is the prefix argument.) | ||
| 279 | Then it inserts a hyphen before point, to indicate the start of the | ||
| 280 | next abbrev to be expanded. The actual expansion removes the hyphen. | ||
| 273 | @end deffn | 281 | @end deffn |
| 274 | 282 | ||
| 275 | @defopt abbrev-all-caps | 283 | @defopt abbrev-all-caps |
| @@ -280,11 +288,12 @@ expansion. | |||
| 280 | @end defopt | 288 | @end defopt |
| 281 | 289 | ||
| 282 | @defvar abbrev-start-location | 290 | @defvar abbrev-start-location |
| 283 | This is the buffer position for @code{expand-abbrev} to use as the start | 291 | This is a marker pointing to the buffer position for |
| 284 | of the next abbrev to be expanded. (@code{nil} means use the word | 292 | @code{expand-abbrev} to use as the start of the next abbrev to be |
| 285 | before point instead.) @code{abbrev-start-location} is set to | 293 | expanded. (@code{nil} means use the word before point instead.) |
| 286 | @code{nil} each time @code{expand-abbrev} is called. This variable is | 294 | @code{abbrev-start-location} is set to @code{nil} each time |
| 287 | also set by @code{abbrev-prefix-mark}. | 295 | @code{expand-abbrev} is called. This variable is also set by |
| 296 | @code{abbrev-prefix-mark}. | ||
| 288 | @end defvar | 297 | @end defvar |
| 289 | 298 | ||
| 290 | @defvar abbrev-start-location-buffer | 299 | @defvar abbrev-start-location-buffer |
diff --git a/lispref/calendar.texi b/lispref/calendar.texi index 709f80f6b8b..f132ea8868b 100644 --- a/lispref/calendar.texi +++ b/lispref/calendar.texi | |||
| @@ -255,7 +255,7 @@ occur on the first Tuesday after the first Monday in November of years | |||
| 255 | divisible by 4: | 255 | divisible by 4: |
| 256 | 256 | ||
| 257 | @smallexample | 257 | @smallexample |
| 258 | (holiday-sexp (if (= 0 (% year 4)) | 258 | (holiday-sexp '(if (= 0 (% year 4)) |
| 259 | (calendar-gregorian-from-absolute | 259 | (calendar-gregorian-from-absolute |
| 260 | (1+ (calendar-dayname-on-or-before | 260 | (1+ (calendar-dayname-on-or-before |
| 261 | 1 (+ 6 (calendar-absolute-from-gregorian | 261 | 1 (+ 6 (calendar-absolute-from-gregorian |
diff --git a/lispref/frames.texi b/lispref/frames.texi index 02cc1e68f8d..0be4c525822 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi | |||
| @@ -1503,6 +1503,7 @@ This function returns the contents of cut buffer number @var{n}. | |||
| 1503 | If omitted @var{n} defaults to 0. | 1503 | If omitted @var{n} defaults to 0. |
| 1504 | @end defun | 1504 | @end defun |
| 1505 | 1505 | ||
| 1506 | @anchor{Definition of x-set-cut-buffer} | ||
| 1506 | @defun x-set-cut-buffer string &optional push | 1507 | @defun x-set-cut-buffer string &optional push |
| 1507 | This function stores @var{string} into the first cut buffer (cut buffer | 1508 | This function stores @var{string} into the first cut buffer (cut buffer |
| 1508 | 0). If @var{push} is @code{nil}, only the first cut buffer is changed. | 1509 | 0). If @var{push} is @code{nil}, only the first cut buffer is changed. |
diff --git a/lispref/syntax.texi b/lispref/syntax.texi index b2955400c8f..2628b42812e 100644 --- a/lispref/syntax.texi +++ b/lispref/syntax.texi | |||
| @@ -397,10 +397,13 @@ prefix (@samp{'}). @xref{Motion and Syntax}. | |||
| 397 | In this section we describe functions for creating, accessing and | 397 | In this section we describe functions for creating, accessing and |
| 398 | altering syntax tables. | 398 | altering syntax tables. |
| 399 | 399 | ||
| 400 | @defun make-syntax-table | 400 | @defun make-syntax-table &optional table |
| 401 | This function creates a new syntax table. It inherits the syntax for | 401 | This function creates a new syntax table, with all values initialized |
| 402 | letters and control characters from the standard syntax table. For | 402 | to @code{nil}. If @var{table} is non-@code{nil}, it becomes the |
| 403 | other characters, the syntax is copied from the standard syntax table. | 403 | parent of the new syntax table, otherwise the standard syntax table is |
| 404 | the parent. Like all char-tables, a syntax table inherits from its | ||
| 405 | parent. Thus the original syntax of all characters in the returned | ||
| 406 | syntax table is determined by the parent. @xref{Char-Tables}. | ||
| 404 | 407 | ||
| 405 | Most major mode syntax tables are created in this way. | 408 | Most major mode syntax tables are created in this way. |
| 406 | @end defun | 409 | @end defun |
| @@ -408,7 +411,7 @@ Most major mode syntax tables are created in this way. | |||
| 408 | @defun copy-syntax-table &optional table | 411 | @defun copy-syntax-table &optional table |
| 409 | This function constructs a copy of @var{table} and returns it. If | 412 | This function constructs a copy of @var{table} and returns it. If |
| 410 | @var{table} is not supplied (or is @code{nil}), it returns a copy of the | 413 | @var{table} is not supplied (or is @code{nil}), it returns a copy of the |
| 411 | current syntax table. Otherwise, an error is signaled if @var{table} is | 414 | standard syntax table. Otherwise, an error is signaled if @var{table} is |
| 412 | not a syntax table. | 415 | not a syntax table. |
| 413 | @end defun | 416 | @end defun |
| 414 | 417 | ||
| @@ -425,7 +428,7 @@ This function always returns @code{nil}. The old syntax information in | |||
| 425 | the table for this character is discarded. | 428 | the table for this character is discarded. |
| 426 | 429 | ||
| 427 | An error is signaled if the first character of the syntax descriptor is not | 430 | An error is signaled if the first character of the syntax descriptor is not |
| 428 | one of the twelve syntax class designator characters. An error is also | 431 | one of the seventeen syntax class designator characters. An error is also |
| 429 | signaled if @var{char} is not a character. | 432 | signaled if @var{char} is not a character. |
| 430 | 433 | ||
| 431 | @example | 434 | @example |
| @@ -559,10 +562,11 @@ table. | |||
| 559 | have certain syntax classes. | 562 | have certain syntax classes. |
| 560 | 563 | ||
| 561 | @defun skip-syntax-forward syntaxes &optional limit | 564 | @defun skip-syntax-forward syntaxes &optional limit |
| 562 | This function moves point forward across characters having syntax classes | 565 | This function moves point forward across characters having syntax |
| 563 | mentioned in @var{syntaxes}. It stops when it encounters the end of | 566 | classes mentioned in @var{syntaxes} (a string of syntax code |
| 564 | the buffer, or position @var{limit} (if specified), or a character it is | 567 | characters). It stops when it encounters the end of the buffer, or |
| 565 | not supposed to skip. | 568 | position @var{limit} (if specified), or a character it is not supposed |
| 569 | to skip. | ||
| 566 | 570 | ||
| 567 | If @var{syntaxes} starts with @samp{^}, then the function skips | 571 | If @var{syntaxes} starts with @samp{^}, then the function skips |
| 568 | characters whose syntax is @emph{not} in @var{syntaxes}. | 572 | characters whose syntax is @emph{not} in @var{syntaxes}. |
| @@ -697,9 +701,10 @@ that can be nested. | |||
| 697 | The minimum parenthesis depth encountered during this scan. | 701 | The minimum parenthesis depth encountered during this scan. |
| 698 | 702 | ||
| 699 | @item | 703 | @item |
| 700 | What kind of comment is active: @code{nil} for a comment of style ``a'', | 704 | What kind of comment is active: @code{nil} for a comment of style |
| 701 | @code{t} for a comment of style ``b'', and @code{syntax-table} for | 705 | ``a'' or when not inside a comment, @code{t} for a comment of style |
| 702 | a comment that should be ended by a generic comment delimiter character. | 706 | ``b'', and @code{syntax-table} for a comment that should be ended by a |
| 707 | generic comment delimiter character. | ||
| 703 | 708 | ||
| 704 | @item | 709 | @item |
| 705 | The string or comment start position. While inside a comment, this is | 710 | The string or comment start position. While inside a comment, this is |
| @@ -710,6 +715,12 @@ this element is @code{nil}. | |||
| 710 | 715 | ||
| 711 | Elements 0, 3, 4, 5 and 7 are significant in the argument @var{state}. | 716 | Elements 0, 3, 4, 5 and 7 are significant in the argument @var{state}. |
| 712 | 717 | ||
| 718 | Actually, the return value is currently a list of ten, rather than | ||
| 719 | nine, elements and @var{state} is allowed to be a list of ten elements | ||
| 720 | as well. However, the meaning of the tenth element is subject to | ||
| 721 | change and only the first eight elements of @var{state} need to be | ||
| 722 | specified. | ||
| 723 | |||
| 713 | @cindex indenting with parentheses | 724 | @cindex indenting with parentheses |
| 714 | This function is most often used to compute indentation for languages | 725 | This function is most often used to compute indentation for languages |
| 715 | that have nested parentheses. | 726 | that have nested parentheses. |
| @@ -757,11 +768,11 @@ of what the syntax table says about them. (However, text properties | |||
| 757 | can still override the syntax.) | 768 | can still override the syntax.) |
| 758 | @end defvar | 769 | @end defvar |
| 759 | 770 | ||
| 760 | @defvar parse-sexp-ignore-comments | 771 | @defopt parse-sexp-ignore-comments |
| 761 | @cindex skipping comments | 772 | @cindex skipping comments |
| 762 | If the value is non-@code{nil}, then comments are treated as | 773 | If the value is non-@code{nil}, then comments are treated as |
| 763 | whitespace by the functions in this section and by @code{forward-sexp}. | 774 | whitespace by the functions in this section and by @code{forward-sexp}. |
| 764 | @end defvar | 775 | @end defopt |
| 765 | 776 | ||
| 766 | @vindex parse-sexp-lookup-properties | 777 | @vindex parse-sexp-lookup-properties |
| 767 | The behaviour of @code{parse-partial-sexp} is also affected by | 778 | The behaviour of @code{parse-partial-sexp} is also affected by |
| @@ -951,12 +962,12 @@ belongs to. In this category set, if the element at index @var{cat} is | |||
| 951 | @code{t}, that means category @var{cat} is a member of the set, and that | 962 | @code{t}, that means category @var{cat} is a member of the set, and that |
| 952 | character @var{c} belongs to category @var{cat}. | 963 | character @var{c} belongs to category @var{cat}. |
| 953 | 964 | ||
| 965 | For the next three functions, the optional argument @var{table} | ||
| 966 | defaults to the current buffer's category table. | ||
| 967 | |||
| 954 | @defun define-category char docstring &optional table | 968 | @defun define-category char docstring &optional table |
| 955 | This function defines a new category, with name @var{char} and | 969 | This function defines a new category, with name @var{char} and |
| 956 | documentation @var{docstring}. | 970 | documentation @var{docstring}, for the category table @var{table}, |
| 957 | |||
| 958 | The new category is defined for category table @var{table}, which | ||
| 959 | defaults to the current buffer's category table. | ||
| 960 | @end defun | 971 | @end defun |
| 961 | 972 | ||
| 962 | @defun category-docstring category &optional table | 973 | @defun category-docstring category &optional table |
| @@ -971,7 +982,7 @@ in category table @var{table}. | |||
| 971 | @end example | 982 | @end example |
| 972 | @end defun | 983 | @end defun |
| 973 | 984 | ||
| 974 | @defun get-unused-category table | 985 | @defun get-unused-category &optional table |
| 975 | This function returns a category name (a character) which is not | 986 | This function returns a category name (a character) which is not |
| 976 | currently defined in @var{table}. If all possible categories are in use | 987 | currently defined in @var{table}. If all possible categories are in use |
| 977 | in @var{table}, it returns @code{nil}. | 988 | in @var{table}, it returns @code{nil}. |
| @@ -993,7 +1004,7 @@ This function returns the standard category table. | |||
| 993 | @defun copy-category-table &optional table | 1004 | @defun copy-category-table &optional table |
| 994 | This function constructs a copy of @var{table} and returns it. If | 1005 | This function constructs a copy of @var{table} and returns it. If |
| 995 | @var{table} is not supplied (or is @code{nil}), it returns a copy of the | 1006 | @var{table} is not supplied (or is @code{nil}), it returns a copy of the |
| 996 | current category table. Otherwise, an error is signaled if @var{table} | 1007 | standard category table. Otherwise, an error is signaled if @var{table} |
| 997 | is not a category table. | 1008 | is not a category table. |
| 998 | @end defun | 1009 | @end defun |
| 999 | 1010 | ||
| @@ -1023,11 +1034,11 @@ other categories. | |||
| 1023 | @end defun | 1034 | @end defun |
| 1024 | 1035 | ||
| 1025 | @defun char-category-set char | 1036 | @defun char-category-set char |
| 1026 | This function returns the category set for character @var{char}. This | 1037 | This function returns the category set for character @var{char} in the |
| 1027 | is the bool-vector which records which categories the character | 1038 | current buffer's category table. This is the bool-vector which |
| 1028 | @var{char} belongs to. The function @code{char-category-set} does not | 1039 | records which categories the character @var{char} belongs to. The |
| 1029 | allocate storage, because it returns the same bool-vector that exists in | 1040 | function @code{char-category-set} does not allocate storage, because |
| 1030 | the category table. | 1041 | it returns the same bool-vector that exists in the category table. |
| 1031 | 1042 | ||
| 1032 | @example | 1043 | @example |
| 1033 | (char-category-set ?a) | 1044 | (char-category-set ?a) |
| @@ -1056,10 +1067,11 @@ But if @var{reset} is non-@code{nil}, then it deletes @var{category} | |||
| 1056 | instead. | 1067 | instead. |
| 1057 | @end defun | 1068 | @end defun |
| 1058 | 1069 | ||
| 1059 | @deffn Command describe-categories | 1070 | @deffn Command describe-categories &optional buffer-or-name |
| 1060 | This function describes the category specifications in the current | 1071 | This function describes the category specifications in the current |
| 1061 | category table. The descriptions are inserted in a buffer, which is | 1072 | category table. It inserts the descriptions in a buffer, and then |
| 1062 | then displayed. | 1073 | displays that buffer. If @var{buffer-or-name} is non-@code{nil}, it |
| 1074 | describes the category table of that buffer instead. | ||
| 1063 | @end deffn | 1075 | @end deffn |
| 1064 | 1076 | ||
| 1065 | @ignore | 1077 | @ignore |
diff --git a/lispref/text.texi b/lispref/text.texi index b6e477e6651..413c10e29c1 100644 --- a/lispref/text.texi +++ b/lispref/text.texi | |||
| @@ -58,7 +58,7 @@ the character after point. | |||
| 58 | position stored in a register. | 58 | position stored in a register. |
| 59 | * Base 64:: Conversion to or from base 64 encoding. | 59 | * Base 64:: Conversion to or from base 64 encoding. |
| 60 | * MD5 Checksum:: Compute the MD5 ``message digest''/``checksum''. | 60 | * MD5 Checksum:: Compute the MD5 ``message digest''/``checksum''. |
| 61 | * Atomic Changes:: Installing several buffer changs ``atomically''. | 61 | * Atomic Changes:: Installing several buffer changes ``atomically''. |
| 62 | * Change Hooks:: Supplying functions to be run when text is changed. | 62 | * Change Hooks:: Supplying functions to be run when text is changed. |
| 63 | @end menu | 63 | @end menu |
| 64 | 64 | ||
| @@ -69,6 +69,9 @@ the character after point. | |||
| 69 | Several simple functions are described here. See also @code{looking-at} | 69 | Several simple functions are described here. See also @code{looking-at} |
| 70 | in @ref{Regexp Search}. | 70 | in @ref{Regexp Search}. |
| 71 | 71 | ||
| 72 | In the following four functions, ``beginning'' or ``end'' of buffer | ||
| 73 | refers to the beginning or end of the accessible portion. | ||
| 74 | |||
| 72 | @defun char-after &optional position | 75 | @defun char-after &optional position |
| 73 | This function returns the character in the current buffer at (i.e., | 76 | This function returns the character in the current buffer at (i.e., |
| 74 | immediately after) position @var{position}. If @var{position} is out of | 77 | immediately after) position @var{position}. If @var{position} is out of |
| @@ -230,9 +233,9 @@ This is the contents of buffer foo | |||
| 230 | This function returns the symbol (or word) at or near point, as a string. | 233 | This function returns the symbol (or word) at or near point, as a string. |
| 231 | The return value includes no text properties. | 234 | The return value includes no text properties. |
| 232 | 235 | ||
| 233 | The optional argument @var{really-word} is non-@code{nil}, it finds a | 236 | If the optional argument @var{really-word} is non-@code{nil}, it finds a |
| 234 | word; otherwise, it finds a symbol (which includes word characters and | 237 | word; otherwise, it finds a symbol (which includes both word |
| 235 | both symbol constituent characters). | 238 | characters and symbol constituent characters). |
| 236 | 239 | ||
| 237 | If the optional argument @var{strict} is non-@code{nil}, then point | 240 | If the optional argument @var{strict} is non-@code{nil}, then point |
| 238 | must be in or next to the symbol or word---if no symbol or word is | 241 | must be in or next to the symbol or word---if no symbol or word is |
| @@ -273,10 +276,10 @@ copying them into strings first. | |||
| 273 | @defun compare-buffer-substrings buffer1 start1 end1 buffer2 start2 end2 | 276 | @defun compare-buffer-substrings buffer1 start1 end1 buffer2 start2 end2 |
| 274 | This function lets you compare two substrings of the same buffer or two | 277 | This function lets you compare two substrings of the same buffer or two |
| 275 | different buffers. The first three arguments specify one substring, | 278 | different buffers. The first three arguments specify one substring, |
| 276 | giving a buffer and two positions within the buffer. The last three | 279 | giving a buffer (or a buffer name) and two positions within the |
| 277 | arguments specify the other substring in the same way. You can use | 280 | buffer. The last three arguments specify the other substring in the |
| 278 | @code{nil} for @var{buffer1}, @var{buffer2}, or both to stand for the | 281 | same way. You can use @code{nil} for @var{buffer1}, @var{buffer2}, or |
| 279 | current buffer. | 282 | both to stand for the current buffer. |
| 280 | 283 | ||
| 281 | The value is negative if the first substring is less, positive if the | 284 | The value is negative if the first substring is less, positive if the |
| 282 | first is greater, and zero if they are equal. The absolute value of | 285 | first is greater, and zero if they are equal. The absolute value of |
| @@ -360,8 +363,7 @@ overlay. | |||
| 360 | @defun insert-char character count &optional inherit | 363 | @defun insert-char character count &optional inherit |
| 361 | This function inserts @var{count} instances of @var{character} into the | 364 | This function inserts @var{count} instances of @var{character} into the |
| 362 | current buffer before point. The argument @var{count} should be a | 365 | current buffer before point. The argument @var{count} should be a |
| 363 | number (@code{nil} means 1), and @var{character} must be a character. | 366 | number, and @var{character} must be a character. The value is @code{nil}. |
| 364 | The value is @code{nil}. | ||
| 365 | 367 | ||
| 366 | This function does not convert unibyte character codes 128 through 255 | 368 | This function does not convert unibyte character codes 128 through 255 |
| 367 | to multibyte characters, not even if the current buffer is a multibyte | 369 | to multibyte characters, not even if the current buffer is a multibyte |
| @@ -375,7 +377,7 @@ insertion point. @xref{Sticky Properties}. | |||
| 375 | @defun insert-buffer-substring from-buffer-or-name &optional start end | 377 | @defun insert-buffer-substring from-buffer-or-name &optional start end |
| 376 | This function inserts a portion of buffer @var{from-buffer-or-name} | 378 | This function inserts a portion of buffer @var{from-buffer-or-name} |
| 377 | (which must already exist) into the current buffer before point. The | 379 | (which must already exist) into the current buffer before point. The |
| 378 | text inserted is the region from @var{start} and @var{end}. (These | 380 | text inserted is the region between @var{start} and @var{end}. (These |
| 379 | arguments default to the beginning and end of the accessible portion of | 381 | arguments default to the beginning and end of the accessible portion of |
| 380 | that buffer.) This function returns @code{nil}. | 382 | that buffer.) This function returns @code{nil}. |
| 381 | 383 | ||
| @@ -418,9 +420,10 @@ commands intended primarily for the user but useful also in Lisp | |||
| 418 | programs. | 420 | programs. |
| 419 | 421 | ||
| 420 | @deffn Command insert-buffer from-buffer-or-name | 422 | @deffn Command insert-buffer from-buffer-or-name |
| 421 | This command inserts the entire contents of @var{from-buffer-or-name} | 423 | This command inserts the entire accessible contents of |
| 422 | (which must exist) into the current buffer after point. It leaves | 424 | @var{from-buffer-or-name} (which must exist) into the current buffer |
| 423 | the mark after the inserted text. The value is @code{nil}. | 425 | after point. It leaves the mark after the inserted text. The value |
| 426 | is @code{nil}. | ||
| 424 | @end deffn | 427 | @end deffn |
| 425 | 428 | ||
| 426 | @deffn Command self-insert-command count | 429 | @deffn Command self-insert-command count |
| @@ -501,11 +504,11 @@ yanked, but can be reinserted using the undo mechanism (@pxref{Undo}). | |||
| 501 | Some deletion functions do save text in the kill ring in some special | 504 | Some deletion functions do save text in the kill ring in some special |
| 502 | cases. | 505 | cases. |
| 503 | 506 | ||
| 504 | All of the deletion functions operate on the current buffer, and all | 507 | All of the deletion functions operate on the current buffer. |
| 505 | return a value of @code{nil}. | ||
| 506 | 508 | ||
| 507 | @deffn Command erase-buffer | 509 | @deffn Command erase-buffer |
| 508 | This function deletes the entire text of the current buffer, leaving it | 510 | This function deletes the entire text of the current buffer |
| 511 | (@emph{not} just the accessible portion), leaving it | ||
| 509 | empty. If the buffer is read-only, it signals a @code{buffer-read-only} | 512 | empty. If the buffer is read-only, it signals a @code{buffer-read-only} |
| 510 | error; if some of the text in it is read-only, it signals a | 513 | error; if some of the text in it is read-only, it signals a |
| 511 | @code{text-read-only} error. Otherwise, it deletes the text without | 514 | @code{text-read-only} error. Otherwise, it deletes the text without |
| @@ -591,8 +594,9 @@ The value returned is always @code{nil}. | |||
| 591 | This option specifies how @code{backward-delete-char-untabify} should | 594 | This option specifies how @code{backward-delete-char-untabify} should |
| 592 | deal with whitespace. Possible values include @code{untabify}, the | 595 | deal with whitespace. Possible values include @code{untabify}, the |
| 593 | default, meaning convert a tab to many spaces and delete one; | 596 | default, meaning convert a tab to many spaces and delete one; |
| 594 | @code{hungry}, meaning delete all the whitespace characters before point | 597 | @code{hungry}, meaning delete all tabs and spaces before point with |
| 595 | with one command, and @code{nil}, meaning do nothing special for | 598 | one command; @code{all} meaning delete all tabs, spaces and newlines |
| 599 | before point, and @code{nil}, meaning do nothing special for | ||
| 596 | whitespace characters. | 600 | whitespace characters. |
| 597 | @end defopt | 601 | @end defopt |
| 598 | 602 | ||
| @@ -603,11 +607,14 @@ whitespace characters. | |||
| 603 | commands intended primarily for the user but useful also in Lisp | 607 | commands intended primarily for the user but useful also in Lisp |
| 604 | programs. | 608 | programs. |
| 605 | 609 | ||
| 606 | @deffn Command delete-horizontal-space | 610 | @deffn Command delete-horizontal-space &optional backward-only |
| 607 | @cindex deleting whitespace | 611 | @cindex deleting whitespace |
| 608 | This function deletes all spaces and tabs around point. It returns | 612 | This function deletes all spaces and tabs around point. It returns |
| 609 | @code{nil}. | 613 | @code{nil}. |
| 610 | 614 | ||
| 615 | If @var{backward-only} is non-@code{nil}, the function deletes | ||
| 616 | spaces and tabs before point, but not after point. | ||
| 617 | |||
| 611 | In the following examples, we call @code{delete-horizontal-space} four | 618 | In the following examples, we call @code{delete-horizontal-space} four |
| 612 | times, once on each line, with point between the second and third | 619 | times, once on each line, with point between the second and third |
| 613 | characters on the line each time. | 620 | characters on the line each time. |
| @@ -673,9 +680,10 @@ After the lines are joined, the function @code{fixup-whitespace} is | |||
| 673 | responsible for deciding whether to leave a space at the junction. | 680 | responsible for deciding whether to leave a space at the junction. |
| 674 | @end deffn | 681 | @end deffn |
| 675 | 682 | ||
| 676 | @defun fixup-whitespace | 683 | @deffn Command fixup-whitespace |
| 677 | This function replaces all the whitespace surrounding point with either | 684 | This function replaces all the horizontal whitespace surrounding point |
| 678 | one space or no space, according to the context. It returns @code{nil}. | 685 | with either one space or no space, according to the context. It |
| 686 | returns @code{nil}. | ||
| 679 | 687 | ||
| 680 | At the beginning or end of a line, the appropriate amount of space is | 688 | At the beginning or end of a line, the appropriate amount of space is |
| 681 | none. Before a character with close parenthesis syntax, or after a | 689 | none. Before a character with close parenthesis syntax, or after a |
| @@ -709,7 +717,7 @@ This has too many spaces at the start of (this list) | |||
| 709 | ---------- Buffer: foo ---------- | 717 | ---------- Buffer: foo ---------- |
| 710 | @end group | 718 | @end group |
| 711 | @end smallexample | 719 | @end smallexample |
| 712 | @end defun | 720 | @end deffn |
| 713 | 721 | ||
| 714 | @deffn Command just-one-space | 722 | @deffn Command just-one-space |
| 715 | @comment !!SourceFile simple.el | 723 | @comment !!SourceFile simple.el |
| @@ -722,7 +730,7 @@ This function deletes blank lines surrounding point. If point is on a | |||
| 722 | blank line with one or more blank lines before or after it, then all but | 730 | blank line with one or more blank lines before or after it, then all but |
| 723 | one of them are deleted. If point is on an isolated blank line, then it | 731 | one of them are deleted. If point is on an isolated blank line, then it |
| 724 | is deleted. If point is on a nonblank line, the command deletes all | 732 | is deleted. If point is on a nonblank line, the command deletes all |
| 725 | blank lines following it. | 733 | blank lines immediately following it. |
| 726 | 734 | ||
| 727 | A blank line is defined as a line containing only tabs and spaces. | 735 | A blank line is defined as a line containing only tabs and spaces. |
| 728 | 736 | ||
| @@ -771,7 +779,7 @@ would be difficult to change the terminology now. | |||
| 771 | * Yanking:: How yanking is done. | 779 | * Yanking:: How yanking is done. |
| 772 | * Yank Commands:: Commands that access the kill ring. | 780 | * Yank Commands:: Commands that access the kill ring. |
| 773 | * Low-Level Kill Ring:: Functions and variables for kill ring access. | 781 | * Low-Level Kill Ring:: Functions and variables for kill ring access. |
| 774 | * Internals of Kill Ring:: Variables that hold kill-ring data. | 782 | * Internals of Kill Ring:: Variables that hold kill ring data. |
| 775 | @end menu | 783 | @end menu |
| 776 | 784 | ||
| 777 | @node Kill Ring Concepts | 785 | @node Kill Ring Concepts |
| @@ -791,7 +799,7 @@ new entry automatically deletes the last entry. | |||
| 791 | 799 | ||
| 792 | When kill commands are interwoven with other commands, each kill | 800 | When kill commands are interwoven with other commands, each kill |
| 793 | command makes a new entry in the kill ring. Multiple kill commands in | 801 | command makes a new entry in the kill ring. Multiple kill commands in |
| 794 | succession build up a single kill-ring entry, which would be yanked as a | 802 | succession build up a single kill ring entry, which would be yanked as a |
| 795 | unit; the second and subsequent consecutive kill commands add text to | 803 | unit; the second and subsequent consecutive kill commands add text to |
| 796 | the entry made by the first one. | 804 | the entry made by the first one. |
| 797 | 805 | ||
| @@ -828,8 +836,10 @@ This is convenient because it lets the user use a series of kill | |||
| 828 | commands to copy text from a read-only buffer into the kill ring. | 836 | commands to copy text from a read-only buffer into the kill ring. |
| 829 | 837 | ||
| 830 | If @var{yank-handler} is non-@code{nil}, this puts that value onto | 838 | If @var{yank-handler} is non-@code{nil}, this puts that value onto |
| 831 | the string of killed text, as a @code{yank-handler} property. | 839 | the string of killed text, as a @code{yank-handler} text property. |
| 832 | @xref{Yanking}. | 840 | @xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, any |
| 841 | @code{yank-handler} properties present on the killed text are copied | ||
| 842 | onto the kill ring, like other text properties. | ||
| 833 | @end deffn | 843 | @end deffn |
| 834 | 844 | ||
| 835 | @defopt kill-read-only-ok | 845 | @defopt kill-read-only-ok |
| @@ -841,9 +851,7 @@ updating the kill ring but not changing the buffer. | |||
| 841 | @deffn Command copy-region-as-kill start end | 851 | @deffn Command copy-region-as-kill start end |
| 842 | This command saves the region defined by @var{start} and @var{end} on | 852 | This command saves the region defined by @var{start} and @var{end} on |
| 843 | the kill ring (including text properties), but does not delete the text | 853 | the kill ring (including text properties), but does not delete the text |
| 844 | from the buffer. It returns @code{nil}. It also indicates the extent | 854 | from the buffer. It returns @code{nil}. |
| 845 | of the text copied by moving the cursor momentarily, or by displaying a | ||
| 846 | message in the echo area. | ||
| 847 | 855 | ||
| 848 | The command does not set @code{this-command} to @code{kill-region}, so a | 856 | The command does not set @code{this-command} to @code{kill-region}, so a |
| 849 | subsequent kill command does not append to the same kill ring entry. | 857 | subsequent kill command does not append to the same kill ring entry. |
| @@ -865,9 +873,9 @@ text that they copy into the buffer. | |||
| 865 | @defun insert-for-yank string | 873 | @defun insert-for-yank string |
| 866 | This function normally works like @code{insert} except that it doesn't | 874 | This function normally works like @code{insert} except that it doesn't |
| 867 | insert the text properties in the @code{yank-excluded-properties} | 875 | insert the text properties in the @code{yank-excluded-properties} |
| 868 | list. However, if the first character of @var{string} has a | 876 | list. However, if any part of @var{string} has a non-@code{nil} |
| 869 | non-@code{nil}@code{yank-handler} text property, that property | 877 | @code{yank-handler} text property, that property can do various |
| 870 | can do various special processing on the text being inserted. | 878 | special processing on that part of the text being inserted. |
| 871 | @end defun | 879 | @end defun |
| 872 | 880 | ||
| 873 | @defun insert-buffer-substring-as-yank buf &optional start end | 881 | @defun insert-buffer-substring-as-yank buf &optional start end |
| @@ -876,12 +884,11 @@ doesn't insert the text properties in the | |||
| 876 | @code{yank-excluded-properties} list. | 884 | @code{yank-excluded-properties} list. |
| 877 | @end defun | 885 | @end defun |
| 878 | 886 | ||
| 879 | You can put a @code{yank-handler} text property on the text to | 887 | You can put a @code{yank-handler} text property on all or part of |
| 880 | control how it will be inserted if it is yanked. The | 888 | the text to control how it will be inserted if it is yanked. The |
| 881 | @code{insert-for-yank} function looks for a @code{yank-handler} | 889 | @code{insert-for-yank} function looks for that property. The property |
| 882 | property on the first character in its @var{string} argument. The | 890 | value must be a list of one to four elements, with the following |
| 883 | property value must be a list of one to four elements, with the | 891 | format (where elements after the first may be omitted): |
| 884 | following format (where elements after the first may be omitted): | ||
| 885 | 892 | ||
| 886 | @example | 893 | @example |
| 887 | (@var{function} @var{param} @var{noexclude} @var{undo}) | 894 | (@var{function} @var{param} @var{noexclude} @var{undo}) |
| @@ -891,15 +898,16 @@ following format (where elements after the first may be omitted): | |||
| 891 | 898 | ||
| 892 | @table @var | 899 | @table @var |
| 893 | @item function | 900 | @item function |
| 894 | When @var{function} is present and non-nil, it is called instead of | 901 | When @var{function} is present and non-@code{nil}, it is called instead of |
| 895 | @code{insert} to insert the string. @var{function} takes one | 902 | @code{insert} to insert the string. @var{function} takes one |
| 896 | argument---the string to insert. | 903 | argument---the string to insert. |
| 897 | 904 | ||
| 898 | @item param | 905 | @item param |
| 899 | If @var{param} is present and non-@code{nil}, it replaces @var{string} | 906 | If @var{param} is present and non-@code{nil}, it replaces @var{string} |
| 900 | as the object passed to @var{function} (or @code{insert}); for | 907 | (or the part of @var{string} being processed) as the object passed to |
| 901 | example, if @var{function} is @code{yank-rectangle}, @var{param} | 908 | @var{function} (or @code{insert}); for example, if @var{function} is |
| 902 | should be a list of strings to insert as a rectangle. | 909 | @code{yank-rectangle}, @var{param} should be a list of strings to |
| 910 | insert as a rectangle. | ||
| 903 | 911 | ||
| 904 | @item noexclude | 912 | @item noexclude |
| 905 | If @var{noexclude} is present and non-@code{nil}, the normal removal of the | 913 | If @var{noexclude} is present and non-@code{nil}, the normal removal of the |
| @@ -908,7 +916,7 @@ responsible for removing those properties. This may be necessary | |||
| 908 | if @var{function} adjusts point before or after inserting the object. | 916 | if @var{function} adjusts point before or after inserting the object. |
| 909 | 917 | ||
| 910 | @item undo | 918 | @item undo |
| 911 | If @var{undo} is present and non-nil, it is a function that will be | 919 | If @var{undo} is present and non-@code{nil}, it is a function that will be |
| 912 | called by @code{yank-pop} to undo the insertion of the current object. | 920 | called by @code{yank-pop} to undo the insertion of the current object. |
| 913 | It is called with two arguments, the start and end of the current | 921 | It is called with two arguments, the start and end of the current |
| 914 | region. @var{function} can set @code{yank-undo-function} to override | 922 | region. @var{function} can set @code{yank-undo-function} to override |
| @@ -924,23 +932,29 @@ from the kill ring. The text properties are copied too. | |||
| 924 | 932 | ||
| 925 | @deffn Command yank &optional arg | 933 | @deffn Command yank &optional arg |
| 926 | @cindex inserting killed text | 934 | @cindex inserting killed text |
| 927 | This command inserts before point the text in the first entry in the | 935 | This command inserts before point the text at the front of the |
| 928 | kill ring. It positions the mark at the beginning of that text, and | 936 | kill ring. It positions the mark at the beginning of that text, and |
| 929 | point at the end. | 937 | point at the end. |
| 930 | 938 | ||
| 931 | If @var{arg} is a list (which occurs interactively when the user | 939 | If @var{arg} is a non-@code{nil} list (which occurs interactively when |
| 932 | types @kbd{C-u} with no digits), then @code{yank} inserts the text as | 940 | the user types @kbd{C-u} with no digits), then @code{yank} inserts the |
| 933 | described above, but puts point before the yanked text and puts the mark | 941 | text as described above, but puts point before the yanked text and |
| 934 | after it. | 942 | puts the mark after it. |
| 935 | 943 | ||
| 936 | If @var{arg} is a number, then @code{yank} inserts the @var{arg}th most | 944 | If @var{arg} is a number, then @code{yank} inserts the @var{arg}th |
| 937 | recently killed text---the @var{arg}th element of the kill ring list. | 945 | most recently killed text---the @var{arg}th element of the kill ring |
| 946 | list, counted cyclically from the front, which is considered the | ||
| 947 | first element for this purpose. | ||
| 938 | 948 | ||
| 939 | @code{yank} does not alter the contents of the kill ring or rotate it. | 949 | @code{yank} does not alter the contents of the kill ring, unless it |
| 940 | It returns @code{nil}. | 950 | used text provided by another program, in which case it pushes that text |
| 951 | onto the kill ring. However if @var{arg} is an integer different from | ||
| 952 | one, it rotates the kill ring to place the yanked string at the front. | ||
| 953 | |||
| 954 | @code{yank} returns @code{nil}. | ||
| 941 | @end deffn | 955 | @end deffn |
| 942 | 956 | ||
| 943 | @deffn Command yank-pop arg | 957 | @deffn Command yank-pop &optional arg |
| 944 | This command replaces the just-yanked entry from the kill ring with a | 958 | This command replaces the just-yanked entry from the kill ring with a |
| 945 | different entry from the kill ring. | 959 | different entry from the kill ring. |
| 946 | 960 | ||
| @@ -949,6 +963,8 @@ This is allowed only immediately after a @code{yank} or another | |||
| 949 | inserted by yanking. @code{yank-pop} deletes that text and inserts in | 963 | inserted by yanking. @code{yank-pop} deletes that text and inserts in |
| 950 | its place a different piece of killed text. It does not add the deleted | 964 | its place a different piece of killed text. It does not add the deleted |
| 951 | text to the kill ring, since it is already in the kill ring somewhere. | 965 | text to the kill ring, since it is already in the kill ring somewhere. |
| 966 | It does however rotate the kill ring to place the newly yanked string at | ||
| 967 | the front. | ||
| 952 | 968 | ||
| 953 | If @var{arg} is @code{nil}, then the replacement text is the previous | 969 | If @var{arg} is @code{nil}, then the replacement text is the previous |
| 954 | element of the kill ring. If @var{arg} is numeric, the replacement is | 970 | element of the kill ring. If @var{arg} is numeric, the replacement is |
| @@ -966,7 +982,8 @@ The return value is always @code{nil}. | |||
| 966 | If this variable is non-@code{nil}, the function @code{yank-pop} uses | 982 | If this variable is non-@code{nil}, the function @code{yank-pop} uses |
| 967 | its value instead of @code{delete-region} to delete the text | 983 | its value instead of @code{delete-region} to delete the text |
| 968 | inserted by the previous @code{yank} or | 984 | inserted by the previous @code{yank} or |
| 969 | @code{yank-pop} command. | 985 | @code{yank-pop} command. The value must be a function of two |
| 986 | arguments, the start and end of the current region. | ||
| 970 | 987 | ||
| 971 | The function @code{insert-for-yank} automatically sets this variable | 988 | The function @code{insert-for-yank} automatically sets this variable |
| 972 | according to the @var{undo} element of the @code{yank-handler} | 989 | according to the @var{undo} element of the @code{yank-handler} |
| @@ -992,27 +1009,44 @@ returns the @var{n}th kill, counting from the current yanking pointer. | |||
| 992 | 1009 | ||
| 993 | If @var{n} is zero, indicating a request for the latest kill, | 1010 | If @var{n} is zero, indicating a request for the latest kill, |
| 994 | @code{current-kill} calls the value of | 1011 | @code{current-kill} calls the value of |
| 995 | @code{interprogram-paste-function} (documented below) before consulting | 1012 | @code{interprogram-paste-function} (documented below) before |
| 996 | the kill ring. | 1013 | consulting the kill ring. If that value is a function and calling it |
| 997 | @end defun | 1014 | returns a string, @code{current-kill} pushes that string onto the kill |
| 998 | 1015 | ring and returns it. It also sets the yanking pointer to point to | |
| 999 | @defun kill-new string &optional yank-handler | 1016 | that new entry, regardless of the value of @var{do-not-move}. |
| 1000 | This function puts the text @var{string} into the kill ring as a new | 1017 | Otherwise, @code{current-kill} does not treat a zero value for @var{n} |
| 1001 | entry at the front of the ring. It discards the oldest entry if | 1018 | specially: it returns the entry pointed at by the yanking pointer and |
| 1002 | appropriate. It also invokes the value of | 1019 | does not move the yanking pointer. |
| 1020 | @end defun | ||
| 1021 | |||
| 1022 | @defun kill-new string &optional replace yank-handler | ||
| 1023 | This function pushes the text @var{string} onto the kill ring and | ||
| 1024 | makes the yanking pointer point to it. It discards the oldest entry | ||
| 1025 | if appropriate. It also invokes the value of | ||
| 1003 | @code{interprogram-cut-function} (see below). | 1026 | @code{interprogram-cut-function} (see below). |
| 1004 | 1027 | ||
| 1028 | If @var{replace} is non-@code{nil}, then @code{kill-new} replaces the | ||
| 1029 | first element of the kill ring with @var{string}, rather than pushing | ||
| 1030 | @var{string} onto the kill ring. | ||
| 1031 | |||
| 1005 | If @var{yank-handler} is non-@code{nil}, this puts that value onto | 1032 | If @var{yank-handler} is non-@code{nil}, this puts that value onto |
| 1006 | the string of killed text, as a @code{yank-handler} property. | 1033 | the string of killed text, as a @code{yank-handler} property. |
| 1007 | @xref{Yanking}. | 1034 | @xref{Yanking}. Note that if @var{yank-handler} is @code{nil}, then |
| 1035 | @code{kill-new} copies any @code{yank-handler} properties present on | ||
| 1036 | @var{string} onto the kill ring, as it does with other text properties. | ||
| 1008 | @end defun | 1037 | @end defun |
| 1009 | 1038 | ||
| 1010 | @defun kill-append string before-p &optional yank-handler | 1039 | @defun kill-append string before-p &optional yank-handler |
| 1011 | This function appends the text @var{string} to the first entry in the | 1040 | This function appends the text @var{string} to the first entry in the |
| 1012 | kill ring. Normally @var{string} goes at the end of the entry, but if | 1041 | kill ring and makes the yanking pointer point to the combined entry. |
| 1042 | Normally @var{string} goes at the end of the entry, but if | ||
| 1013 | @var{before-p} is non-@code{nil}, it goes at the beginning. This | 1043 | @var{before-p} is non-@code{nil}, it goes at the beginning. This |
| 1014 | function also invokes the value of @code{interprogram-cut-function} (see | 1044 | function also invokes the value of @code{interprogram-cut-function} |
| 1015 | below). This handles @var{yank-handler} just like @code{kill-new}. | 1045 | (see below). This handles @var{yank-handler} just like |
| 1046 | @code{kill-new}, except that if @var{yank-handler} is different from | ||
| 1047 | the @code{yank-handler} property of the first entry of the kill ring, | ||
| 1048 | @code{kill-append} pushes the concatenated string onto the kill ring, | ||
| 1049 | instead of replacing the original first entry with it. | ||
| 1016 | @end defun | 1050 | @end defun |
| 1017 | 1051 | ||
| 1018 | @defvar interprogram-paste-function | 1052 | @defvar interprogram-paste-function |
| @@ -1023,7 +1057,7 @@ programs, when you are using a window system. Its value should be | |||
| 1023 | If the value is a function, @code{current-kill} calls it to get the | 1057 | If the value is a function, @code{current-kill} calls it to get the |
| 1024 | ``most recent kill''. If the function returns a non-@code{nil} value, | 1058 | ``most recent kill''. If the function returns a non-@code{nil} value, |
| 1025 | then that value is used as the ``most recent kill''. If it returns | 1059 | then that value is used as the ``most recent kill''. If it returns |
| 1026 | @code{nil}, then the first element of @code{kill-ring} is used. | 1060 | @code{nil}, then the front of the kill ring is used. |
| 1027 | 1061 | ||
| 1028 | The normal use of this hook is to get the window system's primary | 1062 | The normal use of this hook is to get the window system's primary |
| 1029 | selection as the most recent kill, even if the selection belongs to | 1063 | selection as the most recent kill, even if the selection belongs to |
| @@ -1033,13 +1067,17 @@ another application. @xref{Window System Selections}. | |||
| 1033 | @defvar interprogram-cut-function | 1067 | @defvar interprogram-cut-function |
| 1034 | This variable provides a way of communicating killed text to other | 1068 | This variable provides a way of communicating killed text to other |
| 1035 | programs, when you are using a window system. Its value should be | 1069 | programs, when you are using a window system. Its value should be |
| 1036 | @code{nil} or a function of one argument. | 1070 | @code{nil} or a function of one required and one optional argument. |
| 1037 | 1071 | ||
| 1038 | If the value is a function, @code{kill-new} and @code{kill-append} call | 1072 | If the value is a function, @code{kill-new} and @code{kill-append} call |
| 1039 | it with the new first element of the kill ring as an argument. | 1073 | it with the new first element of the kill ring as the first argument. |
| 1074 | The second, optional, argument has the same meaning as the @var{push} | ||
| 1075 | argument to @code{x-set-cut-buffer} (@pxref{Definition of | ||
| 1076 | x-set-cut-buffer}) and only affects the second and later cut buffers. | ||
| 1040 | 1077 | ||
| 1041 | The normal use of this hook is to set the window system's primary | 1078 | The normal use of this hook is to set the window system's primary |
| 1042 | selection from the newly killed text. @xref{Window System Selections}. | 1079 | selection (and first cut buffer) from the newly killed text. |
| 1080 | @xref{Window System Selections}. | ||
| 1043 | @end defvar | 1081 | @end defvar |
| 1044 | 1082 | ||
| 1045 | @node Internals of Kill Ring | 1083 | @node Internals of Kill Ring |
| @@ -1112,7 +1150,7 @@ that @kbd{C-y} should yank. | |||
| 1112 | @defopt kill-ring-max | 1150 | @defopt kill-ring-max |
| 1113 | The value of this variable is the maximum length to which the kill | 1151 | The value of this variable is the maximum length to which the kill |
| 1114 | ring can grow, before elements are thrown away at the end. The default | 1152 | ring can grow, before elements are thrown away at the end. The default |
| 1115 | value for @code{kill-ring-max} is 30. | 1153 | value for @code{kill-ring-max} is 60. |
| 1116 | @end defopt | 1154 | @end defopt |
| 1117 | 1155 | ||
| 1118 | @node Undo | 1156 | @node Undo |
| @@ -1149,7 +1187,9 @@ buffer. | |||
| 1149 | @item (@var{text} . @var{position}) | 1187 | @item (@var{text} . @var{position}) |
| 1150 | This kind of element indicates how to reinsert text that was deleted. | 1188 | This kind of element indicates how to reinsert text that was deleted. |
| 1151 | The deleted text itself is the string @var{text}. The place to | 1189 | The deleted text itself is the string @var{text}. The place to |
| 1152 | reinsert it is @code{(abs @var{position})}. | 1190 | reinsert it is @code{(abs @var{position})}. If @var{position} is |
| 1191 | positive, point was at the beginning of the deleted text, otherwise it | ||
| 1192 | was at the end. | ||
| 1153 | 1193 | ||
| 1154 | @item (t @var{high} . @var{low}) | 1194 | @item (t @var{high} . @var{low}) |
| 1155 | This kind of element indicates that an unmodified buffer became | 1195 | This kind of element indicates that an unmodified buffer became |
| @@ -1241,13 +1281,13 @@ In an interactive call, @var{buffer-or-name} is the current buffer. | |||
| 1241 | You cannot specify any other buffer. | 1281 | You cannot specify any other buffer. |
| 1242 | @end deffn | 1282 | @end deffn |
| 1243 | 1283 | ||
| 1244 | @deffn Command buffer-disable-undo &optional buffer | 1284 | @deffn Command buffer-disable-undo &optional buffer-or-name |
| 1245 | @deffnx Command buffer-flush-undo &optional buffer | 1285 | @deffnx Command buffer-flush-undo &optional buffer-or-name |
| 1246 | @cindex disable undo | 1286 | @cindex disable undo |
| 1247 | This function discards the undo list of @var{buffer}, and disables | 1287 | This function discards the undo list of @var{buffer-or-name}, and disables |
| 1248 | further recording of undo information. As a result, it is no longer | 1288 | further recording of undo information. As a result, it is no longer |
| 1249 | possible to undo either previous changes or any subsequent changes. If | 1289 | possible to undo either previous changes or any subsequent changes. If |
| 1250 | the undo list of @var{buffer} is already disabled, this function | 1290 | the undo list of @var{buffer-or-name} is already disabled, this function |
| 1251 | has no effect. | 1291 | has no effect. |
| 1252 | 1292 | ||
| 1253 | This function returns @code{nil}. | 1293 | This function returns @code{nil}. |
| @@ -3935,7 +3975,7 @@ changed text, its length is simply the difference between the first two | |||
| 3935 | arguments. | 3975 | arguments. |
| 3936 | @end defvar | 3976 | @end defvar |
| 3937 | 3977 | ||
| 3938 | Output of messges into the @samp{*Messages*} buffer does not | 3978 | Output of messages into the @samp{*Messages*} buffer does not |
| 3939 | call these functions. | 3979 | call these functions. |
| 3940 | 3980 | ||
| 3941 | @defmac combine-after-change-calls body... | 3981 | @defmac combine-after-change-calls body... |
diff --git a/lispref/tips.texi b/lispref/tips.texi index e917a90b0e4..18d62e9f458 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -538,7 +538,7 @@ important arguments. | |||
| 538 | 538 | ||
| 539 | @item | 539 | @item |
| 540 | For consistency, phrase the verb in the first sentence of a function's | 540 | For consistency, phrase the verb in the first sentence of a function's |
| 541 | documentation string as an imperative--for instance, use ``Return the | 541 | documentation string as an imperative---for instance, use ``Return the |
| 542 | cons of A and B.'' in preference to ``Returns the cons of A and B@.'' | 542 | cons of A and B.'' in preference to ``Returns the cons of A and B@.'' |
| 543 | Usually it looks good to do likewise for the rest of the first | 543 | Usually it looks good to do likewise for the rest of the first |
| 544 | paragraph. Subsequent paragraphs usually look better if each sentence | 544 | paragraph. Subsequent paragraphs usually look better if each sentence |
diff --git a/man/ChangeLog b/man/ChangeLog index 02c2aed55a9..9d95b6bae45 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2004-02-23 Nick Roberts <nick@nick.uklinux.net> | ||
| 2 | |||
| 3 | * building.texi (Watch Expressions): Update. | ||
| 4 | |||
| 5 | 2004-02-21 Juri Linkov <juri@jurta.org> | ||
| 6 | |||
| 7 | * cmdargs.texi (Action Arguments): Add alias --find-file. Add | ||
| 8 | --directory, --help, --version. Move text about command-line-args | ||
| 9 | to Command Arguments. | ||
| 10 | (Initial Options): Remove alias -batch. Add @cindex for --script. | ||
| 11 | Fix @cindex for -q. Add --no-desktop. Add alias --no-multibyte, | ||
| 12 | --no-unibyte. | ||
| 13 | (Window Size X): Join -g and --geometry. Add @cindex. | ||
| 14 | (Borders X): Fix @cindex for -ib. Add @cindex for -bw. | ||
| 15 | (Title X): Remove alias -title. | ||
| 16 | (Icons X): Remove alias -iconic. | ||
| 17 | (Misc X): New node. | ||
| 18 | |||
| 1 | 2004-02-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 19 | 2004-02-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 20 | ||
| 3 | * frames.texi (Drag and drop): Add Motif to list of supported | 21 | * frames.texi (Drag and drop): Add Motif to list of supported |
diff --git a/man/building.texi b/man/building.texi index 1613357684d..2985a04895c 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -705,7 +705,7 @@ on the tag to the left of the expression. | |||
| 705 | @kindex RET @r{(GDB speedbar)} | 705 | @kindex RET @r{(GDB speedbar)} |
| 706 | @findex gdb-var-delete | 706 | @findex gdb-var-delete |
| 707 | With the cursor over the root expression of a complex data type, type | 707 | With the cursor over the root expression of a complex data type, type |
| 708 | @key{RET} or click @kbd{Mouse-2} to delete it from the speedbar | 708 | @key{D} to delete it from the speedbar |
| 709 | (@code{gdb-var-delete}). | 709 | (@code{gdb-var-delete}). |
| 710 | 710 | ||
| 711 | @findex gdb-edit-value | 711 | @findex gdb-edit-value |
| @@ -714,13 +714,16 @@ data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit | |||
| 714 | its value. A prompt for a new value appears in the mini-buffer | 714 | its value. A prompt for a new value appears in the mini-buffer |
| 715 | (@code{gdb-edit-value}). | 715 | (@code{gdb-edit-value}). |
| 716 | 716 | ||
| 717 | If you set the variable @code{gdb-show-changed-values} to a | 717 | If you set the variable @code{gdb-show-changed-values} to |
| 718 | non-@code{nil} value, then Emacs will use font-lock-warning-face to | 718 | non-@code{nil} (the default value), then Emacs will use |
| 719 | display values that have recently changed in the speedbar. | 719 | font-lock-warning-face to display values that have recently changed in |
| 720 | the speedbar. | ||
| 720 | 721 | ||
| 721 | If you set the variable @code{gdb-use-colon-colon-notation} to a | 722 | If you set the variable @code{gdb-use-colon-colon-notation} to a |
| 722 | non-@code{nil} value, then, in C, Emacs will use the | 723 | non-@code{nil} value, then, in C, Emacs will use the |
| 723 | FUNCTION::VARIABLE format to display variables in the speedbar. | 724 | FUNCTION::VARIABLE format to display variables in the speedbar. |
| 725 | Since this does not work for variables defined in compound statements, | ||
| 726 | the default value is @code{nil}. | ||
| 724 | 727 | ||
| 725 | @node Other Buffers | 728 | @node Other Buffers |
| 726 | @subsubsection Other Buffers | 729 | @subsubsection Other Buffers |
diff --git a/man/cmdargs.texi b/man/cmdargs.texi index b273fb15bf9..3daf96f0d00 100644 --- a/man/cmdargs.texi +++ b/man/cmdargs.texi | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 1985,86,87,93,94,95,1997,2001, 2003 Free Software Foundation, Inc. | 2 | @c Copyright (C) 1985,86,87,93,94,95,97,2001,03,2004 Free Software Foundation, Inc. |
| 3 | @c See file emacs.texi for copying conditions. | 3 | @c See file emacs.texi for copying conditions. |
| 4 | @node Command Arguments, X Resources, Service, Top | 4 | @node Command Arguments, X Resources, Service, Top |
| 5 | @appendix Command Line Arguments | 5 | @appendix Command Line Arguments |
| @@ -46,27 +46,33 @@ and the tables below always show an equal sign. | |||
| 46 | 46 | ||
| 47 | @cindex initial options (command line) | 47 | @cindex initial options (command line) |
| 48 | @cindex action options (command line) | 48 | @cindex action options (command line) |
| 49 | @vindex command-line-args | ||
| 49 | Most options specify how to initialize Emacs, or set parameters for | 50 | Most options specify how to initialize Emacs, or set parameters for |
| 50 | the Emacs session. We call them @dfn{initial options}. A few options | 51 | the Emacs session. We call them @dfn{initial options}. A few options |
| 51 | specify things to do: for example, load libraries, call functions, or | 52 | specify things to do: for example, load libraries, call functions, or |
| 52 | terminate Emacs. These are called @dfn{action options}. These and file | 53 | terminate Emacs. These are called @dfn{action options}. These and file |
| 53 | names together are called @dfn{action arguments}. Emacs processes all | 54 | names together are called @dfn{action arguments}. Emacs processes all |
| 54 | the action arguments in the order they are written. | 55 | the action arguments in the order they are written. The @file{.emacs} file |
| 56 | can access the values of the action arguments as the elements of a list in | ||
| 57 | the variable @code{command-line-args}. | ||
| 58 | |||
| 59 | |||
| 55 | 60 | ||
| 56 | @menu | 61 | @menu |
| 57 | * Action Arguments:: Arguments to visit files, load libraries, | 62 | * Action Arguments:: Arguments to visit files, load libraries, |
| 58 | and call functions. | 63 | and call functions. |
| 59 | * Initial Options:: Arguments that take effect while starting Emacs. | 64 | * Initial Options:: Arguments that take effect while starting Emacs. |
| 60 | * Command Example:: Examples of using command line arguments. | 65 | * Command Example:: Examples of using command line arguments. |
| 61 | * Resume Arguments:: Specifying arguments when you resume a running Emacs. | 66 | * Resume Arguments:: Specifying arguments when you resume a running Emacs. |
| 62 | * Environment:: Environment variables that Emacs uses. | 67 | * Environment:: Environment variables that Emacs uses. |
| 63 | * Display X:: Changing the default display and using remote login. | 68 | * Display X:: Changing the default display and using remote login. |
| 64 | * Font X:: Choosing a font for text, under X. | 69 | * Font X:: Choosing a font for text, under X. |
| 65 | * Colors:: Choosing display colors. | 70 | * Colors:: Choosing display colors. |
| 66 | * Window Size X:: Start-up window size, under X. | 71 | * Window Size X:: Start-up window size, under X. |
| 67 | * Borders X:: Internal and external borders, under X. | 72 | * Borders X:: Internal and external borders, under X. |
| 68 | * Title X:: Specifying the initial frame's title. | 73 | * Title X:: Specifying the initial frame's title. |
| 69 | * Icons X:: Choosing what sort of icon to use, under X. | 74 | * Icons X:: Choosing what sort of icon to use, under X. |
| 75 | * Misc X:: Other display options. | ||
| 70 | @end menu | 76 | @end menu |
| 71 | 77 | ||
| 72 | @node Action Arguments | 78 | @node Action Arguments |
| @@ -76,10 +82,12 @@ the action arguments in the order they are written. | |||
| 76 | 82 | ||
| 77 | @table @samp | 83 | @table @samp |
| 78 | @item @var{file} | 84 | @item @var{file} |
| 79 | @opindex --visit | ||
| 80 | @itemx --visit=@var{file} | ||
| 81 | @opindex --file | 85 | @opindex --file |
| 82 | @itemx --file=@var{file} | 86 | @itemx --file=@var{file} |
| 87 | @opindex --find-file | ||
| 88 | @itemx --find-file=@var{file} | ||
| 89 | @opindex --visit | ||
| 90 | @itemx --visit=@var{file} | ||
| 83 | @cindex visiting files, command-line argument | 91 | @cindex visiting files, command-line argument |
| 84 | @vindex inhibit-startup-buffer-menu | 92 | @vindex inhibit-startup-buffer-menu |
| 85 | Visit @var{file} using @code{find-file}. @xref{Visiting}. | 93 | Visit @var{file} using @code{find-file}. @xref{Visiting}. |
| @@ -107,6 +115,12 @@ Load a Lisp library named @var{file} with the function @code{load}. | |||
| 107 | directory, or in the Emacs library search path as specified | 115 | directory, or in the Emacs library search path as specified |
| 108 | with @env{EMACSLOADPATH} (@pxref{General Variables}). | 116 | with @env{EMACSLOADPATH} (@pxref{General Variables}). |
| 109 | 117 | ||
| 118 | @item -L @var{dir} | ||
| 119 | @opindex -L | ||
| 120 | @itemx --directory=@var{dir} | ||
| 121 | @opindex --directory | ||
| 122 | Add directory @var{dir} to the variable @code{load-path}. | ||
| 123 | |||
| 110 | @item -f @var{function} | 124 | @item -f @var{function} |
| 111 | @opindex -f | 125 | @opindex -f |
| 112 | @itemx --funcall=@var{function} | 126 | @itemx --funcall=@var{function} |
| @@ -133,13 +147,16 @@ what @kbd{M-x insert-file} does. @xref{Misc File Ops}. | |||
| 133 | @item --kill | 147 | @item --kill |
| 134 | @opindex --kill | 148 | @opindex --kill |
| 135 | Exit from Emacs without asking for confirmation. | 149 | Exit from Emacs without asking for confirmation. |
| 136 | @end table | ||
| 137 | 150 | ||
| 138 | @vindex command-line-args | 151 | @item --help |
| 139 | The init file can access the values of the action arguments as the | 152 | @opindex --help |
| 140 | elements of a list in the variable @code{command-line-args}. The init | 153 | Print a usage message listing all available options, then exit |
| 141 | file can override the normal processing of the action arguments, or | 154 | successfully. |
| 142 | define new ones, by reading and setting this variable. | 155 | |
| 156 | @item --version | ||
| 157 | @opindex --version | ||
| 158 | Print Emacs version, then exit successfully. | ||
| 159 | @end table | ||
| 143 | 160 | ||
| 144 | @node Initial Options | 161 | @node Initial Options |
| 145 | @appendixsec Initial Options | 162 | @appendixsec Initial Options |
| @@ -162,6 +179,7 @@ of these files or substitute other files for them. | |||
| 162 | @opindex --terminal | 179 | @opindex --terminal |
| 163 | @cindex device for Emacs terminal I/O | 180 | @cindex device for Emacs terminal I/O |
| 164 | Use @var{device} as the device for terminal input and output. | 181 | Use @var{device} as the device for terminal input and output. |
| 182 | @samp{--terminal} implies @samp{--no-window-system}. | ||
| 165 | 183 | ||
| 166 | @item -d @var{display} | 184 | @item -d @var{display} |
| 167 | @opindex -d | 185 | @opindex -d |
| @@ -205,6 +223,7 @@ been explicitly requested. | |||
| 205 | 223 | ||
| 206 | @item --script @var{file} | 224 | @item --script @var{file} |
| 207 | @opindex --script | 225 | @opindex --script |
| 226 | @cindex script mode | ||
| 208 | Run Emacs in batch mode, like @samp{--batch}, and then read and | 227 | Run Emacs in batch mode, like @samp{--batch}, and then read and |
| 209 | execute the Lisp code in @var{file}. | 228 | execute the Lisp code in @var{file}. |
| 210 | 229 | ||
| @@ -224,11 +243,12 @@ comment delimiter. | |||
| 224 | @opindex -q | 243 | @opindex -q |
| 225 | @itemx --no-init-file | 244 | @itemx --no-init-file |
| 226 | @opindex --no-init-file | 245 | @opindex --no-init-file |
| 227 | @cindex bypassing init and site-start file | 246 | @cindex bypassing init and @file{default.el} file |
| 228 | @cindex init file, not loading | 247 | @cindex init file, not loading |
| 229 | @cindex @file{default.el} file, not loading | 248 | @cindex @file{default.el} file, not loading |
| 230 | Do not load your Emacs init file @file{~/.emacs}, or @file{default.el} | 249 | Do not load your Emacs init file @file{~/.emacs}, or @file{default.el} |
| 231 | either. When invoked like this, Emacs does not allow saving options | 250 | either. Regardless of this switch, @file{site-start.el} is still loaded. |
| 251 | When invoked like this, Emacs does not allow saving options | ||
| 232 | changed with the @kbd{M-x customize} command and its variants. | 252 | changed with the @kbd{M-x customize} command and its variants. |
| 233 | @xref{Easy Customization}. | 253 | @xref{Easy Customization}. |
| 234 | 254 | ||
| @@ -236,7 +256,7 @@ changed with the @kbd{M-x customize} command and its variants. | |||
| 236 | @opindex --no-site-file | 256 | @opindex --no-site-file |
| 237 | @cindex @file{site-start.el} file, not loading | 257 | @cindex @file{site-start.el} file, not loading |
| 238 | Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u} | 258 | Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u} |
| 239 | and @samp{-batch} have no effect on the loading of this file---this is | 259 | and @samp{--batch} have no effect on the loading of this file---this is |
| 240 | the only option that blocks it. | 260 | the only option that blocks it. |
| 241 | 261 | ||
| 242 | @item --no-splash | 262 | @item --no-splash |
| @@ -245,6 +265,10 @@ the only option that blocks it. | |||
| 245 | Do not display a splash screen on startup; this is equivalent to | 265 | Do not display a splash screen on startup; this is equivalent to |
| 246 | setting the variable @code{inhibit-startup-message} to non-@code{nil}. | 266 | setting the variable @code{inhibit-startup-message} to non-@code{nil}. |
| 247 | 267 | ||
| 268 | @item --no-desktop | ||
| 269 | @opindex --no-desktop | ||
| 270 | Do not reload any saved desktop. @xref{Saving Emacs Sessions}. | ||
| 271 | |||
| 248 | @item -u @var{user} | 272 | @item -u @var{user} |
| 249 | @opindex -u | 273 | @opindex -u |
| 250 | @itemx --user=@var{user} | 274 | @itemx --user=@var{user} |
| @@ -260,6 +284,8 @@ Enable the Emacs Lisp debugger for errors in the init file. | |||
| 260 | 284 | ||
| 261 | @item --unibyte | 285 | @item --unibyte |
| 262 | @opindex --unibyte | 286 | @opindex --unibyte |
| 287 | @itemx --no-multibyte | ||
| 288 | @opindex --no-multibyte | ||
| 263 | @cindex unibyte operation, command-line argument | 289 | @cindex unibyte operation, command-line argument |
| 264 | Do almost everything with single-byte buffers and strings. | 290 | Do almost everything with single-byte buffers and strings. |
| 265 | All buffers and strings are unibyte unless you (or a Lisp program) | 291 | All buffers and strings are unibyte unless you (or a Lisp program) |
| @@ -270,6 +296,8 @@ variable @env{EMACS_UNIBYTE} has the same effect. | |||
| 270 | 296 | ||
| 271 | @item --multibyte | 297 | @item --multibyte |
| 272 | @opindex --multibyte | 298 | @opindex --multibyte |
| 299 | @itemx --no-unibyte | ||
| 300 | @opindex --no-unibyte | ||
| 273 | Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs | 301 | Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs |
| 274 | uses multibyte characters by default, as usual. | 302 | uses multibyte characters by default, as usual. |
| 275 | @end table | 303 | @end table |
| @@ -290,7 +318,7 @@ emacs -batch foo.c -l hack-c -f save-buffer >& log | |||
| 290 | This says to visit @file{foo.c}, load @file{hack-c.el} (which makes | 318 | This says to visit @file{foo.c}, load @file{hack-c.el} (which makes |
| 291 | changes in the visited file), save @file{foo.c} (note that | 319 | changes in the visited file), save @file{foo.c} (note that |
| 292 | @code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and | 320 | @code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and |
| 293 | then exit back to the shell (because of @samp{-batch}). @samp{-batch} | 321 | then exit back to the shell (because of @samp{--batch}). @samp{--batch} |
| 294 | also guarantees there will be no problem redirecting output to | 322 | also guarantees there will be no problem redirecting output to |
| 295 | @file{log}, because Emacs will not assume that it has a display terminal | 323 | @file{log}, because Emacs will not assume that it has a display terminal |
| 296 | to work with. | 324 | to work with. |
| @@ -944,14 +972,13 @@ position of the initial Emacs frame: | |||
| 944 | @table @samp | 972 | @table @samp |
| 945 | @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} | 973 | @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} |
| 946 | @opindex -g | 974 | @opindex -g |
| 975 | @itemx --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} | ||
| 976 | @opindex --geometry | ||
| 977 | @cindex geometry, command-line argument | ||
| 947 | Specify the size @var{width} and @var{height} (measured in character | 978 | Specify the size @var{width} and @var{height} (measured in character |
| 948 | columns and lines), and positions @var{xoffset} and @var{yoffset} | 979 | columns and lines), and positions @var{xoffset} and @var{yoffset} |
| 949 | (measured in pixels). This applies to all frames. | 980 | (measured in pixels). This applies to all frames. |
| 950 | 981 | ||
| 951 | @item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} | ||
| 952 | @opindex --geometry | ||
| 953 | This is another way of writing the same thing. | ||
| 954 | |||
| 955 | @item -fs | 982 | @item -fs |
| 956 | @opindex -fs | 983 | @opindex -fs |
| 957 | @itemx --fullscreen | 984 | @itemx --fullscreen |
| @@ -1029,7 +1056,7 @@ specification assuming there is a tool bar, and then your | |||
| 1029 | @file{~/.emacs} file disables the tool bar, you will end up with a | 1056 | @file{~/.emacs} file disables the tool bar, you will end up with a |
| 1030 | frame geometry different from what you asked for. To get the intended | 1057 | frame geometry different from what you asked for. To get the intended |
| 1031 | size with no tool bar, use an X resource to specify ``no tool bar'' | 1058 | size with no tool bar, use an X resource to specify ``no tool bar'' |
| 1032 | (@pxref{Table of Resources});then Emacs will already know there's no | 1059 | (@pxref{Table of Resources}); then Emacs will already know there's no |
| 1033 | tool bar when it processes the specified geometry. | 1060 | tool bar when it processes the specified geometry. |
| 1034 | 1061 | ||
| 1035 | When using one of @samp{--fullscreen}, @samp{--fullwidth} or | 1062 | When using one of @samp{--fullscreen}, @samp{--fullwidth} or |
| @@ -1057,13 +1084,15 @@ you can click on to move or iconify the window. | |||
| 1057 | @opindex -ib | 1084 | @opindex -ib |
| 1058 | @itemx --internal-border=@var{width} | 1085 | @itemx --internal-border=@var{width} |
| 1059 | @opindex --internal-border | 1086 | @opindex --internal-border |
| 1060 | @cindex border width, command-line argument | 1087 | @cindex internal border width, command-line argument |
| 1061 | Specify @var{width} as the width of the internal border, in pixels. | 1088 | Specify @var{width} as the width of the internal border (between the text |
| 1089 | and the main border), in pixels. | ||
| 1062 | 1090 | ||
| 1063 | @item -bw @var{width} | 1091 | @item -bw @var{width} |
| 1064 | @opindex -bw | 1092 | @opindex -bw |
| 1065 | @itemx --border-width=@var{width} | 1093 | @itemx --border-width=@var{width} |
| 1066 | @opindex --border-width | 1094 | @opindex --border-width |
| 1095 | @cindex main border width, command-line argument | ||
| 1067 | Specify @var{width} as the width of the main border, in pixels. | 1096 | Specify @var{width} as the width of the main border, in pixels. |
| 1068 | @end table | 1097 | @end table |
| 1069 | 1098 | ||
| @@ -1091,11 +1120,10 @@ there is more than one frame). | |||
| 1091 | line option: | 1120 | line option: |
| 1092 | 1121 | ||
| 1093 | @table @samp | 1122 | @table @samp |
| 1094 | @item -title @var{title} | 1123 | @item -T @var{title} |
| 1095 | @opindex --title | ||
| 1096 | @itemx --title=@var{title} | ||
| 1097 | @itemx -T @var{title} | ||
| 1098 | @opindex -T | 1124 | @opindex -T |
| 1125 | @itemx --title=@var{title} | ||
| 1126 | @opindex --title | ||
| 1099 | @cindex frame title, command-line argument | 1127 | @cindex frame title, command-line argument |
| 1100 | Specify @var{title} as the title for the initial Emacs frame. | 1128 | Specify @var{title} as the title for the initial Emacs frame. |
| 1101 | @end table | 1129 | @end table |
| @@ -1138,6 +1166,35 @@ rather than showing a frame right away. In this situation, the icon | |||
| 1138 | is the only indication that Emacs has started; the text frame doesn't | 1166 | is the only indication that Emacs has started; the text frame doesn't |
| 1139 | appear until you deiconify it. | 1167 | appear until you deiconify it. |
| 1140 | 1168 | ||
| 1169 | @node Misc X | ||
| 1170 | @appendixsec Other Display Options | ||
| 1171 | |||
| 1172 | @table @samp | ||
| 1173 | @item -hb | ||
| 1174 | @opindex -hb | ||
| 1175 | @itemx --horizontal-scroll-bars | ||
| 1176 | @opindex --horizontal-scroll-bars | ||
| 1177 | @cindex horizontal scroll bars, command-line argument | ||
| 1178 | Enable horizontal scroll bars. | ||
| 1179 | |||
| 1180 | @item -vb | ||
| 1181 | @opindex -vb | ||
| 1182 | @itemx --vertical-scroll-bars | ||
| 1183 | @opindex --vertical-scroll-bars | ||
| 1184 | @cindex vertical scroll bars, command-line argument | ||
| 1185 | Enable vertical scroll bars. | ||
| 1186 | |||
| 1187 | @item -lsp @var{pixels} | ||
| 1188 | @opindex -lsp | ||
| 1189 | @itemx --line-spacing=@var{pixels} | ||
| 1190 | @opindex --line-spacing | ||
| 1191 | @cindex line spacing, command-line argument | ||
| 1192 | Specify @var{pixels} as additional space to put between lines, in pixels. | ||
| 1193 | @end table | ||
| 1194 | |||
| 1195 | The @samp{--xrm} option (@pxref{Resources}) specifies additional | ||
| 1196 | X resource values. | ||
| 1197 | |||
| 1141 | @ignore | 1198 | @ignore |
| 1142 | arch-tag: fffecd9e-7329-4a51-a3cc-dd4a9889340e | 1199 | arch-tag: fffecd9e-7329-4a51-a3cc-dd4a9889340e |
| 1143 | @end ignore | 1200 | @end ignore |
diff --git a/src/ChangeLog b/src/ChangeLog index a25239d88a3..1a2f7f4e20b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2004-02-23 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * abbrev.c (Finsert_abbrev_table_description): Doc fix. | ||
| 4 | |||
| 5 | 2004-02-22 Jason Rumney <jasonr@gnu.org> | ||
| 6 | |||
| 7 | * w32term.c (w32_draw_fringe_bitmap): Draw overlaid bitmaps | ||
| 8 | correctly over other bitmaps. | ||
| 9 | |||
| 10 | 2004-02-21 Eli Zaretskii <eliz@elta.co.il> | ||
| 11 | |||
| 12 | * emacs.c (USAGE1): Split into two halves. | ||
| 13 | (USAGE2): Second half of the old USAGE1. | ||
| 14 | (USAGE3): Renamed from USAGE2. | ||
| 15 | (USAGE4): Renamed from USAGE3. | ||
| 16 | |||
| 17 | 2004-02-21 Juri Linkov <juri@jurta.org> | ||
| 18 | |||
| 19 | * emacs.c (USAGE1): Add --no-desktop. Move --display from USAGE2. | ||
| 20 | Fix --multibyte. Move --help, --version to USAGE2. Add alias | ||
| 21 | --file. Fix -f, -l. Sort options. Untabify. | ||
| 22 | (USAGE2): Add -hb. Fix --name, --title. Sort options. Untabify. | ||
| 23 | |||
| 1 | 2004-02-19 Luc Teirlinck <teirllm@auburn.edu> | 24 | 2004-02-19 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 25 | ||
| 3 | * category.c (Fdefine_category, Fcategory_docstring) | 26 | * category.c (Fdefine_category, Fcategory_docstring) |
diff --git a/src/abbrev.c b/src/abbrev.c index 1cf06946631..41e329ac95d 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -540,7 +540,8 @@ is inserted. Otherwise the description is an expression, | |||
| 540 | a call to `define-abbrev-table', which would | 540 | a call to `define-abbrev-table', which would |
| 541 | define the abbrev table NAME exactly as it is currently defined. | 541 | define the abbrev table NAME exactly as it is currently defined. |
| 542 | 542 | ||
| 543 | Abbrevs marked as "system abbrevs" are omitted. */) | 543 | Abbrevs marked as "system abbrevs" are normally omitted. However, if |
| 544 | READABLE is non-nil, they are listed. */) | ||
| 544 | (name, readable) | 545 | (name, readable) |
| 545 | Lisp_Object name, readable; | 546 | Lisp_Object name, readable; |
| 546 | { | 547 | { |
diff --git a/src/emacs.c b/src/emacs.c index 20c6295e2e2..96fd323c42a 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -221,6 +221,8 @@ int initial_argc; | |||
| 221 | static void sort_args (); | 221 | static void sort_args (); |
| 222 | void syms_of_emacs (); | 222 | void syms_of_emacs (); |
| 223 | 223 | ||
| 224 | /* MSVC needs each string be shorter than 2048 bytes, so the usage | ||
| 225 | strings below are split to not overflow this limit. */ | ||
| 224 | #define USAGE1 "\ | 226 | #define USAGE1 "\ |
| 225 | Usage: %s [OPTION-OR-FILENAME]...\n\ | 227 | Usage: %s [OPTION-OR-FILENAME]...\n\ |
| 226 | \n\ | 228 | \n\ |
| @@ -233,66 +235,71 @@ read the main documentation for these command-line arguments.\n\ | |||
| 233 | \n\ | 235 | \n\ |
| 234 | Initialization options:\n\ | 236 | Initialization options:\n\ |
| 235 | \n\ | 237 | \n\ |
| 236 | --batch do not do interactive display; implies -q\n\ | 238 | --batch do not do interactive display; implies -q\n\ |
| 237 | --script FILE run FILE as an Emacs Lisp script.\n\ | 239 | --debug-init enable Emacs Lisp debugger for init file\n\ |
| 238 | --debug-init enable Emacs Lisp debugger during init file\n\ | 240 | --display, -d DISPLAY use X server DISPLAY\n\ |
| 239 | --help display this help message and exit\n\ | 241 | --multibyte, --no-unibyte inhibit the effect of EMACS_UNIBYTE\n\ |
| 240 | --multibyte, --no-unibyte run Emacs in multibyte mode\n\ | 242 | --no-desktop do not load a saved desktop\n\ |
| 241 | --no-init-file, -q load neither ~/.emacs nor default.el\n\ | 243 | --no-init-file, -q load neither ~/.emacs nor default.el\n\ |
| 242 | --no-shared-memory, -nl do not use shared memory\n\ | 244 | --no-shared-memory, -nl do not use shared memory\n\ |
| 243 | --no-site-file do not load site-start.el\n\ | 245 | --no-site-file do not load site-start.el\n\ |
| 244 | --no-splash do not display a splash screen on startup\n\ | 246 | --no-splash do not display a splash screen on startup\n\ |
| 245 | --no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ | 247 | --no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ |
| 246 | --terminal, -t DEVICE use DEVICE for terminal I/O\n\ | 248 | --script FILE run FILE as an Emacs Lisp script\n\ |
| 249 | --terminal, -t DEVICE use DEVICE for terminal I/O\n\ | ||
| 247 | --unibyte, --no-multibyte run Emacs in unibyte mode\n\ | 250 | --unibyte, --no-multibyte run Emacs in unibyte mode\n\ |
| 248 | --user, -u USER load ~USER/.emacs instead of your own\n\ | 251 | --user, -u USER load ~USER/.emacs instead of your own\n\ |
| 249 | --version display version information and exit\n\ | 252 | \n%s" |
| 250 | \n\ | 253 | |
| 254 | #define USAGE2 "\ | ||
| 251 | Action options:\n\ | 255 | Action options:\n\ |
| 252 | \n\ | 256 | \n\ |
| 253 | FILE visit FILE using find-file\n\ | 257 | FILE visit FILE using find-file\n\ |
| 254 | +LINE FILE visit FILE using find-file, then go to line LINE\n\ | 258 | +LINE FILE visit FILE using find-file, then go to line LINE\n\ |
| 255 | +LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ | 259 | +LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ |
| 256 | column COLUMN\n\ | 260 | column COLUMN\n\ |
| 257 | --directory, -L DIR add DIR to variable load-path\n\ | 261 | --directory, -L DIR add DIR to variable load-path\n\ |
| 258 | --eval EXPR evaluate Emacs Lisp expression EXPR\n\ | 262 | --eval EXPR evaluate Emacs Lisp expression EXPR\n\ |
| 259 | --execute EXPR evaluate Emacs Lisp expression EXPR\n\ | 263 | --execute EXPR evaluate Emacs Lisp expression EXPR\n\ |
| 260 | --find-file FILE visit FILE\n\ | 264 | --file FILE visit FILE using find-file\n\ |
| 261 | --funcall, -f FUNC call Emacs function FUNC with no arguments\n\ | 265 | --find-file FILE visit FILE using find-file\n\ |
| 262 | --insert FILE insert contents of FILE into current buffer\n\ | 266 | --funcall, -f FUNC call Emacs Lisp function FUNC with no arguments\n\ |
| 263 | --kill exit without asking for confirmation\n\ | 267 | --insert FILE insert contents of FILE into current buffer\n\ |
| 264 | --load, -l FILE load FILE of Emacs Lisp code using the load function\n\ | 268 | --kill exit without asking for confirmation\n\ |
| 265 | --visit FILE visit FILE\n\ | 269 | --load, -l FILE load Emacs Lisp FILE using the load function\n\ |
| 270 | --visit FILE visit FILE using find-file\n\ | ||
| 266 | \n" | 271 | \n" |
| 267 | 272 | ||
| 268 | #define USAGE2 "\ | 273 | #define USAGE3 "\ |
| 269 | Display options:\n\ | 274 | Display options:\n\ |
| 270 | \n\ | 275 | \n\ |
| 271 | --background-color, -bg COLOR window background color\n\ | 276 | --background-color, -bg COLOR window background color\n\ |
| 272 | --border-color, -bd COLOR main border color\n\ | 277 | --border-color, -bd COLOR main border color\n\ |
| 273 | --border-width, -bw WIDTH width of main border\n\ | 278 | --border-width, -bw WIDTH width of main border\n\ |
| 274 | --color=MODE color mode for character terminals;\n\ | 279 | --color MODE color mode for character terminals;\n\ |
| 275 | MODE defaults to `auto', and can also\n\ | 280 | MODE defaults to `auto', and can also\n\ |
| 276 | be `never', `auto', `always',\n\ | 281 | be `never', `auto', `always',\n\ |
| 277 | or a mode name like `ansi8'\n\ | 282 | or a mode name like `ansi8'\n\ |
| 278 | --cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ | 283 | --cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ |
| 279 | --display, -d DISPLAY use X server DISPLAY\n\ | 284 | --font, -fn FONT default font; must be fixed-width\n\ |
| 280 | --font, -fn FONT default font; must be fixed-width\n\ | 285 | --foreground-color, -fg COLOR window foreground color\n\ |
| 281 | --foreground-color, -fg COLOR window foreground color\n\ | 286 | --fullheight, -fh make the first frame high as the screen\n\ |
| 282 | --fullscreen, -fs make first frame fullscreen\n\ | 287 | --fullscreen, -fs make first frame fullscreen\n\ |
| 283 | --fullwidth, -fw make the first frame wide as the screen\n\ | 288 | --fullwidth, -fw make the first frame wide as the screen\n\ |
| 284 | --fullheight, -fh make the first frame high as the screen\n\ | 289 | --geometry, -g GEOMETRY window geometry\n\ |
| 285 | --geometry, -g GEOMETRY window geometry\n\ | 290 | --horizontal-scroll-bars, -hb enable horizontal scroll bars\n\ |
| 286 | --iconic start Emacs in iconified state\n\ | 291 | --icon-type, -i use picture of gnu for Emacs icon\n\ |
| 287 | --icon-type, -i use picture of gnu for Emacs icon\n\ | 292 | --iconic start Emacs in iconified state\n\ |
| 288 | --internal-border, -ib WIDTH width between text and main border\n\ | 293 | --internal-border, -ib WIDTH width between text and main border\n\ |
| 289 | --line-spacing, -lsp PIXELS additional space to put between lines\n\ | 294 | --line-spacing, -lsp PIXELS additional space to put between lines\n\ |
| 290 | --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ | 295 | --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ |
| 291 | --name NAME title of main Emacs window\n\ | 296 | --name NAME title for initial Emacs frame\n\ |
| 292 | --reverse-video, -r, -rv switch foreground and background\n\ | 297 | --reverse-video, -r, -rv switch foreground and background\n\ |
| 293 | --title, -T, -wn TITLE title for Emacs windows\n\ | 298 | --title, -T TITLE title for initial Emacs frame\n\ |
| 294 | --vertical-scroll-bars, -vb enable vertical scroll bars\n\ | 299 | --vertical-scroll-bars, -vb enable vertical scroll bars\n\ |
| 295 | --xrm XRESOURCES set additional X resources\n\ | 300 | --xrm XRESOURCES set additional X resources\n\ |
| 301 | --help display this help and exit\n\ | ||
| 302 | --version output version information and exit\n\ | ||
| 296 | \n\ | 303 | \n\ |
| 297 | You can generally also specify long option names with a single -; for\n\ | 304 | You can generally also specify long option names with a single -; for\n\ |
| 298 | example, -batch as well as --batch. You can use any unambiguous\n\ | 305 | example, -batch as well as --batch. You can use any unambiguous\n\ |
| @@ -302,7 +309,7 @@ Various environment variables and window system resources also affect\n\ | |||
| 302 | Emacs' operation. See the main documentation.\n\ | 309 | Emacs' operation. See the main documentation.\n\ |
| 303 | \n" | 310 | \n" |
| 304 | 311 | ||
| 305 | #define USAGE3 "\ | 312 | #define USAGE4 "\ |
| 306 | Report bugs to %s. First, please see the Bugs\n\ | 313 | Report bugs to %s. First, please see the Bugs\n\ |
| 307 | section of the Emacs manual or the file BUGS.\n" | 314 | section of the Emacs manual or the file BUGS.\n" |
| 308 | 315 | ||
| @@ -1062,9 +1069,9 @@ main (argc, argv | |||
| 1062 | /* Handle the --help option, which gives a usage message. */ | 1069 | /* Handle the --help option, which gives a usage message. */ |
| 1063 | if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) | 1070 | if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) |
| 1064 | { | 1071 | { |
| 1065 | printf (USAGE1, argv[0]); | 1072 | printf (USAGE1, argv[0], USAGE2); |
| 1066 | printf (USAGE2); | 1073 | printf (USAGE3); |
| 1067 | printf (USAGE3, bug_reporting_address ()); | 1074 | printf (USAGE4, bug_reporting_address ()); |
| 1068 | exit (0); | 1075 | exit (0); |
| 1069 | } | 1076 | } |
| 1070 | 1077 | ||
diff --git a/src/w32term.c b/src/w32term.c index 82db82826e8..92d508691cd 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -715,29 +715,41 @@ w32_draw_fringe_bitmap (w, row, p) | |||
| 715 | SaveDC (hdc); | 715 | SaveDC (hdc); |
| 716 | 716 | ||
| 717 | horig_obj = SelectObject (compat_hdc, pixmap); | 717 | horig_obj = SelectObject (compat_hdc, pixmap); |
| 718 | SetTextColor (hdc, face->background); | ||
| 719 | SetBkColor (hdc, p->cursor_p | ||
| 720 | ? (p->overlay_p ? face->background | ||
| 721 | : f->output_data.w32->cursor_pixel) | ||
| 722 | : face->foreground); | ||
| 723 | 718 | ||
| 724 | /* Paint overlays transparently. */ | 719 | /* Paint overlays transparently. */ |
| 725 | if (p->overlay_p) | 720 | if (p->overlay_p) |
| 726 | { | 721 | { |
| 727 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | 722 | HBRUSH h_brush, h_orig_brush; |
| 728 | compat_hdc, 0, p->dh, | 723 | |
| 729 | DSTINVERT); | 724 | SetTextColor (hdc, BLACK_PIX_DEFAULT (f)); |
| 730 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | 725 | SetBkColor (hdc, WHITE_PIX_DEFAULT (f)); |
| 731 | compat_hdc, 0, p->dh, | 726 | h_brush = CreateSolidBrush (face->foreground); |
| 732 | MERGEPAINT); | 727 | h_orig_brush = SelectObject (hdc, h_brush); |
| 733 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | 728 | |
| 734 | compat_hdc, 0, p->dh, | 729 | BitBlt (hdc, p->x, p->y, p->wd, p->h, |
| 735 | DSTINVERT); | 730 | compat_hdc, 0, p->dh, |
| 731 | DSTINVERT); | ||
| 732 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | ||
| 733 | compat_hdc, 0, p->dh, | ||
| 734 | 0x2E064A); | ||
| 735 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | ||
| 736 | compat_hdc, 0, p->dh, | ||
| 737 | DSTINVERT); | ||
| 738 | |||
| 739 | SelectObject (hdc, h_orig_brush); | ||
| 740 | DeleteObject (h_brush); | ||
| 736 | } | 741 | } |
| 737 | else | 742 | else |
| 738 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | 743 | { |
| 739 | compat_hdc, 0, p->dh, | 744 | SetTextColor (hdc, face->background); |
| 740 | SRCCOPY); | 745 | SetBkColor (hdc, (p->cursor_p |
| 746 | ? f->output_data.w32->cursor_pixel | ||
| 747 | : face->foreground)); | ||
| 748 | |||
| 749 | BitBlt (hdc, p->x, p->y, p->wd, p->h, | ||
| 750 | compat_hdc, 0, p->dh, | ||
| 751 | SRCCOPY); | ||
| 752 | } | ||
| 741 | 753 | ||
| 742 | SelectObject (compat_hdc, horig_obj); | 754 | SelectObject (compat_hdc, horig_obj); |
| 743 | DeleteDC (compat_hdc); | 755 | DeleteDC (compat_hdc); |