diff options
| author | Karoly Lorentey | 2004-02-18 17:10:32 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-02-18 17:10:32 +0000 |
| commit | ac3d262560b0182146962f183d32725602d82f3c (patch) | |
| tree | 735abbd9cd9e245ed6ce33240d260ccfc2e5e5f2 | |
| parent | e581a4668750ed98d77f13500c983439770ec600 (diff) | |
| parent | 58ec79cfdf24cf6fa662768a42931ca042c54f85 (diff) | |
| download | emacs-ac3d262560b0182146962f183d32725602d82f3c.tar.gz emacs-ac3d262560b0182146962f183d32725602d82f3c.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-98
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-99
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-100
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-101
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-102
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-78
53 files changed, 796 insertions, 323 deletions
| @@ -1,3 +1,13 @@ | |||
| 1 | 2004-02-18 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * INSTALL.CVS: Add info about ssh/cvs related problems and | ||
| 4 | work-around. | ||
| 5 | |||
| 6 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | ||
| 7 | |||
| 8 | * make-dist: Don't link index.*perm and permute-index into | ||
| 9 | tempdir. | ||
| 10 | |||
| 1 | 2004-02-14 Jonathan Yavner <jyavner@member.fsf.org> | 11 | 2004-02-14 Jonathan Yavner <jyavner@member.fsf.org> |
| 2 | 12 | ||
| 3 | * AUTHORS (JonathanYavner): Rename testcover-*.el to tcover-*.el | 13 | * AUTHORS (JonathanYavner): Rename testcover-*.el to tcover-*.el |
diff --git a/INSTALL.CVS b/INSTALL.CVS index 3acb070de3b..27e035146bb 100644 --- a/INSTALL.CVS +++ b/INSTALL.CVS | |||
| @@ -48,3 +48,29 @@ Questions, requests, and bug reports about the CVS versions of Emacs | |||
| 48 | should be sent to emacs-pretest-bug@gnu.org rather than gnu.emacs.help | 48 | should be sent to emacs-pretest-bug@gnu.org rather than gnu.emacs.help |
| 49 | or gnu.emacs.bug. Ideally, use M-x report-emacs-bug RET which will | 49 | or gnu.emacs.bug. Ideally, use M-x report-emacs-bug RET which will |
| 50 | send it to the proper place. | 50 | send it to the proper place. |
| 51 | |||
| 52 | |||
| 53 | Note on using SSH to access the CVS repository from inside emacs | ||
| 54 | ---------------------------------------------------------------- | ||
| 55 | |||
| 56 | Write access to the CVS repository requires using SSH v2. | ||
| 57 | |||
| 58 | If you execute cvs commands inside emacs, specifically if you use | ||
| 59 | pcl-cvs, output from CVS may be lost due to a problem in the | ||
| 60 | interface between ssh, cvs, and emacs. Corrupted checkins are | ||
| 61 | also been reported to have happened. | ||
| 62 | |||
| 63 | To fix the problem, save the following script into a file, make it | ||
| 64 | executable, and set CVS_RSH to the file name of the script: | ||
| 65 | |||
| 66 | #!/bin/bash | ||
| 67 | exec 2> >(exec cat >&2 2>/dev/null) | ||
| 68 | exec ssh "$@" | ||
| 69 | |||
| 70 | This may be combined with the following entry in ~/.ssh/config to | ||
| 71 | simplify accessing the CVS repository: | ||
| 72 | |||
| 73 | Host subversions.gnu.org | ||
| 74 | Protocol 2 | ||
| 75 | ForwardX11 no | ||
| 76 | User YOUR_USERID | ||
diff --git a/etc/ChangeLog b/etc/ChangeLog index c1e6cc50516..eb0019c969f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-02-16 Klaus Zeitler <kzeitler@lucent.com> | ||
| 2 | |||
| 3 | * PROBLEMS: Document crashes on X when build with GCC and GNU ld. | ||
| 4 | |||
| 1 | 2004-02-08 Andreas Schwab <schwab@suse.de> | 5 | 2004-02-08 Andreas Schwab <schwab@suse.de> |
| 2 | 6 | ||
| 3 | * NEWS: Fix typo. | 7 | * NEWS: Fix typo. |
| @@ -1860,7 +1860,7 @@ implemented (such as "*") are no longer accepted. | |||
| 1860 | +++ | 1860 | +++ |
| 1861 | ** New function `delete-dups' destructively removes `equal' duplicates | 1861 | ** New function `delete-dups' destructively removes `equal' duplicates |
| 1862 | from a list. Of several `equal' occurrences of an element in the list, | 1862 | from a list. Of several `equal' occurrences of an element in the list, |
| 1863 | the last one is kept. | 1863 | the first one is kept. |
| 1864 | 1864 | ||
| 1865 | +++ | 1865 | +++ |
| 1866 | ** `declare' is now a macro. This change was made mostly for | 1866 | ** `declare' is now a macro. This change was made mostly for |
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index df6bfffa0ec..30a65b01bb7 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -58,6 +58,20 @@ xrealloc(). Relinking the application (by deleting src/temacs and | |||
| 58 | running make) will solve the problem. It appears to be caused by some | 58 | running make) will solve the problem. It appears to be caused by some |
| 59 | problems with the unexec code and its interaction with libSystem.B. | 59 | problems with the unexec code and its interaction with libSystem.B. |
| 60 | 60 | ||
| 61 | * Emacs crashes with SIGSEGV on Solaris in XtInitializeWidgetClass | ||
| 62 | |||
| 63 | It crashes on X, but runs fine when called with option "-nw". | ||
| 64 | |||
| 65 | This has been observed when emacs is linked with GNU ld instead of | ||
| 66 | Solaris ld. To check which ld is used by gcc add "-V" to | ||
| 67 | TEMACS_LDFLAGS in src/Makefile. Alternatively the executable size may | ||
| 68 | be used as an indication of which linker is used. The size is | ||
| 69 | approximately 15M when linked with solaris ld compared to 9M when | ||
| 70 | linked with GNU ld. | ||
| 71 | |||
| 72 | The fix is to reconfigure/install gcc, making sure that the SUN linker | ||
| 73 | is used. | ||
| 74 | |||
| 61 | * Characters from the mule-unicode charsets aren't displayed under X. | 75 | * Characters from the mule-unicode charsets aren't displayed under X. |
| 62 | 76 | ||
| 63 | XFree86 4 contains many fonts in iso10646-1 encoding which have | 77 | XFree86 4 contains many fonts in iso10646-1 encoding which have |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c13e5dff431..eb668cd6b22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,104 @@ | |||
| 1 | 2004-02-17 Eli Zaretskii <eliz@elta.co.il> | ||
| 2 | |||
| 3 | * mail/rmail.el (rmail-get-new-mail): Don't reference | ||
| 4 | rmail-use-spam-filter if rmail-spam-filter is not loaded. | ||
| 5 | |||
| 6 | 2004-02-16 Luc Teirlinck <teirllm@auburn.edu> | ||
| 7 | |||
| 8 | * autorevert.el (auto-revert-buffer-p): Only revert dired buffers | ||
| 9 | if one of global-auto-revert-non-file-buffers or autorevert-mode | ||
| 10 | is non-nil. | ||
| 11 | |||
| 12 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | ||
| 13 | |||
| 14 | * subr.el (delete-dups): A better implementation from Karl Heuer | ||
| 15 | <kwzh@gnu.org>. | ||
| 16 | |||
| 17 | 2004-02-16 Matt Hodges <matt@stchem.bham.ac.uk> (tiny change) | ||
| 18 | |||
| 19 | * net/telnet.el (telnet-interrupt-subjob): Move doc string to the | ||
| 20 | correct place. | ||
| 21 | * progmodes/icon.el (icon-indent-command): Ditto. | ||
| 22 | * textmodes/paragraphs.el (repunctuate-sentences): Ditto. | ||
| 23 | |||
| 24 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | ||
| 25 | |||
| 26 | * progmodes/grep.el (grep-compute-defaults): Undo change from | ||
| 27 | 2004-01-29: don't use executable-command-find-posix-p. | ||
| 28 | |||
| 29 | 2004-02-16 Richard Sharman <rsharman@pobox.com> | ||
| 30 | |||
| 31 | * hilit-chg.el: Use require instead of eval-and-compile. | ||
| 32 | (highlight-compare-buffers): New function. | ||
| 33 | |||
| 34 | 2004-02-16 John Basrai <jbasrai@comcast.net> (tiny change) | ||
| 35 | |||
| 36 | * man.el (Man-fontify-manpage): Render section headings in | ||
| 37 | `Man-overstrike-face' even when overstrike was not used by man | ||
| 38 | formatter for section headings. | ||
| 39 | |||
| 40 | 2004-02-16 Eli Tziperman <eli@deas.harvard.edu> | ||
| 41 | |||
| 42 | * rmail-spam-filter.el: (vm-use-spam-filter) | ||
| 43 | (rsf-min-region-length-added-to-spam-list): New variables. | ||
| 44 | (rsf-bbdb-auto-delete-spam-bbdb-entries): Renamed from | ||
| 45 | rmail-bbdb-auto-delete-spam-entries. Added cc: to recipients for | ||
| 46 | spam testing. Don't delete spam message if automatic deletion | ||
| 47 | after output via variable rmail-delete-after-output is turned on. | ||
| 48 | (rsf-bbdb-dont-create-entries-for-deleted-messages): Renamed from | ||
| 49 | rsf-bbdb-dont-create-entries-for-spam. | ||
| 50 | (check-field): New function, extracted from code in | ||
| 51 | rmail-spam-filter to ease addition of header fields like | ||
| 52 | content-type. | ||
| 53 | (message-content-type): New variable to check the content-type: | ||
| 54 | field added, also in defcustom of rsf-definitions-alist. | ||
| 55 | (rmail-spam-filter): Replace repeated test code for header fields | ||
| 56 | by calls to check-field; change the call to | ||
| 57 | rmail-output-to-rmail-file such that rmail-current-message stays | ||
| 58 | the same to avoid wrong deletion of unseen | ||
| 59 | flags. | ||
| 60 | (rsf-add-contents-type): New function to convert old format | ||
| 61 | of rmail-spam-definitions-alist into new one. | ||
| 62 | Changed prefixes of all variables and functions from | ||
| 63 | rmail-spam-filter- or spam-filter- or rmail-spam- to rsf-. | ||
| 64 | |||
| 65 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | ||
| 66 | |||
| 67 | * loadhist.el (unload-hook-features-list): New defvar. | ||
| 68 | |||
| 69 | 2004-02-16 Dave Love <fx@gnu.org> | ||
| 70 | |||
| 71 | * loadhist.el (unload-feature): Doc fix. Rename flist to | ||
| 72 | unload-hook-features-list. | ||
| 73 | |||
| 74 | 2004-02-16 Jay Belanger <belanger@truman.edu> (tiny change). | ||
| 75 | |||
| 76 | * calc/calc-embed.el (calc-do-embedded-activate): Add autoload | ||
| 77 | cookie. Don't check if we are looking-at open-formula. | ||
| 78 | |||
| 79 | 2004-02-16 Jesper Harder <harder@ifa.au.dk> (tiny change) | ||
| 80 | |||
| 81 | * subr.el (match-string-no-properties): Use substring-no-properties. | ||
| 82 | |||
| 83 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | ||
| 84 | |||
| 85 | * emacs-lisp/rx.el (rx-check, rx-check-any, rx-check-not) | ||
| 86 | (rx-repeat, rx-check-backref, rx-syntax, rx-to-string): Use | ||
| 87 | lower-case "rx" in all error message. | ||
| 88 | |||
| 89 | 2004-02-16 Dave Love <fx@gnu.org> | ||
| 90 | |||
| 91 | * emacs-lisp/rx.el (rx-or): Put group around result. | ||
| 92 | (rx-constituents): Add backref. | ||
| 93 | (rx-syntax): Add string-delimiter, comment-delimiter. | ||
| 94 | (rx-categories): Add combining-diacritic. | ||
| 95 | (rx-check-not, rx-greedy, rx): Doc fix. | ||
| 96 | (rx-backref, rx-check-backref): New. | ||
| 97 | |||
| 98 | 2004-02-16 Jesper Harder <harder@ifa.au.dk> | ||
| 99 | |||
| 100 | * newcomment.el (uncomment-region): Allow eob as comment end. | ||
| 101 | |||
| 1 | 2004-02-16 Jari Aalto <jari.aalto@poboxes.com> (tiny change) | 102 | 2004-02-16 Jari Aalto <jari.aalto@poboxes.com> (tiny change) |
| 2 | 103 | ||
| 3 | * filecache.el: All message and error commands now use prefix | 104 | * filecache.el: All message and error commands now use prefix |
| @@ -5,13 +106,16 @@ | |||
| 5 | 106 | ||
| 6 | 2004-02-16 Jari Aalto <jari.aalto@poboxes.com> | 107 | 2004-02-16 Jari Aalto <jari.aalto@poboxes.com> |
| 7 | 108 | ||
| 8 | Autorevert: Add support to detect changed dired buffers. | 109 | Autorevert: Add support to detect changed dired buffers and for |
| 110 | VC controlled files. | ||
| 9 | * autorevert.el (auto-revert-active-p, auto-revert-list-diff) | 111 | * autorevert.el (auto-revert-active-p, auto-revert-list-diff) |
| 10 | (auto-revert-dired-file-list, auto-revert-dired-changed-p) | 112 | (auto-revert-dired-file-list, auto-revert-dired-changed-p) |
| 11 | (auto-revert-handler, auto-revert-active-p): New functions. | 113 | (auto-revert-handler, auto-revert-active-p): New functions. |
| 12 | (auto-revert-buffers): Moved revert logic to `auto-revert-handler' | 114 | (auto-revert-buffers): Moved revert logic to `auto-revert-handler' |
| 13 | and `auto-revert-active-p'. | 115 | and `auto-revert-active-p'. |
| 14 | (eval-when-compile): Defvar dired-directory. | 116 | (eval-when-compile): Defvar dired-directory and vc-mode. |
| 117 | (auto-revert-vc-cvs-file-version, auto-revert-vc-buffer-p) | ||
| 118 | (auto-revert-handler-vc): New functions. | ||
| 15 | 119 | ||
| 16 | 2004-02-16 Alfred M. Szmidt <ams@kemisten.nu> (tiny change) | 120 | 2004-02-16 Alfred M. Szmidt <ams@kemisten.nu> (tiny change) |
| 17 | 121 | ||
| @@ -22,7 +126,7 @@ | |||
| 22 | 126 | ||
| 23 | 2004-02-16 Dave Love <fx@gnu.org> | 127 | 2004-02-16 Dave Love <fx@gnu.org> |
| 24 | 128 | ||
| 25 | * newcomment.el (comment-insert-comment-function) | 129 | * newcomment.el (comment-insert-comment-function) |
| 26 | (comment-region-function, uncomment-region-function): New. | 130 | (comment-region-function, uncomment-region-function): New. |
| 27 | (comment-indent): Use comment-insert-comment-function. | 131 | (comment-indent): Use comment-insert-comment-function. |
| 28 | (uncomment-region): Use uncomment-region-function. | 132 | (uncomment-region): Use uncomment-region-function. |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 309517476e1..b1f0d7b7bfa 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -71,9 +71,12 @@ | |||
| 71 | 71 | ||
| 72 | (require 'timer) | 72 | (require 'timer) |
| 73 | (autoload 'dired-get-filename "dired") | 73 | (autoload 'dired-get-filename "dired") |
| 74 | (autoload 'vc-workfile-version "vc-hooks") | ||
| 75 | (autoload 'vc-mode-line "vc-hooks") | ||
| 74 | 76 | ||
| 75 | (eval-when-compile | 77 | (eval-when-compile |
| 76 | (defvar dired-directory) | 78 | (defvar dired-directory) |
| 79 | (defvar vc-mode) | ||
| 77 | (require 'cl)) | 80 | (require 'cl)) |
| 78 | 81 | ||
| 79 | 82 | ||
| @@ -294,9 +297,15 @@ Use `auto-revert-mode' to revert a particular buffer." | |||
| 294 | 297 | ||
| 295 | (defun auto-revert-buffer-p () | 298 | (defun auto-revert-buffer-p () |
| 296 | "Check if current buffer should be reverted." | 299 | "Check if current buffer should be reverted." |
| 297 | ;; Always include dired buffers to list. It would be too expensive | 300 | ;; - Always include dired buffers to list. It would be too expensive |
| 298 | ;; to test the "revert" status here each time timer launches. | 301 | ;; to test the "revert" status here each time timer launches. |
| 299 | (or (eq major-mode 'dired-mode) | 302 | ;; - Same for VC buffers. |
| 303 | (or (and (eq major-mode 'dired-mode) | ||
| 304 | (or (and global-auto-revert-mode | ||
| 305 | global-auto-revert-non-file-buffers) | ||
| 306 | auto-revert-mode)) | ||
| 307 | (and (not (buffer-modified-p)) | ||
| 308 | (auto-revert-vc-buffer-p)) | ||
| 300 | (and (not (buffer-modified-p)) | 309 | (and (not (buffer-modified-p)) |
| 301 | (if (buffer-file-name) | 310 | (if (buffer-file-name) |
| 302 | (and (file-readable-p (buffer-file-name)) | 311 | (and (file-readable-p (buffer-file-name)) |
| @@ -306,23 +315,81 @@ Use `auto-revert-mode' to revert a particular buffer." | |||
| 306 | global-auto-revert-non-file-buffers) | 315 | global-auto-revert-non-file-buffers) |
| 307 | auto-revert-mode)))))) | 316 | auto-revert-mode)))))) |
| 308 | 317 | ||
| 318 | (defun auto-revert-vc-cvs-file-version (file) | ||
| 319 | "Get version of FILE by reading control file on disk." | ||
| 320 | (let* ((control "CVS/Entries") | ||
| 321 | (name (file-name-nondirectory file)) | ||
| 322 | (path (format "%s/%s" | ||
| 323 | (file-name-directory file) | ||
| 324 | control))) | ||
| 325 | (when (file-exists-p path) | ||
| 326 | (with-temp-buffer | ||
| 327 | (insert-file-contents-literally path) | ||
| 328 | (goto-char (point-min)) | ||
| 329 | (when (re-search-forward | ||
| 330 | ;; /file.txt/1.3/Mon Sep 15 18:43:20 2003// | ||
| 331 | (format "%s/\\([.0-9]+\\)" (regexp-quote name)) | ||
| 332 | nil t) | ||
| 333 | (match-string 1)))))) | ||
| 334 | |||
| 335 | (defun auto-revert-vc-buffer-p () | ||
| 336 | "Check if buffer is version controlled." | ||
| 337 | (and (boundp 'vc-mode) | ||
| 338 | (string-match "[0-9]" (or vc-mode "")))) | ||
| 339 | |||
| 340 | (defun auto-revert-handler-vc () | ||
| 341 | "Check if version controlled buffer needs revert." | ||
| 342 | ;; [Emacs 1] | ||
| 343 | ;; 1. File is saved (*) | ||
| 344 | ;; 2. checkin is done 1.1 -> 1.2 | ||
| 345 | ;; 3. VC reverts, so that updated version number is shown in mode line | ||
| 346 | ;; | ||
| 347 | ;; Suppose the same file has been opened in another Emacs and | ||
| 348 | ;; autorevert.el is on. | ||
| 349 | ;; | ||
| 350 | ;; [Emacs 2] | ||
| 351 | ;; 1. Step (1) is detected and buffer is reverted. | ||
| 352 | ;; 2. But check in does not always change the file in dis, but possibly only | ||
| 353 | ;; control files like CVS/Entries | ||
| 354 | ;; 3. The buffer is not reverted to update VC version line. | ||
| 355 | ;; Incorrect version number 1.1 is shown in this Emacs | ||
| 356 | ;; | ||
| 357 | (when (featurep 'vc) | ||
| 358 | (let* ((file (buffer-file-name)) | ||
| 359 | (backend (vc-backend (buffer-file-name))) | ||
| 360 | (version-buffer (vc-workfile-version file))) | ||
| 361 | (when (stringp version-buffer) | ||
| 362 | (cond | ||
| 363 | ((eq backend 'CVS) | ||
| 364 | (let ((version-file | ||
| 365 | (auto-revert-vc-cvs-file-version (buffer-file-name)))) | ||
| 366 | (and (stringp version-file) | ||
| 367 | (not (string-match version-file version-buffer))))) | ||
| 368 | ((eq backend 'RCS) | ||
| 369 | ;; TODO: | ||
| 370 | )))))) | ||
| 371 | |||
| 309 | (defun auto-revert-handler () | 372 | (defun auto-revert-handler () |
| 310 | "Revert current buffer." | 373 | "Revert current buffer." |
| 311 | (let (done) | 374 | (let (revert) |
| 312 | (cond | 375 | (cond |
| 313 | ((eq major-mode 'dired-mode) | 376 | ((eq major-mode 'dired-mode) |
| 314 | ;; Dired includes revert-buffer-function | 377 | ;; Dired includes revert-buffer-function |
| 315 | (when (and revert-buffer-function | 378 | (when (and revert-buffer-function |
| 316 | (auto-revert-dired-changed-p)) | 379 | (auto-revert-dired-changed-p)) |
| 317 | (setq done t) | 380 | (setq revert t))) |
| 318 | (revert-buffer t t t))) | 381 | ((auto-revert-vc-buffer-p) |
| 382 | (when (auto-revert-handler-vc) | ||
| 383 | (setq revert 'vc))) | ||
| 319 | ((or (buffer-file-name) | 384 | ((or (buffer-file-name) |
| 320 | revert-buffer-function) | 385 | revert-buffer-function) |
| 321 | (setq done t) | 386 | (setq revert t))) |
| 322 | (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))) | 387 | (when revert |
| 323 | (if (and done | 388 | (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes) |
| 324 | auto-revert-verbose) | 389 | (if (eq revert 'vc) |
| 325 | (message "Reverting buffer `%s'." (buffer-name))))) | 390 | (vc-mode-line buffer-file-name)) |
| 391 | (if auto-revert-verbose | ||
| 392 | (message "Reverting buffer `%s'." (buffer-name)))))) | ||
| 326 | 393 | ||
| 327 | (defun auto-revert-buffers () | 394 | (defun auto-revert-buffers () |
| 328 | "Revert buffers as specified by Auto-Revert and Global Auto-Revert Mode. | 395 | "Revert buffers as specified by Auto-Revert and Global Auto-Revert Mode. |
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 2542a8f648a..5fd77fe625f 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el | |||
| @@ -320,6 +320,7 @@ This is not required to be present for user-written mode annotations.") | |||
| 320 | (aset info 8 val) | 320 | (aset info 8 val) |
| 321 | (calc-embedded-update info 14 t t)))) | 321 | (calc-embedded-update info 14 t t)))) |
| 322 | 322 | ||
| 323 | ;;;###autoload | ||
| 323 | (defun calc-do-embedded-activate (arg cbuf) | 324 | (defun calc-do-embedded-activate (arg cbuf) |
| 324 | (calc-plain-buffer-only) | 325 | (calc-plain-buffer-only) |
| 325 | (if arg | 326 | (if arg |
| @@ -341,8 +342,8 @@ This is not required to be present for user-written mode annotations.") | |||
| 341 | (setcdr active (delq (car info) (cdr active))))) | 342 | (setcdr active (delq (car info) (cdr active))))) |
| 342 | (goto-char (point-min)) | 343 | (goto-char (point-min)) |
| 343 | (while (re-search-forward pat nil t) | 344 | (while (re-search-forward pat nil t) |
| 344 | (if (looking-at calc-embedded-open-formula) | 345 | ;;; (if (looking-at calc-embedded-open-formula) |
| 345 | (goto-char (match-end 1))) | 346 | ;;; (goto-char (match-end 1))) |
| 346 | (setq info (calc-embedded-make-info (point) cbuf nil)) | 347 | (setq info (calc-embedded-make-info (point) cbuf nil)) |
| 347 | (or (eq (car-safe (aref info 8)) 'error) | 348 | (or (eq (car-safe (aref info 8)) 'error) |
| 348 | (goto-char (aref info 5)))))) | 349 | (goto-char (aref info 5)))))) |
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index c6f9ce6f4a6..86673441fe7 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el | |||
| @@ -120,6 +120,7 @@ | |||
| 120 | (optional . zero-or-one) | 120 | (optional . zero-or-one) |
| 121 | (minimal-match . (rx-greedy 1 1)) | 121 | (minimal-match . (rx-greedy 1 1)) |
| 122 | (maximal-match . (rx-greedy 1 1)) | 122 | (maximal-match . (rx-greedy 1 1)) |
| 123 | (backref . (rx-backref 1 1 rx-check-backref)) | ||
| 123 | (line-start . "^") | 124 | (line-start . "^") |
| 124 | (line-end . "$") | 125 | (line-end . "$") |
| 125 | (string-start . "\\`") | 126 | (string-start . "\\`") |
| @@ -175,7 +176,9 @@ all arguments must satisfy PREDICATE.") | |||
| 175 | (escape . ?\\) | 176 | (escape . ?\\) |
| 176 | (character-quote . ?/) | 177 | (character-quote . ?/) |
| 177 | (comment-start . ?<) | 178 | (comment-start . ?<) |
| 178 | (comment-end . ?>)) | 179 | (comment-end . ?>) |
| 180 | (string-delimiter . ?|) | ||
| 181 | (comment-delimiter . ?!)) | ||
| 179 | "Alist mapping Rx syntax symbols to syntax characters. | 182 | "Alist mapping Rx syntax symbols to syntax characters. |
| 180 | Each entry has the form (SYMBOL . CHAR), where SYMBOL is a valid | 183 | Each entry has the form (SYMBOL . CHAR), where SYMBOL is a valid |
| 181 | symbol in `(syntax SYMBOL)', and CHAR is the syntax character | 184 | symbol in `(syntax SYMBOL)', and CHAR is the syntax character |
| @@ -204,6 +207,7 @@ regular expressions.") | |||
| 204 | (japanese-katakana-two-byte . ?K) | 207 | (japanese-katakana-two-byte . ?K) |
| 205 | (korean-hangul-two-byte . ?N) | 208 | (korean-hangul-two-byte . ?N) |
| 206 | (cyrillic-two-byte . ?Y) | 209 | (cyrillic-two-byte . ?Y) |
| 210 | (combining-diacritic . ?^) | ||
| 207 | (ascii . ?a) | 211 | (ascii . ?a) |
| 208 | (arabic . ?b) | 212 | (arabic . ?b) |
| 209 | (chinese . ?c) | 213 | (chinese . ?c) |
| @@ -255,16 +259,16 @@ See also `rx-constituents'." | |||
| 255 | (type-pred (nth 3 rx))) | 259 | (type-pred (nth 3 rx))) |
| 256 | (when (and (not (null min-args)) | 260 | (when (and (not (null min-args)) |
| 257 | (< nargs min-args)) | 261 | (< nargs min-args)) |
| 258 | (error "Rx form `%s' requires at least %d args" | 262 | (error "rx form `%s' requires at least %d args" |
| 259 | (car form) min-args)) | 263 | (car form) min-args)) |
| 260 | (when (and (not (null max-args)) | 264 | (when (and (not (null max-args)) |
| 261 | (> nargs max-args)) | 265 | (> nargs max-args)) |
| 262 | (error "Rx form `%s' accepts at most %d args" | 266 | (error "rx form `%s' accepts at most %d args" |
| 263 | (car form) max-args)) | 267 | (car form) max-args)) |
| 264 | (when (not (null type-pred)) | 268 | (when (not (null type-pred)) |
| 265 | (dolist (sub-form (cdr form)) | 269 | (dolist (sub-form (cdr form)) |
| 266 | (unless (funcall type-pred sub-form) | 270 | (unless (funcall type-pred sub-form) |
| 267 | (error "Rx form `%s' requires args satisfying `%s'" | 271 | (error "rx form `%s' requires args satisfying `%s'" |
| 268 | (car form) type-pred)))))) | 272 | (car form) type-pred)))))) |
| 269 | 273 | ||
| 270 | 274 | ||
| @@ -310,10 +314,10 @@ If STRING starts with a '^', move it to the end." | |||
| 310 | "Check arg ARG for Rx `any'." | 314 | "Check arg ARG for Rx `any'." |
| 311 | (cond ((integerp arg) t) | 315 | (cond ((integerp arg) t) |
| 312 | ((and (stringp arg) (zerop (length arg))) | 316 | ((and (stringp arg) (zerop (length arg))) |
| 313 | (error "String arg for Rx `any' must not be empty")) | 317 | (error "String arg for rx `any' must not be empty")) |
| 314 | ((stringp arg) t) | 318 | ((stringp arg) t) |
| 315 | (t | 319 | (t |
| 316 | (error "Rx `any' requires string or character arg")))) | 320 | (error "rx `any' requires string or character arg")))) |
| 317 | 321 | ||
| 318 | 322 | ||
| 319 | (defun rx-any (form) | 323 | (defun rx-any (form) |
| @@ -330,15 +334,15 @@ matches anything." | |||
| 330 | (concat "[" (rx-quote-for-set (cadr form)) "]"))))) | 334 | (concat "[" (rx-quote-for-set (cadr form)) "]"))))) |
| 331 | 335 | ||
| 332 | 336 | ||
| 333 | (defun rx-check-not (form) | 337 | (defun rx-check-not (arg) |
| 334 | "Check arguments of FORM. FORM is `(not ...)'." | 338 | "Check arg ARG for Rx `not'." |
| 335 | (unless (or (memq form | 339 | (unless (or (memq form |
| 336 | '(digit control hex-digit blank graphic printing | 340 | '(digit control hex-digit blank graphic printing |
| 337 | alphanumeric letter ascii nonascii lower | 341 | alphanumeric letter ascii nonascii lower |
| 338 | punctuation space upper word)) | 342 | punctuation space upper word)) |
| 339 | (and (consp form) | 343 | (and (consp form) |
| 340 | (memq (car form) '(not any in syntax category:)))) | 344 | (memq (car form) '(not any in syntax category:)))) |
| 341 | (error "Rx `not' syntax error: %s" form)) | 345 | (error "rx `not' syntax error: %s" form)) |
| 342 | t) | 346 | t) |
| 343 | 347 | ||
| 344 | 348 | ||
| @@ -376,14 +380,14 @@ FORM is either `(repeat N FORM1)' or `(repeat N M FORM1)'." | |||
| 376 | (cond ((= (length form) 3) | 380 | (cond ((= (length form) 3) |
| 377 | (unless (and (integerp (nth 1 form)) | 381 | (unless (and (integerp (nth 1 form)) |
| 378 | (> (nth 1 form) 0)) | 382 | (> (nth 1 form) 0)) |
| 379 | (error "Rx `repeat' requires positive integer first arg")) | 383 | (error "rx `repeat' requires positive integer first arg")) |
| 380 | (format "%s\\{%d\\}" (rx-to-string (nth 2 form)) (nth 1 form))) | 384 | (format "%s\\{%d\\}" (rx-to-string (nth 2 form)) (nth 1 form))) |
| 381 | ((or (not (integerp (nth 2 form))) | 385 | ((or (not (integerp (nth 2 form))) |
| 382 | (< (nth 2 form) 0) | 386 | (< (nth 2 form) 0) |
| 383 | (not (integerp (nth 1 form))) | 387 | (not (integerp (nth 1 form))) |
| 384 | (< (nth 1 form) 0) | 388 | (< (nth 1 form) 0) |
| 385 | (< (nth 2 form) (nth 1 form))) | 389 | (< (nth 2 form) (nth 1 form))) |
| 386 | (error "Rx `repeat' range error")) | 390 | (error "rx `repeat' range error")) |
| 387 | (t | 391 | (t |
| 388 | (format "%s\\{%d,%d\\}" (rx-to-string (nth 3 form)) | 392 | (format "%s\\{%d,%d\\}" (rx-to-string (nth 3 form)) |
| 389 | (nth 1 form) (nth 2 form))))) | 393 | (nth 1 form) (nth 2 form))))) |
| @@ -396,6 +400,16 @@ FORM is either `(repeat N FORM1)' or `(repeat N M FORM1)'." | |||
| 396 | (cdr form) nil) | 400 | (cdr form) nil) |
| 397 | "\\)")) | 401 | "\\)")) |
| 398 | 402 | ||
| 403 | (defun rx-backref (form) | ||
| 404 | "Parse and produce code from FORM, which is `(backref N)'." | ||
| 405 | (rx-check form) | ||
| 406 | (format "\\%d" (nth 1 form))) | ||
| 407 | |||
| 408 | (defun rx-check-backref (arg) | ||
| 409 | "Check arg ARG for Rx `backref'." | ||
| 410 | (or (and (integerp arg) (>= arg 1) (<= arg 9)) | ||
| 411 | (error "rx `backref' requires numeric 1<=arg<=9: %s" arg))) | ||
| 412 | |||
| 399 | (defun rx-kleene (form) | 413 | (defun rx-kleene (form) |
| 400 | "Parse and produce code from FORM. | 414 | "Parse and produce code from FORM. |
| 401 | FORM is `(OP FORM1)', where OP is one of the `zero-or-one', | 415 | FORM is `(OP FORM1)', where OP is one of the `zero-or-one', |
| @@ -484,10 +498,10 @@ of all atomic regexps." | |||
| 484 | 498 | ||
| 485 | 499 | ||
| 486 | (defun rx-greedy (form) | 500 | (defun rx-greedy (form) |
| 487 | "Parse and produce code from FORM. If FORM is '(minimal-match | 501 | "Parse and produce code from FORM. |
| 488 | FORM1)', non-greedy versions of `*', `+', and `?' operators will be | 502 | If FORM is '(minimal-match FORM1)', non-greedy versions of `*', |
| 489 | used in FORM1. If FORM is '(maximal-match FORM1)', greedy operators | 503 | `+', and `?' operators will be used in FORM1. If FORM is |
| 490 | will be used." | 504 | '(maximal-match FORM1)', greedy operators will be used." |
| 491 | (rx-check form) | 505 | (rx-check form) |
| 492 | (let ((rx-greedy-flag (eq (car form) 'maximal-match))) | 506 | (let ((rx-greedy-flag (eq (car form) 'maximal-match))) |
| 493 | (rx-to-string (cadr form)))) | 507 | (rx-to-string (cadr form)))) |
| @@ -513,19 +527,19 @@ NO-GROUP non-nil means don't put shy groups around the result." | |||
| 513 | (cond ((stringp info) | 527 | (cond ((stringp info) |
| 514 | info) | 528 | info) |
| 515 | ((null info) | 529 | ((null info) |
| 516 | (error "Unknown Rx form `%s'" form)) | 530 | (error "Unknown rx form `%s'" form)) |
| 517 | (t | 531 | (t |
| 518 | (funcall (nth 0 info) form))))) | 532 | (funcall (nth 0 info) form))))) |
| 519 | ((consp form) | 533 | ((consp form) |
| 520 | (let ((info (rx-info (car form)))) | 534 | (let ((info (rx-info (car form)))) |
| 521 | (unless (consp info) | 535 | (unless (consp info) |
| 522 | (error "Unknown Rx form `%s'" (car form))) | 536 | (error "Unknown rx form `%s'" (car form))) |
| 523 | (let ((result (funcall (nth 0 info) form))) | 537 | (let ((result (funcall (nth 0 info) form))) |
| 524 | (if (or no-group (string-match "\\`\\\\[(]" result)) | 538 | (if (or no-group (string-match "\\`\\\\[(]" result)) |
| 525 | result | 539 | result |
| 526 | (concat "\\(?:" result "\\)"))))) | 540 | (concat "\\(?:" result "\\)"))))) |
| 527 | (t | 541 | (t |
| 528 | (error "Rx syntax error at `%s'" form)))) | 542 | (error "rx syntax error at `%s'" form)))) |
| 529 | 543 | ||
| 530 | 544 | ||
| 531 | ;;;###autoload | 545 | ;;;###autoload |
| @@ -666,6 +680,8 @@ CHAR | |||
| 666 | `character-quote' (\\s/) | 680 | `character-quote' (\\s/) |
| 667 | `comment-start' (\\s<) | 681 | `comment-start' (\\s<) |
| 668 | `comment-end' (\\s>) | 682 | `comment-end' (\\s>) |
| 683 | `string-delimiter' (\\s|) | ||
| 684 | `comment-delimiter' (\\s!) | ||
| 669 | 685 | ||
| 670 | `(not (syntax SYNTAX))' | 686 | `(not (syntax SYNTAX))' |
| 671 | matches a character that has not syntax SYNTAX. | 687 | matches a character that has not syntax SYNTAX. |
| @@ -694,6 +710,7 @@ CHAR | |||
| 694 | `japanese-katakana-two-byte' (\\cK) | 710 | `japanese-katakana-two-byte' (\\cK) |
| 695 | `korean-hangul-two-byte' (\\cN) | 711 | `korean-hangul-two-byte' (\\cN) |
| 696 | `cyrillic-two-byte' (\\cY) | 712 | `cyrillic-two-byte' (\\cY) |
| 713 | `combining-diacritic' (\\c^) | ||
| 697 | `ascii' (\\ca) | 714 | `ascii' (\\ca) |
| 698 | `arabic' (\\cb) | 715 | `arabic' (\\cb) |
| 699 | `chinese' (\\cc) | 716 | `chinese' (\\cc) |
| @@ -733,7 +750,7 @@ CHAR | |||
| 733 | 750 | ||
| 734 | `(minimal-match SEXP)' | 751 | `(minimal-match SEXP)' |
| 735 | produce a non-greedy regexp for SEXP. Normally, regexps matching | 752 | produce a non-greedy regexp for SEXP. Normally, regexps matching |
| 736 | zero or more occurrances of something are \"greedy\" in that they | 753 | zero or more occurrences of something are \"greedy\" in that they |
| 737 | match as much as they can, as long as the overall regexp can | 754 | match as much as they can, as long as the overall regexp can |
| 738 | still match. A non-greedy regexp matches as little as possible. | 755 | still match. A non-greedy regexp matches as little as possible. |
| 739 | 756 | ||
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 77e47216b2d..6c2c7e26ea0 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el | |||
| @@ -61,7 +61,8 @@ | |||
| 61 | ;; | 61 | ;; |
| 62 | ;; You can also use the command highlight-compare-with-file to show changes | 62 | ;; You can also use the command highlight-compare-with-file to show changes |
| 63 | ;; in this file compared with another file (typically the previous version | 63 | ;; in this file compared with another file (typically the previous version |
| 64 | ;; of the file). | 64 | ;; of the file). The command highlight-compare-buffers can be used to |
| 65 | ;; compare two buffers. | ||
| 65 | ;; | 66 | ;; |
| 66 | ;; | 67 | ;; |
| 67 | ;; There are currently three hooks run by `highlight-changes-mode': | 68 | ;; There are currently three hooks run by `highlight-changes-mode': |
| @@ -147,6 +148,7 @@ | |||
| 147 | ;; highlight-changes-remove-highlight | 148 | ;; highlight-changes-remove-highlight |
| 148 | ;; highlight-changes-rotate-faces | 149 | ;; highlight-changes-rotate-faces |
| 149 | ;; highlight-compare-with-file | 150 | ;; highlight-compare-with-file |
| 151 | ;; highlight-compare-buffers | ||
| 150 | 152 | ||
| 151 | ;; | 153 | ;; |
| 152 | ;; You can automatically rotate faces when the buffer is saved; | 154 | ;; You can automatically rotate faces when the buffer is saved; |
| @@ -174,7 +176,7 @@ | |||
| 174 | 176 | ||
| 175 | ;;; History: | 177 | ;;; History: |
| 176 | 178 | ||
| 177 | ;; R Sharman (rsharman@magma.ca) Feb 1998: | 179 | ;; R Sharman (rsharman@pobox.com) Feb 1998: |
| 178 | ;; - initial release as change-mode. | 180 | ;; - initial release as change-mode. |
| 179 | ;; Jari Aalto <jari.aalto@ntc.nokia.com> Mar 1998 | 181 | ;; Jari Aalto <jari.aalto@ntc.nokia.com> Mar 1998 |
| 180 | ;; - fixes for byte compile errors | 182 | ;; - fixes for byte compile errors |
| @@ -187,7 +189,9 @@ | |||
| 187 | ;; - Changed to use overlays | 189 | ;; - Changed to use overlays |
| 188 | ;; August 98 | 190 | ;; August 98 |
| 189 | ;; - renamed to Highlight Changes mode. | 191 | ;; - renamed to Highlight Changes mode. |
| 190 | 192 | ;; Dec 2003 | |
| 193 | ;; - Use require for ediff stuff | ||
| 194 | ;; - Added highlight-compare-buffers | ||
| 191 | 195 | ||
| 192 | ;;; Code: | 196 | ;;; Code: |
| 193 | 197 | ||
| @@ -401,17 +405,8 @@ Otherwise, this list will be constructed when needed from | |||
| 401 | (make-variable-buffer-local 'hilit-chg-string) | 405 | (make-variable-buffer-local 'hilit-chg-string) |
| 402 | 406 | ||
| 403 | 407 | ||
| 404 | 408 | (require 'ediff-init) | |
| 405 | (eval-and-compile | 409 | (require 'ediff-util) |
| 406 | ;; For highlight-compare-with-file | ||
| 407 | (defvar ediff-number-of-differences) | ||
| 408 | (autoload 'ediff-setup "ediff") | ||
| 409 | (autoload 'ediff-with-current-buffer "ediff") | ||
| 410 | (autoload 'ediff-really-quit "ediff") | ||
| 411 | (autoload 'ediff-make-fine-diffs "ediff") | ||
| 412 | (autoload 'ediff-get-fine-diff-vector "ediff") | ||
| 413 | (autoload 'ediff-get-difference "ediff")) | ||
| 414 | |||
| 415 | 410 | ||
| 416 | 411 | ||
| 417 | ;;; Functions... | 412 | ;;; Functions... |
| @@ -803,16 +798,108 @@ buffer to be saved): | |||
| 803 | nil) | 798 | nil) |
| 804 | 799 | ||
| 805 | ;; ======================================================================== | 800 | ;; ======================================================================== |
| 806 | ;; Comparing with an existing file. | 801 | ;; Comparing buffers/files |
| 807 | ;; This uses ediff to find the differences. | 802 | ;; These use ediff to find the differences. |
| 803 | |||
| 804 | (defun highlight-markup-buffers | ||
| 805 | (buf-a file-a buf-b file-b &optional markup-a-only) | ||
| 806 | "Get differences between two buffers and set highlight changes. | ||
| 807 | Both buffers are done unless optional parameter MARKUP-A-ONLY | ||
| 808 | is non-nil." | ||
| 809 | (save-window-excursion | ||
| 810 | (let* (change-info | ||
| 811 | change-a change-b | ||
| 812 | a-start a-end len-a | ||
| 813 | b-start b-end len-b | ||
| 814 | (bufa-modified (buffer-modified-p buf-a)) | ||
| 815 | (bufb-modified (buffer-modified-p buf-b)) | ||
| 816 | (buf-a-read-only (with-current-buffer buf-a buffer-read-only)) | ||
| 817 | (buf-b-read-only (with-current-buffer buf-b buffer-read-only)) | ||
| 818 | temp-a temp-b) | ||
| 819 | (if (and file-a bufa-modified) | ||
| 820 | (if (y-or-n-p (format "Save buffer %s? " buf-a)) | ||
| 821 | (with-current-buffer buf-a | ||
| 822 | (save-buffer) | ||
| 823 | (setq bufa-modified (buffer-modified-p buf-a))) | ||
| 824 | (setq file-a nil))) | ||
| 825 | (or file-a | ||
| 826 | (setq temp-a (setq file-a (ediff-make-temp-file buf-a nil)))) | ||
| 827 | |||
| 828 | (if (and file-b bufb-modified) | ||
| 829 | (if (y-or-n-p (format "Save buffer %s? " buf-b)) | ||
| 830 | (with-current-buffer buf-b | ||
| 831 | (save-buffer) | ||
| 832 | (setq bufb-modified (buffer-modified-p buf-b))) | ||
| 833 | (setq file-b nil))) | ||
| 834 | (or file-b | ||
| 835 | (setq temp-b (setq file-b (ediff-make-temp-file buf-b nil)))) | ||
| 836 | (set-buffer buf-a) | ||
| 837 | (highlight-changes-mode 'active) | ||
| 838 | (or markup-a-only (with-current-buffer buf-b | ||
| 839 | (highlight-changes-mode 'active))) | ||
| 840 | (setq change-info (hilit-chg-get-diff-info buf-a file-a buf-b file-b)) | ||
| 841 | |||
| 842 | |||
| 843 | (setq change-a (car change-info)) | ||
| 844 | (setq change-b (car (cdr change-info))) | ||
| 845 | |||
| 846 | (hilit-chg-make-list) | ||
| 847 | (while change-a | ||
| 848 | (setq a-start (nth 0 (car change-a))) | ||
| 849 | (setq a-end (nth 1 (car change-a))) | ||
| 850 | (setq b-start (nth 0 (car change-b))) | ||
| 851 | (setq b-end (nth 1 (car change-b))) | ||
| 852 | (setq len-a (- a-end a-start)) | ||
| 853 | (setq len-b (- b-end b-start)) | ||
| 854 | (set-buffer buf-a) | ||
| 855 | (hilit-chg-set-face-on-change a-start a-end len-b buf-a-read-only) | ||
| 856 | (or markup-a-only | ||
| 857 | (with-current-buffer buf-b | ||
| 858 | (hilit-chg-set-face-on-change b-start b-end len-a | ||
| 859 | buf-b-read-only) | ||
| 860 | )) | ||
| 861 | (setq change-a (cdr change-a)) | ||
| 862 | (setq change-b (cdr change-b))) | ||
| 863 | (or bufa-modified | ||
| 864 | (with-current-buffer buf-a (set-buffer-modified-p nil))) | ||
| 865 | (or bufb-modified | ||
| 866 | (with-current-buffer buf-b (set-buffer-modified-p nil))) | ||
| 867 | (if temp-a | ||
| 868 | (delete-file temp-a)) | ||
| 869 | (if temp-b | ||
| 870 | (delete-file temp-b))) | ||
| 871 | )) | ||
| 872 | |||
| 873 | ;;;###autoload | ||
| 874 | (defun highlight-compare-buffers (buf-a buf-b) | ||
| 875 | "Compare two buffers and highlight the differences. | ||
| 876 | |||
| 877 | The default is the current buffer and the one in the next window. | ||
| 878 | |||
| 879 | If either buffer is modified and is visiting a file, you are prompted | ||
| 880 | to save the file. | ||
| 881 | |||
| 882 | Unless the buffer is unmodified and visiting a file, the buffer is | ||
| 883 | written to a temporary file for comparison. | ||
| 884 | |||
| 885 | If a buffer is read-only, differences will be highlighted but no property | ||
| 886 | changes are made, so \\[highlight-changes-next-change] and | ||
| 887 | \\[highlight-changes-previous-change] will not work." | ||
| 888 | (interactive | ||
| 889 | (list | ||
| 890 | (get-buffer (read-buffer "buffer-a " (current-buffer) t)) | ||
| 891 | (get-buffer | ||
| 892 | (read-buffer "buffer-b " | ||
| 893 | (window-buffer (next-window (selected-window))) t)))) | ||
| 894 | (let ((file-a (buffer-file-name buf-a)) | ||
| 895 | (file-b (buffer-file-name buf-b))) | ||
| 896 | (highlight-markup-buffers buf-a file-a buf-b file-b) | ||
| 897 | )) | ||
| 808 | 898 | ||
| 809 | ;;;###autoload | 899 | ;;;###autoload |
| 810 | (defun highlight-compare-with-file (file-b) | 900 | (defun highlight-compare-with-file (file-b) |
| 811 | "Compare this buffer with a file, and highlight differences. | 901 | "Compare this buffer with a file, and highlight differences. |
| 812 | 902 | ||
| 813 | The current buffer must be an unmodified buffer visiting a file, | ||
| 814 | and must not be read-only. | ||
| 815 | |||
| 816 | If the buffer has a backup filename, it is used as the default when | 903 | If the buffer has a backup filename, it is used as the default when |
| 817 | this function is called interactively. | 904 | this function is called interactively. |
| 818 | 905 | ||
| @@ -829,64 +916,24 @@ changes are made, so \\[highlight-changes-next-change] and | |||
| 829 | "" ;; directory | 916 | "" ;; directory |
| 830 | nil ;; default | 917 | nil ;; default |
| 831 | 'yes ;; must exist | 918 | 'yes ;; must exist |
| 832 | (let ((f (make-backup-file-name | 919 | (let ((f (buffer-file-name (current-buffer)))) |
| 833 | (or (buffer-file-name (current-buffer)) | 920 | (if f |
| 834 | (error "no file for this buffer"))))) | 921 | (progn |
| 835 | (if (file-exists-p f) f ""))))) | 922 | (setq f (make-backup-file-name f)) |
| 836 | 923 | (or (file-exists-p f) | |
| 924 | (setq f nil))) | ||
| 925 | ) | ||
| 926 | f)))) | ||
| 837 | (let* ((buf-a (current-buffer)) | 927 | (let* ((buf-a (current-buffer)) |
| 838 | (buf-a-read-only buffer-read-only) | ||
| 839 | (orig-pos (point)) | ||
| 840 | (file-a (buffer-file-name)) | 928 | (file-a (buffer-file-name)) |
| 841 | (existing-buf (get-file-buffer file-b)) | 929 | (existing-buf (get-file-buffer file-b)) |
| 842 | (buf-b (or existing-buf | 930 | (buf-b (or existing-buf |
| 843 | (find-file-noselect file-b))) | 931 | (find-file-noselect file-b))) |
| 844 | (buf-b-read-only (with-current-buffer buf-b buffer-read-only)) | 932 | (buf-b-read-only (with-current-buffer buf-b buffer-read-only))) |
| 845 | xy xx yy p q | 933 | (highlight-markup-buffers buf-a file-a buf-b file-b (not existing-buf)) |
| 846 | a-start a-end len-a | 934 | (unless existing-buf |
| 847 | b-start b-end len-b) | 935 | (kill-buffer buf-b)) |
| 848 | 936 | )) | |
| 849 | ;; We use the fact that the buffer is not marked modified at the | ||
| 850 | ;; end where we clear its modified status | ||
| 851 | (if (buffer-modified-p buf-a) | ||
| 852 | (if (y-or-n-p (format "OK to save %s? " file-a)) | ||
| 853 | (save-buffer buf-a) | ||
| 854 | (error "Buffer must be saved before comparing with a file"))) | ||
| 855 | (if (and existing-buf (buffer-modified-p buf-b)) | ||
| 856 | (if (y-or-n-p (format "OK to save %s? " file-b)) | ||
| 857 | (save-buffer buf-b) | ||
| 858 | (error "Cannot compare with a file in an unsaved buffer"))) | ||
| 859 | (highlight-changes-mode 'active) | ||
| 860 | (if existing-buf (with-current-buffer buf-b | ||
| 861 | (highlight-changes-mode 'active))) | ||
| 862 | (save-window-excursion | ||
| 863 | (setq xy (hilit-chg-get-diff-info buf-a file-a buf-b file-b))) | ||
| 864 | (setq xx (car xy)) | ||
| 865 | (setq p xx) | ||
| 866 | (setq yy (car (cdr xy))) | ||
| 867 | (setq q yy) | ||
| 868 | (hilit-chg-make-list) | ||
| 869 | (while p | ||
| 870 | (setq a-start (nth 0 (car p))) | ||
| 871 | (setq a-end (nth 1 (car p))) | ||
| 872 | (setq b-start (nth 0 (car q))) | ||
| 873 | (setq b-end (nth 1 (car q))) | ||
| 874 | (setq len-a (- a-end a-start)) | ||
| 875 | (setq len-b (- b-end b-start)) | ||
| 876 | (set-buffer buf-a) | ||
| 877 | (hilit-chg-set-face-on-change a-start a-end len-b buf-a-read-only) | ||
| 878 | (set-buffer-modified-p nil) | ||
| 879 | (goto-char orig-pos) | ||
| 880 | (if existing-buf | ||
| 881 | (with-current-buffer buf-b | ||
| 882 | (hilit-chg-set-face-on-change b-start b-end len-a | ||
| 883 | buf-b-read-only ) | ||
| 884 | )) | ||
| 885 | (setq p (cdr p)) | ||
| 886 | (setq q (cdr q))) | ||
| 887 | (if existing-buf | ||
| 888 | (set-buffer-modified-p nil) | ||
| 889 | (kill-buffer buf-b)))) | ||
| 890 | 937 | ||
| 891 | 938 | ||
| 892 | (defun hilit-chg-get-diff-info (buf-a file-a buf-b file-b) | 939 | (defun hilit-chg-get-diff-info (buf-a file-a buf-b file-b) |
diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 733129fc74f..8cbe1d80cd3 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el | |||
| @@ -116,11 +116,27 @@ These are symbols with hook-type values whose names don't end in | |||
| 116 | `-hook' or `-hooks', from which `unload-feature' tries to remove | 116 | `-hook' or `-hooks', from which `unload-feature' tries to remove |
| 117 | pertinent symbols.") | 117 | pertinent symbols.") |
| 118 | 118 | ||
| 119 | (defvar unload-hook-features-list nil | ||
| 120 | "List of features of the package being unloaded. | ||
| 121 | |||
| 122 | This is meant to be used by FEATURE-unload-hook hooks, see the | ||
| 123 | documentation of `unload-feature' for details.") | ||
| 124 | |||
| 119 | ;;;###autoload | 125 | ;;;###autoload |
| 120 | (defun unload-feature (feature &optional force) | 126 | (defun unload-feature (feature &optional force) |
| 121 | "Unload the library that provided FEATURE, restoring all its autoloads. | 127 | "Unload the library that provided FEATURE, restoring all its autoloads. |
| 122 | If the feature is required by any other loaded code, and prefix arg FORCE | 128 | If the feature is required by any other loaded code, and prefix arg FORCE |
| 123 | is nil, raise an error." | 129 | is nil, raise an error. |
| 130 | |||
| 131 | This function tries to undo modifications made by the package to | ||
| 132 | hooks. Packages may define a hook FEATURE-unload-hook that is called | ||
| 133 | instead of the normal heuristics for doing this. Such a hook should | ||
| 134 | undo all the relevant global state changes that may have been made by | ||
| 135 | loading the package or executing functions in it. It has access to | ||
| 136 | the package's feature list (before anything is unbound) in the | ||
| 137 | variable `unload-hook-features-list' and could remove features from it | ||
| 138 | in the event that the package has done something normally-ill-advised, | ||
| 139 | such as redefining an Emacs function." | ||
| 124 | (interactive (list (read-feature "Feature: ") current-prefix-arg)) | 140 | (interactive (list (read-feature "Feature: ") current-prefix-arg)) |
| 125 | (if (not (featurep feature)) | 141 | (if (not (featurep feature)) |
| 126 | (error "%s is not a currently loaded feature" (symbol-name feature))) | 142 | (error "%s is not a currently loaded feature" (symbol-name feature))) |
| @@ -130,8 +146,8 @@ is nil, raise an error." | |||
| 130 | (if dependents | 146 | (if dependents |
| 131 | (error "Loaded libraries %s depend on %s" | 147 | (error "Loaded libraries %s depend on %s" |
| 132 | (prin1-to-string dependents) file)))) | 148 | (prin1-to-string dependents) file)))) |
| 133 | (let* ((flist (feature-symbols feature)) | 149 | (let* ((unload-hook-features-list (feature-symbols feature)) |
| 134 | (file (car flist)) | 150 | (file (car unload-hook-features-list)) |
| 135 | (unload-hook (intern-soft (concat (symbol-name feature) | 151 | (unload-hook (intern-soft (concat (symbol-name feature) |
| 136 | "-unload-hook")))) | 152 | "-unload-hook")))) |
| 137 | ;; Try to avoid losing badly when hooks installed in critical | 153 | ;; Try to avoid losing badly when hooks installed in critical |
| @@ -155,10 +171,10 @@ is nil, raise an error." | |||
| 155 | (string-match "-hooks?\\'" (symbol-name x))) | 171 | (string-match "-hooks?\\'" (symbol-name x))) |
| 156 | (and (boundp x) ; Known abnormal hooks etc. | 172 | (and (boundp x) ; Known abnormal hooks etc. |
| 157 | (memq x unload-feature-special-hooks))) | 173 | (memq x unload-feature-special-hooks))) |
| 158 | (dolist (y (cdr flist)) | 174 | (dolist (y (cdr unload-hook-features-list)) |
| 159 | (remove-hook x y)))))) | 175 | (remove-hook x y)))))) |
| 160 | (if (fboundp 'elp-restore-function) ; remove ELP stuff first | 176 | (if (fboundp 'elp-restore-function) ; remove ELP stuff first |
| 161 | (dolist (elt (cdr flist)) | 177 | (dolist (elt (cdr unload-hook-features-list)) |
| 162 | (if (symbolp elt) | 178 | (if (symbolp elt) |
| 163 | (elp-restore-function elt)))) | 179 | (elp-restore-function elt)))) |
| 164 | (mapc | 180 | (mapc |
| @@ -183,7 +199,7 @@ is nil, raise an error." | |||
| 183 | (fmakunbound x) | 199 | (fmakunbound x) |
| 184 | (let ((aload (get x 'autoload))) | 200 | (let ((aload (get x 'autoload))) |
| 185 | (if aload (fset x (cons 'autoload aload)))))))) | 201 | (if aload (fset x (cons 'autoload aload)))))))) |
| 186 | (cdr flist)) | 202 | (cdr unload-hook-features-list)) |
| 187 | ;; Delete the load-history element for this file. | 203 | ;; Delete the load-history element for this file. |
| 188 | (let ((elt (assoc file load-history))) | 204 | (let ((elt (assoc file load-history))) |
| 189 | (setq load-history (delq elt load-history))))) | 205 | (setq load-history (delq elt load-history))))) |
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index b811e5991e7..43177b7c99b 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; rmail-spam-filter.el --- spam filter for rmail, the emacs mail reader. | 1 | ;;; rmail-spam-filter.el --- spam filter for rmail, the emacs mail reader. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002 |
| 4 | 4 | ;; Free Software Foundation, Inc. | |
| 5 | ;; Keywords: email, spam, filter, rmail | 5 | ;; Keywords: email, spam, filter, rmail |
| 6 | ;; Author: Eli Tziperman <eli AT deas.harvard.edu> | 6 | ;; Author: Eli Tziperman <eli AT deas.harvard.edu> |
| 7 | 7 | ||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;;; Automatically recognize and delete junk email before it is | 28 | ;;; Automatically recognize and delete junk email before it is |
| 29 | ;;; displayed in rmail/rmail-summary. Spam emails are defined by | 29 | ;;; displayed in rmail/rmail-summary. Spam emails are defined by |
| 30 | ;;; specifying one or more of the sender, subject and contents. | 30 | ;;; specifying one or more of the sender, subject and contents. |
| 31 | ;;; URL: http://deas.harvard.edu/climate/eli/Downloads/rmail-spam-filter/ | 31 | ;;; URL: http://www.weizmann.ac.il/~eli/Downloads/rmail-spam-filter/ |
| 32 | 32 | ||
| 33 | ;;; Usage: | 33 | ;;; Usage: |
| 34 | ;;; ------ | 34 | ;;; ------ |
| @@ -83,7 +83,9 @@ | |||
| 83 | ;;; sender's bbdb entry as well _if_ it was created at the same day. | 83 | ;;; sender's bbdb entry as well _if_ it was created at the same day. |
| 84 | 84 | ||
| 85 | (require 'rmail) | 85 | (require 'rmail) |
| 86 | (require 'rmailsum) | 86 | (if (> emacs-major-version 20) |
| 87 | (require 'rmailsum) | ||
| 88 | (if (not (fboundp 'rmail-make-summary-line)) (load-library "rmailsum"))) | ||
| 87 | 89 | ||
| 88 | ;; For find-if and other cool common lisp functions we may want to use. | 90 | ;; For find-if and other cool common lisp functions we may want to use. |
| 89 | (eval-when-compile | 91 | (eval-when-compile |
| @@ -93,7 +95,6 @@ | |||
| 93 | "Spam filter for RMAIL, the mail reader for Emacs." | 95 | "Spam filter for RMAIL, the mail reader for Emacs." |
| 94 | :group 'rmail) | 96 | :group 'rmail) |
| 95 | 97 | ||
| 96 | ;;;###autoload | ||
| 97 | (defcustom rmail-use-spam-filter nil | 98 | (defcustom rmail-use-spam-filter nil |
| 98 | "*Non-nil to activate the rmail spam filter. | 99 | "*Non-nil to activate the rmail spam filter. |
| 99 | Specify `rsf-definitions-alist' to define what you consider spam | 100 | Specify `rsf-definitions-alist' to define what you consider spam |
| @@ -214,7 +215,7 @@ for interaction with `rsf-bbdb-auto-delete-spam-entries'") | |||
| 214 | 215 | ||
| 215 | ;; the advantage over the automatic filter definitions is the AND conjunction | 216 | ;; the advantage over the automatic filter definitions is the AND conjunction |
| 216 | ;; of in-one-definition-elements | 217 | ;; of in-one-definition-elements |
| 217 | (defun rsf-check-field (field-symbol message-data definition result) | 218 | (defun check-field (field-symbol message-data definition result) |
| 218 | "Check if field-symbol is in `rsf-definitions-alist'. | 219 | "Check if field-symbol is in `rsf-definitions-alist'. |
| 219 | Capture maybe-spam and this-is-a-spam-email in a cons in result, | 220 | Capture maybe-spam and this-is-a-spam-email in a cons in result, |
| 220 | where maybe-spam is in first and this-is-a-spam-email is in rest. | 221 | where maybe-spam is in first and this-is-a-spam-email is in rest. |
| @@ -313,7 +314,7 @@ it from rmail file. Called for each new message retrieved by | |||
| 313 | this-is-a-spam-email nil)) | 314 | this-is-a-spam-email nil)) |
| 314 | 315 | ||
| 315 | ;; maybe-spam is in first, this-is-a-spam-email in rest, this | 316 | ;; maybe-spam is in first, this-is-a-spam-email in rest, this |
| 316 | ;; simplifies the call to rsf-check-field | 317 | ;; simplifies the call to check-field |
| 317 | (setq maybe-spam (cons maybe-spam this-is-a-spam-email)) | 318 | (setq maybe-spam (cons maybe-spam this-is-a-spam-email)) |
| 318 | 319 | ||
| 319 | ;; scan all elements of the list rsf-definitions-alist | 320 | ;; scan all elements of the list rsf-definitions-alist |
| @@ -344,18 +345,18 @@ it from rmail file. Called for each new message retrieved by | |||
| 344 | ;; scanned, AND if "from" field does not appear in spam | 345 | ;; scanned, AND if "from" field does not appear in spam |
| 345 | ;; definitions for this element, this may still be spam | 346 | ;; definitions for this element, this may still be spam |
| 346 | ;; due to another element... | 347 | ;; due to another element... |
| 347 | (rsf-check-field 'from message-sender definition maybe-spam) | 348 | (check-field 'from message-sender definition maybe-spam) |
| 348 | ;; next, if spam was not ruled out already, check recipients: | 349 | ;; next, if spam was not ruled out already, check recipients: |
| 349 | (rsf-check-field 'to message-recipients definition maybe-spam) | 350 | (check-field 'to message-recipients definition maybe-spam) |
| 350 | ;; next, if spam was not ruled out already, check subject: | 351 | ;; next, if spam was not ruled out already, check subject: |
| 351 | (rsf-check-field 'subject message-subject definition maybe-spam) | 352 | (check-field 'subject message-subject definition maybe-spam) |
| 352 | ;; next, if spam was not ruled out already, check content-type: | 353 | ;; next, if spam was not ruled out already, check content-type: |
| 353 | (rsf-check-field 'content-type message-content-type | 354 | (check-field 'content-type message-content-type |
| 354 | definition maybe-spam) | 355 | definition maybe-spam) |
| 355 | ;; next, if spam was not ruled out already, check | 356 | ;; next, if spam was not ruled out already, check |
| 356 | ;; contents: if contents field is not specified, this may | 357 | ;; contents: if contents field is not specified, this may |
| 357 | ;; still be spam due to another element... | 358 | ;; still be spam due to another element... |
| 358 | (rsf-check-field 'contents | 359 | (check-field 'contents |
| 359 | (buffer-substring | 360 | (buffer-substring |
| 360 | (rmail-msgbeg msg) (rmail-msgend msg)) | 361 | (rmail-msgbeg msg) (rmail-msgend msg)) |
| 361 | definition maybe-spam) | 362 | definition maybe-spam) |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 512c962c0bc..4090749d83e 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -1448,7 +1448,8 @@ It returns t if it got any new messages." | |||
| 1448 | (if (or file-name rmail-inbox-list) | 1448 | (if (or file-name rmail-inbox-list) |
| 1449 | (message "(No new mail has arrived)"))) | 1449 | (message "(No new mail has arrived)"))) |
| 1450 | ;; check new messages to see if any of them is spam: | 1450 | ;; check new messages to see if any of them is spam: |
| 1451 | (if rmail-use-spam-filter | 1451 | (if (and (featurep 'rmail-spam-filter) |
| 1452 | rmail-use-spam-filter) | ||
| 1452 | (let* | 1453 | (let* |
| 1453 | ((old-messages (- rmail-total-messages new-messages)) | 1454 | ((old-messages (- rmail-total-messages new-messages)) |
| 1454 | (rsf-scanned-message-number (1+ old-messages)) | 1455 | (rsf-scanned-message-number (1+ old-messages)) |
| @@ -1486,7 +1487,9 @@ It returns t if it got any new messages." | |||
| 1486 | (message "%d new message%s read%s" | 1487 | (message "%d new message%s read%s" |
| 1487 | new-messages (if (= 1 new-messages) "" "s") | 1488 | new-messages (if (= 1 new-messages) "" "s") |
| 1488 | ;; print out a message on number of spam messages found: | 1489 | ;; print out a message on number of spam messages found: |
| 1489 | (if (and rmail-use-spam-filter (> rsf-number-of-spam 0)) | 1490 | (if (and (featurep 'rmail-spam-filter) |
| 1491 | rmail-use-spam-filter | ||
| 1492 | (> rsf-number-of-spam 0)) | ||
| 1490 | (if (= 1 new-messages) | 1493 | (if (= 1 new-messages) |
| 1491 | ", and found to be a spam message" | 1494 | ", and found to be a spam message" |
| 1492 | (if (> rsf-number-of-spam 1) | 1495 | (if (> rsf-number-of-spam 1) |
| @@ -1494,7 +1497,9 @@ It returns t if it got any new messages." | |||
| 1494 | rsf-number-of-spam) | 1497 | rsf-number-of-spam) |
| 1495 | ", one of which found to be a spam message")) | 1498 | ", one of which found to be a spam message")) |
| 1496 | "")) | 1499 | "")) |
| 1497 | (if (and rmail-use-spam-filter (> rsf-number-of-spam 0)) | 1500 | (if (and (featurep 'rmail-spam-filter) |
| 1501 | rmail-use-spam-filter | ||
| 1502 | (> rsf-number-of-spam 0)) | ||
| 1498 | (progn (if rmail-spam-filter-beep (beep t)) | 1503 | (progn (if rmail-spam-filter-beep (beep t)) |
| 1499 | (sleep-for rmail-spam-sleep-after-message))) | 1504 | (sleep-for rmail-spam-sleep-after-message))) |
| 1500 | 1505 | ||
diff --git a/lisp/man.el b/lisp/man.el index faf153bc4c4..0e665af723e 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -801,6 +801,11 @@ Same for the ANSI bold and normal escape sequences." | |||
| 801 | ;; Try to recognize common forms of cross references. | 801 | ;; Try to recognize common forms of cross references. |
| 802 | (Man-highlight-references) | 802 | (Man-highlight-references) |
| 803 | (Man-softhyphen-to-minus) | 803 | (Man-softhyphen-to-minus) |
| 804 | (goto-char (point-min)) | ||
| 805 | (while (re-search-forward Man-heading-regexp nil t) | ||
| 806 | (put-text-property (match-beginning 0) | ||
| 807 | (match-end 0) | ||
| 808 | 'face Man-overstrike-face)) | ||
| 804 | (message "%s man page formatted" Man-arguments)) | 809 | (message "%s man page formatted" Man-arguments)) |
| 805 | 810 | ||
| 806 | (defun Man-highlight-references () | 811 | (defun Man-highlight-references () |
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index d4c6d6a37a3..dac6f228cd6 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el | |||
| @@ -89,8 +89,8 @@ Should be set to the number of terminal writes telnet will make | |||
| 89 | rejecting one login and prompting again for a username and password.") | 89 | rejecting one login and prompting again for a username and password.") |
| 90 | 90 | ||
| 91 | (defun telnet-interrupt-subjob () | 91 | (defun telnet-interrupt-subjob () |
| 92 | (interactive) | ||
| 93 | "Interrupt the program running through telnet on the remote host." | 92 | "Interrupt the program running through telnet on the remote host." |
| 93 | (interactive) | ||
| 94 | (send-string nil telnet-interrupt-string)) | 94 | (send-string nil telnet-interrupt-string)) |
| 95 | 95 | ||
| 96 | (defun telnet-c-z () | 96 | (defun telnet-c-z () |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index cf5a815fe95..91943503f5e 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -698,7 +698,7 @@ The numeric prefix ARG can specify a number of chars to remove from the | |||
| 698 | comment markers." | 698 | comment markers." |
| 699 | (interactive "*r\nP") | 699 | (interactive "*r\nP") |
| 700 | (comment-normalize-vars) | 700 | (comment-normalize-vars) |
| 701 | (if (> beg end) (let (mid) (setq mid beg beg end end mid))) | 701 | (when (> beg end) (setq beg (prog1 end (setq end beg)))) |
| 702 | (save-excursion | 702 | (save-excursion |
| 703 | (if uncomment-region-function | 703 | (if uncomment-region-function |
| 704 | (funcall uncomment-region-function beg end arg) | 704 | (funcall uncomment-region-function beg end arg) |
| @@ -716,7 +716,35 @@ comment markers." | |||
| 716 | ;; Find the end of the comment. | 716 | ;; Find the end of the comment. |
| 717 | (ept (progn | 717 | (ept (progn |
| 718 | (goto-char spt) | 718 | (goto-char spt) |
| 719 | (unless (comment-forward) | 719 | (unless |
| 720 | (or | ||
| 721 | (comment-forward) | ||
| 722 | ;; Allow eob as comment-end instead of \n. | ||
| 723 | (and | ||
| 724 | (eobp) | ||
| 725 | (let ((s1 (aref (syntax-table) (char-after spt))) | ||
| 726 | (s2 (aref (syntax-table) | ||
| 727 | (or (char-after (1+ spt)) 0))) | ||
| 728 | (sn (aref (syntax-table) ?\n)) | ||
| 729 | (flag->b (car (string-to-syntax "> b"))) | ||
| 730 | (flag-1b (car (string-to-syntax " 1b"))) | ||
| 731 | (flag-2b (car (string-to-syntax " 2b")))) | ||
| 732 | (cond | ||
| 733 | ;; One-character comment-start terminated by | ||
| 734 | ;; \n. | ||
| 735 | ((and | ||
| 736 | (equal sn (string-to-syntax ">")) | ||
| 737 | (equal s1 (string-to-syntax "<"))) | ||
| 738 | (insert-char ?\n 1) | ||
| 739 | t) | ||
| 740 | ;; Two-character type b comment-start | ||
| 741 | ;; terminated by \n. | ||
| 742 | ((and | ||
| 743 | (= (logand (car sn) flag->b) flag->b) | ||
| 744 | (= (logand (car s1) flag-1b) flag-1b) | ||
| 745 | (= (logand (car s2) flag-2b) flag-2b)) | ||
| 746 | (insert-char ?\n 1) | ||
| 747 | t))))) | ||
| 720 | (error "Can't find the comment end")) | 748 | (error "Can't find the comment end")) |
| 721 | (point))) | 749 | (point))) |
| 722 | (box nil) | 750 | (box nil) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index c85a3db492d..03f267cb133 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -318,12 +318,7 @@ Sets `grep-last-buffer' and runs `grep-setup-hook'." | |||
| 318 | 'gnu))) | 318 | 'gnu))) |
| 319 | (unless grep-find-command | 319 | (unless grep-find-command |
| 320 | (setq grep-find-command | 320 | (setq grep-find-command |
| 321 | (cond ((not (executable-command-find-posix-p "find")) | 321 | (cond ((eq grep-find-use-xargs 'gnu) |
| 322 | (message | ||
| 323 | (concat "compile.el: Posix-style find(1) not found. " | ||
| 324 | "Please set `grep-find-command'.")) | ||
| 325 | nil) | ||
| 326 | ((eq grep-find-use-xargs 'gnu) | ||
| 327 | (format "%s . -type f -print0 | xargs -0 -e %s" | 322 | (format "%s . -type f -print0 | xargs -0 -e %s" |
| 328 | find-program grep-command)) | 323 | find-program grep-command)) |
| 329 | (grep-find-use-xargs | 324 | (grep-find-use-xargs |
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index eef93826367..694eea1285c 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el | |||
| @@ -243,7 +243,6 @@ with no args, if that value is non-nil." | |||
| 243 | (self-insert-command (prefix-numeric-value arg))))) | 243 | (self-insert-command (prefix-numeric-value arg))))) |
| 244 | 244 | ||
| 245 | (defun icon-indent-command (&optional whole-exp) | 245 | (defun icon-indent-command (&optional whole-exp) |
| 246 | (interactive "P") | ||
| 247 | "Indent current line as Icon code, or in some cases insert a tab character. | 246 | "Indent current line as Icon code, or in some cases insert a tab character. |
| 248 | If `icon-tab-always-indent' is non-nil (the default), always indent current | 247 | If `icon-tab-always-indent' is non-nil (the default), always indent current |
| 249 | line. Otherwise, indent the current line only if point is at the left margin | 248 | line. Otherwise, indent the current line only if point is at the left margin |
| @@ -253,6 +252,7 @@ A numeric argument, regardless of its value, means indent rigidly all the | |||
| 253 | lines of the expression starting after point so that this line becomes | 252 | lines of the expression starting after point so that this line becomes |
| 254 | properly indented. The relative indentation among the lines of the | 253 | properly indented. The relative indentation among the lines of the |
| 255 | expression are preserved." | 254 | expression are preserved." |
| 255 | (interactive "P") | ||
| 256 | (if whole-exp | 256 | (if whole-exp |
| 257 | ;; If arg, always indent this line as Icon | 257 | ;; If arg, always indent this line as Icon |
| 258 | ;; and shift remaining lines of expression the same amount. | 258 | ;; and shift remaining lines of expression the same amount. |
diff --git a/lisp/subr.el b/lisp/subr.el index 2e7b2f12ab0..0b3c3df4e8d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -210,18 +210,14 @@ If N is bigger than the length of X, return X." | |||
| 210 | x)))) | 210 | x)))) |
| 211 | 211 | ||
| 212 | (defun delete-dups (list) | 212 | (defun delete-dups (list) |
| 213 | "Destructively return LIST, with `equal' duplicates removed. | 213 | "Destructively remove `equal' duplicates from LIST. |
| 214 | LIST must be a proper list. The value of LIST after a call to | 214 | Store the result in LIST and return it. LIST must be a proper list. |
| 215 | this function is undefined. Use \(setq LIST (delete-dups LIST)) | 215 | Of several `equal' occurrences of an element in LIST, the first |
| 216 | if you want to store the return value in LIST. Of several | 216 | one is kept." |
| 217 | `equal' occurrences of an element in LIST, the last one is kept." | ||
| 218 | (while (member (car list) (cdr list)) | ||
| 219 | (pop list)) | ||
| 220 | (let ((tail list)) | 217 | (let ((tail list)) |
| 221 | (while tail | 218 | (while tail |
| 222 | (while (member (cadr tail) (cddr tail)) | 219 | (setcdr tail (delete (car tail) (cdr tail))) |
| 223 | (setcdr tail (cddr tail))) | 220 | (setq tail (cdr tail)))) |
| 224 | (pop tail))) | ||
| 225 | list) | 221 | list) |
| 226 | 222 | ||
| 227 | (defun number-sequence (from &optional to inc) | 223 | (defun number-sequence (from &optional to inc) |
| @@ -1985,10 +1981,8 @@ Zero means the entire text matched by the whole regexp or whole string. | |||
| 1985 | STRING should be given if the last search was by `string-match' on STRING." | 1981 | STRING should be given if the last search was by `string-match' on STRING." |
| 1986 | (if (match-beginning num) | 1982 | (if (match-beginning num) |
| 1987 | (if string | 1983 | (if string |
| 1988 | (let ((result | 1984 | (substring-no-properties string (match-beginning num) |
| 1989 | (substring string (match-beginning num) (match-end num)))) | 1985 | (match-end num)) |
| 1990 | (set-text-properties 0 (length result) nil result) | ||
| 1991 | result) | ||
| 1992 | (buffer-substring-no-properties (match-beginning num) | 1986 | (buffer-substring-no-properties (match-beginning num) |
| 1993 | (match-end num))))) | 1987 | (match-end num))))) |
| 1994 | 1988 | ||
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 0c5d969105f..f7595e24cb5 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -430,9 +430,9 @@ sentences. Also, every paragraph boundary terminates sentences as well." | |||
| 430 | (constrain-to-field nil opoint t))) | 430 | (constrain-to-field nil opoint t))) |
| 431 | 431 | ||
| 432 | (defun repunctuate-sentences () | 432 | (defun repunctuate-sentences () |
| 433 | (interactive) | ||
| 434 | "Put two spaces at the end of sentences from point to the end of buffer. | 433 | "Put two spaces at the end of sentences from point to the end of buffer. |
| 435 | It works using `query-replace-regexp'." | 434 | It works using `query-replace-regexp'." |
| 435 | (interactive) | ||
| 436 | (query-replace-regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +" | 436 | (query-replace-regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +" |
| 437 | "\\1\\2\\3 ")) | 437 | "\\1\\2\\3 ")) |
| 438 | 438 | ||
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index eb3bacd1d36..392f67d07d2 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,74 @@ | |||
| 1 | 2004-02-16 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * lists.texi (Sets And Lists): Update description of delete-dups. | ||
| 4 | |||
| 5 | 2004-02-16 Jesper Harder <harder@ifa.au.dk> (tiny change) | ||
| 6 | |||
| 7 | * keymaps.texi (Tool Bar): tool-bar-item => tool-bar-button. | ||
| 8 | |||
| 9 | 2004-02-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 10 | |||
| 11 | * frames.texi (Parameter Access): frame-parameters arg is optional. | ||
| 12 | modify-frame-parameters handles nil for FRAME. | ||
| 13 | (Window Frame Parameters): menu-bar-lines and tool-bar-lines | ||
| 14 | are all-or-nothing for certain toolkits. | ||
| 15 | Mention parameter wait-for-wm. | ||
| 16 | (Frames and Windows): In frame-first-window and frame-selected-window | ||
| 17 | the arg is optional. | ||
| 18 | (Input Focus): In redirect-frame-focus the second arg is optional. | ||
| 19 | (Window System Selections): Mention selection type CLIPBOARD. | ||
| 20 | Mention data-type UTF8_STRING. | ||
| 21 | Mention numbering of cut buffers. | ||
| 22 | (Resources): Describe x-resource-name. | ||
| 23 | |||
| 24 | 2004-02-16 Richard M. Stallman <rms@gnu.org> | ||
| 25 | |||
| 26 | * windows.texi (Buffers and Windows): Delete false table | ||
| 27 | about all-frames. | ||
| 28 | |||
| 29 | * syntax.texi (Parsing Expressions): Delete old caveat | ||
| 30 | about parse-sexp-ignore-comments. | ||
| 31 | |||
| 32 | * streams.texi (Output Variables): Add print-quoted. | ||
| 33 | |||
| 34 | * lists.texi (Building Lists): Minor cleanup. | ||
| 35 | |||
| 36 | * hash.texi (Creating Hash): Correct and clarify doc of WEAK values. | ||
| 37 | |||
| 38 | * display.texi (Overlays): Explain overlays use markers. | ||
| 39 | (Managing Overlays): Explain front-advance and rear-advance | ||
| 40 | in more detail. | ||
| 41 | |||
| 42 | * loading.texi (Unloading): Document unload-feature-special-hooks. | ||
| 43 | Get rid of fns-NNN.el file. | ||
| 44 | |||
| 45 | 2004-02-16 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change) | ||
| 46 | |||
| 47 | * help.texi (Describing Characters): Fix text-char-description | ||
| 48 | example output. | ||
| 49 | |||
| 50 | * edebug.texi (Using Edebug): Fix example. | ||
| 51 | |||
| 52 | * debugging.texi (Internals of Debugger): Fix return value. | ||
| 53 | |||
| 54 | * files.texi (Changing Files): Fix argname. | ||
| 55 | |||
| 56 | * calendar.texi: Fix parens, and default values. | ||
| 57 | |||
| 58 | * display.texi, frames.texi, internals.texi, modes.texi: Minor fixes. | ||
| 59 | * nonascii.texi, objects.texi, os.texi: Minor fixes. | ||
| 60 | * searching.texi, text.texi, tips.texi, windows.text: Minor fixes. | ||
| 61 | |||
| 62 | * positions.texi (Text Lines): Don't add -1 in current-line. | ||
| 63 | |||
| 64 | 2004-02-16 Richard M. Stallman <rms@gnu.org> | ||
| 65 | |||
| 66 | * compile.texi (Compiler Errors): if-boundp feature applies to cond. | ||
| 67 | |||
| 68 | 2004-02-16 Jesper Harder <harder@ifa.au.dk> (tiny change) | ||
| 69 | |||
| 70 | * processes.texi (Low-Level Network): Fix a typo. | ||
| 71 | |||
| 1 | 2004-02-12 Kim F. Storm <storm@cua.dk> | 72 | 2004-02-12 Kim F. Storm <storm@cua.dk> |
| 2 | 73 | ||
| 3 | * display.texi (Fringes): Use consistent wording. | 74 | * display.texi (Fringes): Use consistent wording. |
diff --git a/lispref/buffers.texi b/lispref/buffers.texi index 9cd9aa05fbb..4ca375a5c26 100644 --- a/lispref/buffers.texi +++ b/lispref/buffers.texi | |||
| @@ -678,7 +678,7 @@ proper value, @code{t} or @code{nil}. | |||
| 678 | 678 | ||
| 679 | @defun barf-if-buffer-read-only | 679 | @defun barf-if-buffer-read-only |
| 680 | This function signals a @code{buffer-read-only} error if the current | 680 | This function signals a @code{buffer-read-only} error if the current |
| 681 | buffer is read-only. @xref{Interactive Call}, for another way to | 681 | buffer is read-only. @xref{Using Interactive}, for another way to |
| 682 | signal an error if the current buffer is read-only. | 682 | signal an error if the current buffer is read-only. |
| 683 | @end defun | 683 | @end defun |
| 684 | 684 | ||
diff --git a/lispref/calendar.texi b/lispref/calendar.texi index c93fd016d4f..709f80f6b8b 100644 --- a/lispref/calendar.texi +++ b/lispref/calendar.texi | |||
| @@ -259,8 +259,8 @@ divisible by 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 |
| 262 | (list 11 1 year)))))) | 262 | (list 11 1 year))))))) |
| 263 | "US Presidential Election")) | 263 | "US Presidential Election") |
| 264 | @end smallexample | 264 | @end smallexample |
| 265 | 265 | ||
| 266 | @noindent | 266 | @noindent |
| @@ -967,7 +967,7 @@ how far in advance it begins doing so, by setting these variables: | |||
| 967 | @table @code | 967 | @table @code |
| 968 | @item appt-message-warning-time | 968 | @item appt-message-warning-time |
| 969 | The time in minutes before an appointment that the reminder begins. The | 969 | The time in minutes before an appointment that the reminder begins. The |
| 970 | default is 10 minutes. | 970 | default is 12 minutes. |
| 971 | @item appt-audible | 971 | @item appt-audible |
| 972 | If this is non-@code{nil}, Emacs rings the | 972 | If this is non-@code{nil}, Emacs rings the |
| 973 | terminal bell for appointment reminders. The default is @code{t}. | 973 | terminal bell for appointment reminders. The default is @code{t}. |
| @@ -988,7 +988,7 @@ This variable holds a function to use to get rid of the appointment | |||
| 988 | message window, when its time is up. | 988 | message window, when its time is up. |
| 989 | @item appt-display-duration | 989 | @item appt-display-duration |
| 990 | The number of seconds to display an appointment message. The default | 990 | The number of seconds to display an appointment message. The default |
| 991 | is 5 seconds. | 991 | is 10 seconds. |
| 992 | @end table | 992 | @end table |
| 993 | 993 | ||
| 994 | @ignore | 994 | @ignore |
diff --git a/lispref/compile.texi b/lispref/compile.texi index 960b00dd6fc..a201a225379 100644 --- a/lispref/compile.texi +++ b/lispref/compile.texi | |||
| @@ -448,9 +448,11 @@ function @var{func} by conditionalizing the function call on a | |||
| 448 | @end example | 448 | @end example |
| 449 | 449 | ||
| 450 | @noindent | 450 | @noindent |
| 451 | The call to @var{func} must be in the @var{then-form} of the @code{if}, | 451 | The call to @var{func} must be in the @var{then-form} of the |
| 452 | and @var{func} must appear quoted in the call to @code{fboundp}. | 452 | @code{if}, and @var{func} must appear quoted in the call to |
| 453 | Likewise, you can suppress a compiler warning for an unbound variable | 453 | @code{fboundp}. (This feature operates for @code{cond} as well.) |
| 454 | |||
| 455 | Likewise, you can suppress a compiler warning for an unbound variable | ||
| 454 | @var{variable} by conditionalizing its use on a @code{boundp} test, | 456 | @var{variable} by conditionalizing its use on a @code{boundp} test, |
| 455 | like this: | 457 | like this: |
| 456 | 458 | ||
diff --git a/lispref/debugging.texi b/lispref/debugging.texi index e98adaa22e4..f9096cbef2a 100644 --- a/lispref/debugging.texi +++ b/lispref/debugging.texi | |||
| @@ -551,7 +551,7 @@ forms are elided. | |||
| 551 | (1+ var) | 551 | (1+ var) |
| 552 | (list 'testing (backtrace)))))))) | 552 | (list 'testing (backtrace)))))))) |
| 553 | 553 | ||
| 554 | @result{} nil | 554 | @result{} (testing nil) |
| 555 | @end group | 555 | @end group |
| 556 | 556 | ||
| 557 | @group | 557 | @group |
diff --git a/lispref/display.texi b/lispref/display.texi index 54ba32c39da..89e9998094c 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -445,7 +445,7 @@ Normally you should not change the value of this variable. | |||
| 445 | @end defvar | 445 | @end defvar |
| 446 | 446 | ||
| 447 | @defvar warning-prefix-function | 447 | @defvar warning-prefix-function |
| 448 | If non-@code{nil}, te value is a function to generate prefix text for | 448 | If non-@code{nil}, the value is a function to generate prefix text for |
| 449 | warnings. Programs can bind the variable to a suitable function. | 449 | warnings. Programs can bind the variable to a suitable function. |
| 450 | @code{display-warning} calls this function with the warnings buffer | 450 | @code{display-warning} calls this function with the warnings buffer |
| 451 | current, and the function can insert text in it. That text becomes | 451 | current, and the function can insert text in it. That text becomes |
| @@ -454,7 +454,7 @@ the beginning of the warning message. | |||
| 454 | The function is called with two arguments, the severity level and its | 454 | The function is called with two arguments, the severity level and its |
| 455 | entry in @code{warning-levels}. It should return a list to use as the | 455 | entry in @code{warning-levels}. It should return a list to use as the |
| 456 | entry (this value need not be an actual member of | 456 | entry (this value need not be an actual member of |
| 457 | @code{warning-levels}). By constructing this value, the function to | 457 | @code{warning-levels}). By constructing this value, the function can |
| 458 | change the severity of the warning, or specify different handling for | 458 | change the severity of the warning, or specify different handling for |
| 459 | a given severity level. | 459 | a given severity level. |
| 460 | 460 | ||
| @@ -466,7 +466,7 @@ to call. | |||
| 466 | Programs can bind this variable to @code{t} to say that the next | 466 | Programs can bind this variable to @code{t} to say that the next |
| 467 | warning should begin a series. When several warnings form a series, | 467 | warning should begin a series. When several warnings form a series, |
| 468 | that means to leave point on the first warning of the series, rather | 468 | that means to leave point on the first warning of the series, rather |
| 469 | than keep move it for each warning so that it appears on the last one. | 469 | than keep moving it for each warning so that it appears on the last one. |
| 470 | The series ends when the local binding is unbound and | 470 | The series ends when the local binding is unbound and |
| 471 | @code{warning-series} becomes @code{nil} again. | 471 | @code{warning-series} becomes @code{nil} again. |
| 472 | 472 | ||
| @@ -600,7 +600,7 @@ is @code{t} remains invisible. | |||
| 600 | @end defun | 600 | @end defun |
| 601 | 601 | ||
| 602 | @defun remove-from-invisibility-spec element | 602 | @defun remove-from-invisibility-spec element |
| 603 | This removeds the element @var{element} from | 603 | This removes the element @var{element} from |
| 604 | @code{buffer-invisibility-spec}. This does nothing if @var{element} | 604 | @code{buffer-invisibility-spec}. This does nothing if @var{element} |
| 605 | is not in the list. | 605 | is not in the list. |
| 606 | @end defun | 606 | @end defun |
| @@ -966,6 +966,12 @@ object that belongs to a particular buffer, and has a specified | |||
| 966 | beginning and end. It also has properties that you can examine and set; | 966 | beginning and end. It also has properties that you can examine and set; |
| 967 | these affect the display of the text within the overlay. | 967 | these affect the display of the text within the overlay. |
| 968 | 968 | ||
| 969 | An overlays uses markers to record its beginning and end; thus, | ||
| 970 | editing the text of the buffer adjusts the beginning and end of each | ||
| 971 | overlay so that it stays with the text. When you create the overlay, | ||
| 972 | you can specify whether text inserted at the beginning should be | ||
| 973 | inside the overlay or outside, and likewise for the end of the overlay. | ||
| 974 | |||
| 969 | @menu | 975 | @menu |
| 970 | * Overlay Properties:: How to read and set properties. | 976 | * Overlay Properties:: How to read and set properties. |
| 971 | What properties do to the screen display. | 977 | What properties do to the screen display. |
| @@ -1195,7 +1201,11 @@ current buffer. | |||
| 1195 | 1201 | ||
| 1196 | The arguments @var{front-advance} and @var{rear-advance} specify the | 1202 | The arguments @var{front-advance} and @var{rear-advance} specify the |
| 1197 | insertion type for the start of the overlay and for the end of the | 1203 | insertion type for the start of the overlay and for the end of the |
| 1198 | overlay, respectively. @xref{Marker Insertion Types}. | 1204 | overlay, respectively. @xref{Marker Insertion Types}. If |
| 1205 | @var{front-advance} is non-@code{nil}, text inserted at the beginning | ||
| 1206 | of the overlay is excluded from the overlay. If @var{read-advance} is | ||
| 1207 | non-@code{nil}, text inserted at the beginning of the overlay is | ||
| 1208 | included in the overlay. | ||
| 1199 | @end defun | 1209 | @end defun |
| 1200 | 1210 | ||
| 1201 | @defun overlay-start overlay | 1211 | @defun overlay-start overlay |
| @@ -1923,7 +1933,7 @@ and examine the face attributes which existed in those versions. | |||
| 1923 | 1933 | ||
| 1924 | @tindex face-attribute-relative-p | 1934 | @tindex face-attribute-relative-p |
| 1925 | @defun face-attribute-relative-p attribute value | 1935 | @defun face-attribute-relative-p attribute value |
| 1926 | This function returns non-@code{nil} if @var{value}, when used as a | 1936 | This function returns non-@code{nil} if @var{value}, when used as |
| 1927 | the value of the face attribute @var{attribute}, is relative (that is, | 1937 | the value of the face attribute @var{attribute}, is relative (that is, |
| 1928 | if it modifies an underlying or inherited value of @var{attribute}). | 1938 | if it modifies an underlying or inherited value of @var{attribute}). |
| 1929 | @end defun | 1939 | @end defun |
| @@ -2496,7 +2506,7 @@ This function modifies the existing fontset @var{name} to | |||
| 2496 | use the font name @var{fontname} for the character @var{character}. | 2506 | use the font name @var{fontname} for the character @var{character}. |
| 2497 | 2507 | ||
| 2498 | If @var{name} is @code{nil}, this function modifies the default | 2508 | If @var{name} is @code{nil}, this function modifies the default |
| 2499 | fontset of which short name is @samp{fontset-default}. | 2509 | fontset, whose short name is @samp{fontset-default}. |
| 2500 | 2510 | ||
| 2501 | @var{character} may be a cons; @code{(@var{from} . @var{to})}, where | 2511 | @var{character} may be a cons; @code{(@var{from} . @var{to})}, where |
| 2502 | @var{from} and @var{to} are non-generic characters. In that case, use | 2512 | @var{from} and @var{to} are non-generic characters. In that case, use |
| @@ -2536,7 +2546,7 @@ does that, this function's value may not be accurate. | |||
| 2536 | 2546 | ||
| 2537 | The @dfn{fringes} of a window are thin vertical strips down the | 2547 | The @dfn{fringes} of a window are thin vertical strips down the |
| 2538 | sides that are used for displaying bitmaps that indicate truncation, | 2548 | sides that are used for displaying bitmaps that indicate truncation, |
| 2539 | continuation, and horizontal scrolling, the overlay arrow. The | 2549 | continuation, horizontal scrolling, and the overlay arrow. The |
| 2540 | fringes normally appear between the display margins and the window | 2550 | fringes normally appear between the display margins and the window |
| 2541 | text, but you can put them outside the display margins for a specific | 2551 | text, but you can put them outside the display margins for a specific |
| 2542 | buffer by setting @code{fringes-outside-margins} buffer-locally to a | 2552 | buffer by setting @code{fringes-outside-margins} buffer-locally to a |
| @@ -2559,10 +2569,11 @@ fringe in pixels. | |||
| 2559 | 2569 | ||
| 2560 | The values of these variables take effect when you display the | 2570 | The values of these variables take effect when you display the |
| 2561 | buffer in a window. If you change them while the buffer is visible, | 2571 | buffer in a window. If you change them while the buffer is visible, |
| 2562 | you can call @code{set-window-buffer} to display it in a window again. | 2572 | you can call @code{set-window-buffer} to display it once again in the |
| 2573 | same window, to make the changes take effect. | ||
| 2563 | 2574 | ||
| 2564 | @defun set-window-fringes window left &optional right outside-margins | 2575 | @defun set-window-fringes window left &optional right outside-margins |
| 2565 | This function sets the fringe widthes of window @var{window}. | 2576 | This function sets the fringe widths of window @var{window}. |
| 2566 | If @var{window} is @code{nil}, the selected window is used. | 2577 | If @var{window} is @code{nil}, the selected window is used. |
| 2567 | 2578 | ||
| 2568 | The argument @var{left} specifies the width in pixels of the left | 2579 | The argument @var{left} specifies the width in pixels of the left |
diff --git a/lispref/edebug.texi b/lispref/edebug.texi index 5520852c1a3..9789835780b 100644 --- a/lispref/edebug.texi +++ b/lispref/edebug.texi | |||
| @@ -124,7 +124,7 @@ Here we use periods to show the stop points in the function | |||
| 124 | @example | 124 | @example |
| 125 | (defun fac (n) | 125 | (defun fac (n) |
| 126 | .(if .(< 0 n.). | 126 | .(if .(< 0 n.). |
| 127 | .(* n. .(fac (1- n.).).). | 127 | .(* n. .(fac .(1- n.).).). |
| 128 | 1).) | 128 | 1).) |
| 129 | @end example | 129 | @end example |
| 130 | 130 | ||
diff --git a/lispref/files.texi b/lispref/files.texi index 04c27971445..f2c3638ac5f 100644 --- a/lispref/files.texi +++ b/lispref/files.texi | |||
| @@ -1341,7 +1341,7 @@ links. | |||
| 1341 | @end deffn | 1341 | @end deffn |
| 1342 | 1342 | ||
| 1343 | @defun define-logical-name varname string | 1343 | @defun define-logical-name varname string |
| 1344 | This function defines the logical name @var{name} to have the value | 1344 | This function defines the logical name @var{varname} to have the value |
| 1345 | @var{string}. It is available only on VMS. | 1345 | @var{string}. It is available only on VMS. |
| 1346 | @end defun | 1346 | @end defun |
| 1347 | 1347 | ||
diff --git a/lispref/frames.texi b/lispref/frames.texi index a9b29332200..02cc1e68f8d 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi | |||
| @@ -56,7 +56,7 @@ The frame is displayed on an MS-DOS terminal. | |||
| 56 | * Input Focus:: Specifying the selected frame. | 56 | * Input Focus:: Specifying the selected frame. |
| 57 | * Visibility of Frames:: Frames may be visible or invisible, or icons. | 57 | * Visibility of Frames:: Frames may be visible or invisible, or icons. |
| 58 | * Raising and Lowering:: Raising a frame makes it hide other windows; | 58 | * Raising and Lowering:: Raising a frame makes it hide other windows; |
| 59 | lowering it makes the others hide them. | 59 | lowering it makes the others hide it. |
| 60 | * Frame Configurations:: Saving the state of all frames. | 60 | * Frame Configurations:: Saving the state of all frames. |
| 61 | * Mouse Tracking:: Getting events that say when the mouse moves. | 61 | * Mouse Tracking:: Getting events that say when the mouse moves. |
| 62 | * Mouse Position:: Asking where the mouse is, or moving it. | 62 | * Mouse Position:: Asking where the mouse is, or moving it. |
| @@ -212,9 +212,10 @@ of @var{frame}. If @var{frame} is @code{nil}, it returns the | |||
| 212 | selected frame's parameter. | 212 | selected frame's parameter. |
| 213 | @end defun | 213 | @end defun |
| 214 | 214 | ||
| 215 | @defun frame-parameters frame | 215 | @defun frame-parameters &optional frame |
| 216 | The function @code{frame-parameters} returns an alist listing all the | 216 | The function @code{frame-parameters} returns an alist listing all the |
| 217 | parameters of @var{frame} and their values. | 217 | parameters of @var{frame} and their values. If @var{frame} is |
| 218 | @code{nil} or omitted, this returns the selected frame's parameters | ||
| 218 | @end defun | 219 | @end defun |
| 219 | 220 | ||
| 220 | @defun modify-frame-parameters frame alist | 221 | @defun modify-frame-parameters frame alist |
| @@ -222,7 +223,8 @@ This function alters the parameters of frame @var{frame} based on the | |||
| 222 | elements of @var{alist}. Each element of @var{alist} has the form | 223 | elements of @var{alist}. Each element of @var{alist} has the form |
| 223 | @code{(@var{parm} . @var{value})}, where @var{parm} is a symbol naming a | 224 | @code{(@var{parm} . @var{value})}, where @var{parm} is a symbol naming a |
| 224 | parameter. If you don't mention a parameter in @var{alist}, its value | 225 | parameter. If you don't mention a parameter in @var{alist}, its value |
| 225 | doesn't change. | 226 | doesn't change. If @var{frame} is @code{nil}, it defaults to the selected |
| 227 | frame. | ||
| 226 | @end defun | 228 | @end defun |
| 227 | 229 | ||
| 228 | @defun modify-all-frames-parameters alist | 230 | @defun modify-all-frames-parameters alist |
| @@ -505,9 +507,8 @@ Display a horizontal bar @var{width} pixels high. | |||
| 505 | 507 | ||
| 506 | @vindex cursor-type | 508 | @vindex cursor-type |
| 507 | The buffer-local variable @code{cursor-type} overrides the value of | 509 | The buffer-local variable @code{cursor-type} overrides the value of |
| 508 | the @code{cursor-type} frame parameter, and can in addition have | 510 | the @code{cursor-type} frame parameter, but if it is @code{t}, that |
| 509 | values @code{t} (use the cursor specified for the frame) and | 511 | means to use the cursor specified for the frame. |
| 510 | @code{nil} (don't display a cursor). | ||
| 511 | 512 | ||
| 512 | @item border-width | 513 | @item border-width |
| 513 | The width in pixels of the window border. | 514 | The width in pixels of the window border. |
| @@ -542,7 +543,7 @@ iconified. @xref{Visibility of Frames}. | |||
| 542 | @item menu-bar-lines | 543 | @item menu-bar-lines |
| 543 | The number of lines to allocate at the top of the frame for a menu bar. | 544 | The number of lines to allocate at the top of the frame for a menu bar. |
| 544 | The default is 1. @xref{Menu Bar}. (In Emacs versions that use the X | 545 | The default is 1. @xref{Menu Bar}. (In Emacs versions that use the X |
| 545 | toolkit, there is only one menu bar line; all that matters about the | 546 | toolkit or GTK, there is only one menu bar line; all that matters about the |
| 546 | number you specify is whether it is greater than zero.) | 547 | number you specify is whether it is greater than zero.) |
| 547 | 548 | ||
| 548 | @item screen-gamma | 549 | @item screen-gamma |
| @@ -566,7 +567,9 @@ results for LCD color displays. | |||
| 566 | 567 | ||
| 567 | @item tool-bar-lines | 568 | @item tool-bar-lines |
| 568 | The number of lines to use for the toolbar. A value of @code{nil} means | 569 | The number of lines to use for the toolbar. A value of @code{nil} means |
| 569 | don't display a tool bar. | 570 | don't display a tool bar. (In Emacs versions that use GTK, there is |
| 571 | only one tool bar line; all that matters about the number you specify | ||
| 572 | is whether it is greater than zero.) | ||
| 570 | 573 | ||
| 571 | @item line-spacing | 574 | @item line-spacing |
| 572 | Additional space put below text lines in pixels (a positive integer). | 575 | Additional space put below text lines in pixels (a positive integer). |
| @@ -634,6 +637,12 @@ equivalent to the @code{:foreground} attribute of the | |||
| 634 | If non-@code{nil}, the color for the background of scroll bars. It is | 637 | If non-@code{nil}, the color for the background of scroll bars. It is |
| 635 | equivalent to the @code{:background} attribute of the | 638 | equivalent to the @code{:background} attribute of the |
| 636 | @code{scroll-bar} face. | 639 | @code{scroll-bar} face. |
| 640 | |||
| 641 | @item wait-for-wm | ||
| 642 | If non-@code{nil}, tell Xt to wait for the window manager to confirm | ||
| 643 | geometry changes. Some window managers, including versions of Fvwm2 | ||
| 644 | and KDE, fail to confirm, so Xt hangs. Set this to @code{nil} to | ||
| 645 | prevent hanging with those window managers. | ||
| 637 | @end table | 646 | @end table |
| 638 | 647 | ||
| 639 | @node Size and Position | 648 | @node Size and Position |
| @@ -909,8 +918,9 @@ upper left corner, down and to the right, until it reaches the window at | |||
| 909 | the lower right corner (always the minibuffer window, if the frame has | 918 | the lower right corner (always the minibuffer window, if the frame has |
| 910 | one), and then it moves back to the top. @xref{Cyclic Window Ordering}. | 919 | one), and then it moves back to the top. @xref{Cyclic Window Ordering}. |
| 911 | 920 | ||
| 912 | @defun frame-first-window frame | 921 | @defun frame-first-window &optional frame |
| 913 | This returns the topmost, leftmost window of frame @var{frame}. | 922 | This returns the topmost, leftmost window of frame @var{frame}. |
| 923 | If omitted or @code{nil}, @var{frame} defaults to the selected frame. | ||
| 914 | @end defun | 924 | @end defun |
| 915 | 925 | ||
| 916 | At any time, exactly one window on any frame is @dfn{selected within the | 926 | At any time, exactly one window on any frame is @dfn{selected within the |
| @@ -918,9 +928,9 @@ frame}. The significance of this designation is that selecting the | |||
| 918 | frame also selects this window. You can get the frame's current | 928 | frame also selects this window. You can get the frame's current |
| 919 | selected window with @code{frame-selected-window}. | 929 | selected window with @code{frame-selected-window}. |
| 920 | 930 | ||
| 921 | @defun frame-selected-window frame | 931 | @defun frame-selected-window &optional frame |
| 922 | This function returns the window on @var{frame} that is selected within | 932 | This function returns the window on @var{frame} that is selected within |
| 923 | @var{frame}. | 933 | @var{frame}. If omitted or @code{nil}, @var{frame} defaults to the selected frame. |
| 924 | @end defun | 934 | @end defun |
| 925 | 935 | ||
| 926 | @defun set-frame-selected-window frame window | 936 | @defun set-frame-selected-window frame window |
| @@ -1026,14 +1036,14 @@ Focus events normally do their job by invoking this command. | |||
| 1026 | Don't call it for any other reason. | 1036 | Don't call it for any other reason. |
| 1027 | @end deffn | 1037 | @end deffn |
| 1028 | 1038 | ||
| 1029 | @defun redirect-frame-focus frame focus-frame | 1039 | @defun redirect-frame-focus frame &optional focus-frame |
| 1030 | This function redirects focus from @var{frame} to @var{focus-frame}. | 1040 | This function redirects focus from @var{frame} to @var{focus-frame}. |
| 1031 | This means that @var{focus-frame} will receive subsequent keystrokes and | 1041 | This means that @var{focus-frame} will receive subsequent keystrokes and |
| 1032 | events intended for @var{frame}. After such an event, the value of | 1042 | events intended for @var{frame}. After such an event, the value of |
| 1033 | @code{last-event-frame} will be @var{focus-frame}. Also, switch-frame | 1043 | @code{last-event-frame} will be @var{focus-frame}. Also, switch-frame |
| 1034 | events specifying @var{frame} will instead select @var{focus-frame}. | 1044 | events specifying @var{frame} will instead select @var{focus-frame}. |
| 1035 | 1045 | ||
| 1036 | If @var{focus-frame} is @code{nil}, that cancels any existing | 1046 | If @var{focus-frame} is omitted or @code{nil}, that cancels any existing |
| 1037 | redirection for @var{frame}, which therefore once again receives its own | 1047 | redirection for @var{frame}, which therefore once again receives its own |
| 1038 | events. | 1048 | events. |
| 1039 | 1049 | ||
| @@ -1458,9 +1468,10 @@ The argument @var{data} may also be a vector of valid non-vector | |||
| 1458 | selection values. | 1468 | selection values. |
| 1459 | 1469 | ||
| 1460 | Each possible @var{type} has its own selection value, which changes | 1470 | Each possible @var{type} has its own selection value, which changes |
| 1461 | independently. The usual values of @var{type} are @code{PRIMARY} and | 1471 | independently. The usual values of @var{type} are @code{PRIMARY}, |
| 1462 | @code{SECONDARY}; these are symbols with upper-case names, in accord | 1472 | @code{SECONDARY} and @code{CLIPBOARD}; these are symbols with upper-case |
| 1463 | with X Window System conventions. The default is @code{PRIMARY}. | 1473 | names, in accord with X Window System conventions. The default is |
| 1474 | @code{PRIMARY}. | ||
| 1464 | @end defun | 1475 | @end defun |
| 1465 | 1476 | ||
| 1466 | @defun x-get-selection &optional type data-type | 1477 | @defun x-get-selection &optional type data-type |
| @@ -1472,6 +1483,7 @@ clients. It takes two optional arguments, @var{type} and | |||
| 1472 | The @var{data-type} argument specifies the form of data conversion to | 1483 | The @var{data-type} argument specifies the form of data conversion to |
| 1473 | use, to convert the raw data obtained from another X client into Lisp | 1484 | use, to convert the raw data obtained from another X client into Lisp |
| 1474 | data. Meaningful values include @code{TEXT}, @code{STRING}, | 1485 | data. Meaningful values include @code{TEXT}, @code{STRING}, |
| 1486 | @code{UTF8_STRING}, | ||
| 1475 | @code{TARGETS}, @code{LENGTH}, @code{DELETE}, @code{FILE_NAME}, | 1487 | @code{TARGETS}, @code{LENGTH}, @code{DELETE}, @code{FILE_NAME}, |
| 1476 | @code{CHARACTER_POSITION}, @code{LINE_NUMBER}, @code{COLUMN_NUMBER}, | 1488 | @code{CHARACTER_POSITION}, @code{LINE_NUMBER}, @code{COLUMN_NUMBER}, |
| 1477 | @code{OWNER_OS}, @code{HOST_NAME}, @code{USER}, @code{CLASS}, | 1489 | @code{OWNER_OS}, @code{HOST_NAME}, @code{USER}, @code{CLASS}, |
| @@ -1481,13 +1493,14 @@ upper-case names in accord with X conventions.) The default for | |||
| 1481 | @end defun | 1493 | @end defun |
| 1482 | 1494 | ||
| 1483 | @cindex cut buffer | 1495 | @cindex cut buffer |
| 1484 | The X server also has a set of numbered @dfn{cut buffers} which can | 1496 | The X server also has a set of eight numbered @dfn{cut buffers} which can |
| 1485 | store text or other data being moved between applications. Cut buffers | 1497 | store text or other data being moved between applications. Cut buffers |
| 1486 | are considered obsolete, but Emacs supports them for the sake of X | 1498 | are considered obsolete, but Emacs supports them for the sake of X |
| 1487 | clients that still use them. | 1499 | clients that still use them. Cut buffers are numbered from 0 to 7. |
| 1488 | 1500 | ||
| 1489 | @defun x-get-cut-buffer n | 1501 | @defun x-get-cut-buffer &optional n |
| 1490 | This function returns the contents of cut buffer number @var{n}. | 1502 | This function returns the contents of cut buffer number @var{n}. |
| 1503 | If omitted @var{n} defaults to 0. | ||
| 1491 | @end defun | 1504 | @end defun |
| 1492 | 1505 | ||
| 1493 | @defun x-set-cut-buffer string &optional push | 1506 | @defun x-set-cut-buffer string &optional push |
| @@ -1693,7 +1706,7 @@ instead of an actual name. The format | |||
| 1693 | 1706 | ||
| 1694 | @defun x-get-resource attribute class &optional component subclass | 1707 | @defun x-get-resource attribute class &optional component subclass |
| 1695 | The function @code{x-get-resource} retrieves a resource value from the X | 1708 | The function @code{x-get-resource} retrieves a resource value from the X |
| 1696 | Windows defaults database. | 1709 | Window defaults database. |
| 1697 | 1710 | ||
| 1698 | Resources are indexed by a combination of a @dfn{key} and a @dfn{class}. | 1711 | Resources are indexed by a combination of a @dfn{key} and a @dfn{class}. |
| 1699 | This function searches using a key of the form | 1712 | This function searches using a key of the form |
| @@ -1715,6 +1728,12 @@ resources for application names other than ``Emacs'' by binding this | |||
| 1715 | variable to some other string, around a call to @code{x-get-resource}. | 1728 | variable to some other string, around a call to @code{x-get-resource}. |
| 1716 | @end defvar | 1729 | @end defvar |
| 1717 | 1730 | ||
| 1731 | @defvar x-resource-name | ||
| 1732 | This variable specifies the instance name that @code{x-get-resource} | ||
| 1733 | should look up. The default value is the name Emacs was invoked with, | ||
| 1734 | or the value specified with the @samp{-name} or @samp{-rn} switches. | ||
| 1735 | @end defvar | ||
| 1736 | |||
| 1718 | @xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}. | 1737 | @xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}. |
| 1719 | 1738 | ||
| 1720 | @node Display Feature Testing | 1739 | @node Display Feature Testing |
diff --git a/lispref/hash.texi b/lispref/hash.texi index 909c7fb0b7c..3c4cb4df19c 100644 --- a/lispref/hash.texi +++ b/lispref/hash.texi | |||
| @@ -109,19 +109,19 @@ values from being collected as garbage (if they are not referenced | |||
| 109 | anywhere else); if a particular value does get collected, the | 109 | anywhere else); if a particular value does get collected, the |
| 110 | corresponding association is removed from the hash table. | 110 | corresponding association is removed from the hash table. |
| 111 | 111 | ||
| 112 | If @var{weak} is @code{key-or-value} or @code{t}, the hash table does | 112 | If @var{weak} is @code{key-and-value} or @code{t}, both the key and |
| 113 | not protect either keys or values from garbage collection; if either | 113 | the value must be live in order to preserve the association. Thus, |
| 114 | one is collected as garbage, the association is removed. | 114 | the hash table does not protect either keys or values from garbage |
| 115 | collection; if either one is collected as garbage, that removes the | ||
| 116 | association. | ||
| 115 | 117 | ||
| 116 | If @var{weak} is @code{key-and-value}, associations are removed from | 118 | If @var{weak} is @code{key-or-value}, either the key or |
| 117 | the hash table when both their key and value would be collected as | 119 | the value can preserve the association. Thus, associations are |
| 118 | garbage, again not considering references to the key and value from | 120 | removed from the hash table when both their key and value would be |
| 119 | weak hash tables. | 121 | collected as garbage (if not for references from weak hash tables). |
| 120 | 122 | ||
| 121 | The default for @var{weak} is @code{nil}, so that all keys and values | 123 | The default for @var{weak} is @code{nil}, so that all keys and values |
| 122 | referenced in the hash table are preserved from garbage collection. If | 124 | referenced in the hash table are preserved from garbage collection. |
| 123 | @var{weak} is @code{t}, neither keys nor values are protected (that is, | ||
| 124 | both are weak). | ||
| 125 | 125 | ||
| 126 | @item :size @var{size} | 126 | @item :size @var{size} |
| 127 | This specifies a hint for how many associations you plan to store in the | 127 | This specifies a hint for how many associations you plan to store in the |
diff --git a/lispref/help.texi b/lispref/help.texi index dc14b0226b5..9a55ebf6724 100644 --- a/lispref/help.texi +++ b/lispref/help.texi | |||
| @@ -432,7 +432,8 @@ This function returns a string describing @var{character} in the | |||
| 432 | standard Emacs notation for characters that appear in text---like | 432 | standard Emacs notation for characters that appear in text---like |
| 433 | @code{single-key-description}, except that control characters are | 433 | @code{single-key-description}, except that control characters are |
| 434 | represented with a leading caret (which is how control characters in | 434 | represented with a leading caret (which is how control characters in |
| 435 | Emacs buffers are usually displayed). | 435 | Emacs buffers are usually displayed) and character codes 128 |
| 436 | and above are not treated as Meta characters. | ||
| 436 | 437 | ||
| 437 | @smallexample | 438 | @smallexample |
| 438 | @group | 439 | @group |
| @@ -441,11 +442,11 @@ Emacs buffers are usually displayed). | |||
| 441 | @end group | 442 | @end group |
| 442 | @group | 443 | @group |
| 443 | (text-char-description ?\M-m) | 444 | (text-char-description ?\M-m) |
| 444 | @result{} "M-m" | 445 | @result{} "\xed" |
| 445 | @end group | 446 | @end group |
| 446 | @group | 447 | @group |
| 447 | (text-char-description ?\C-\M-m) | 448 | (text-char-description ?\C-\M-m) |
| 448 | @result{} "M-^M" | 449 | @result{} "\x8d" |
| 449 | @end group | 450 | @end group |
| 450 | @end smallexample | 451 | @end smallexample |
| 451 | @end defun | 452 | @end defun |
diff --git a/lispref/internals.texi b/lispref/internals.texi index 907a01df9e9..3d75b04ca65 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi | |||
| @@ -13,7 +13,7 @@ the preloaded Lisp libraries in it, how storage is allocated, and some | |||
| 13 | internal aspects of GNU Emacs that may be of interest to C programmers. | 13 | internal aspects of GNU Emacs that may be of interest to C programmers. |
| 14 | 14 | ||
| 15 | @menu | 15 | @menu |
| 16 | * Building Emacs:: How to the dumped Emacs is made. | 16 | * Building Emacs:: How the dumped Emacs is made. |
| 17 | * Pure Storage:: A kludge to make preloaded Lisp functions sharable. | 17 | * Pure Storage:: A kludge to make preloaded Lisp functions sharable. |
| 18 | * Garbage Collection:: Reclaiming space for Lisp objects no longer used. | 18 | * Garbage Collection:: Reclaiming space for Lisp objects no longer used. |
| 19 | * Memory Usage:: Info about total size of Lisp objects made so far. | 19 | * Memory Usage:: Info about total size of Lisp objects made so far. |
| @@ -1297,7 +1297,7 @@ onto the screen. | |||
| 1297 | 1297 | ||
| 1298 | @item redisplay_end_trigger | 1298 | @item redisplay_end_trigger |
| 1299 | If redisplay in this window goes beyond this buffer position, it runs | 1299 | If redisplay in this window goes beyond this buffer position, it runs |
| 1300 | run the @code{redisplay-end-trigger-hook}. | 1300 | the @code{redisplay-end-trigger-hook}. |
| 1301 | 1301 | ||
| 1302 | @ignore | 1302 | @ignore |
| 1303 | @item orig_height | 1303 | @item orig_height |
| @@ -1396,7 +1396,7 @@ A function called whenever the process receives a signal, or @code{nil}. | |||
| 1396 | The associated buffer of the process. | 1396 | The associated buffer of the process. |
| 1397 | 1397 | ||
| 1398 | @item pid | 1398 | @item pid |
| 1399 | An integer, the Unix process @acronym{ID}. | 1399 | An integer, the operating system's process @acronym{ID}. |
| 1400 | 1400 | ||
| 1401 | @item childp | 1401 | @item childp |
| 1402 | A flag, non-@code{nil} if this is really a child process. | 1402 | A flag, non-@code{nil} if this is really a child process. |
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index 9098266a54a..a67b208c6fd 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi | |||
| @@ -2324,7 +2324,7 @@ follows. | |||
| 2324 | @tindex tool-bar-add-item | 2324 | @tindex tool-bar-add-item |
| 2325 | This function adds an item to the tool bar by modifying | 2325 | This function adds an item to the tool bar by modifying |
| 2326 | @code{tool-bar-map}. The image to use is defined by @var{icon}, which | 2326 | @code{tool-bar-map}. The image to use is defined by @var{icon}, which |
| 2327 | is the base name of an XPM, XBM or PBM image file to located by | 2327 | is the base name of an XPM, XBM or PBM image file to be located by |
| 2328 | @code{find-image}. Given a value @samp{"exit"}, say, @file{exit.xpm}, | 2328 | @code{find-image}. Given a value @samp{"exit"}, say, @file{exit.xpm}, |
| 2329 | @file{exit.pbm} and @file{exit.xbm} would be searched for in that order | 2329 | @file{exit.pbm} and @file{exit.xbm} would be searched for in that order |
| 2330 | on a color display. On a monochrome display, the search order is | 2330 | on a color display. On a monochrome display, the search order is |
| @@ -2375,22 +2375,22 @@ show all defined tool bar items---but not larger than a quarter of the | |||
| 2375 | frame's height. | 2375 | frame's height. |
| 2376 | @end defvar | 2376 | @end defvar |
| 2377 | 2377 | ||
| 2378 | @tindex auto-raise-tool-bar-items | 2378 | @tindex auto-raise-tool-bar-buttons |
| 2379 | @defvar auto-raise-tool-bar-items | 2379 | @defvar auto-raise-tool-bar-buttons |
| 2380 | If this variable is non-@code{nil}, tool bar items display | 2380 | If this variable is non-@code{nil}, tool bar items display |
| 2381 | in raised form when the mouse moves over them. | 2381 | in raised form when the mouse moves over them. |
| 2382 | @end defvar | 2382 | @end defvar |
| 2383 | 2383 | ||
| 2384 | @tindex tool-bar-item-margin | 2384 | @tindex tool-bar-button-margin |
| 2385 | @defvar tool-bar-item-margin | 2385 | @defvar tool-bar-button-margin |
| 2386 | This variable specifies an extra margin to add around tool bar items. | 2386 | This variable specifies an extra margin to add around tool bar items. |
| 2387 | The value is an integer, a number of pixels. The default is 1. | 2387 | The value is an integer, a number of pixels. The default is 4. |
| 2388 | @end defvar | 2388 | @end defvar |
| 2389 | 2389 | ||
| 2390 | @tindex tool-bar-item-relief | 2390 | @tindex tool-bar-button-relief |
| 2391 | @defvar tool-bar-item-relief | 2391 | @defvar tool-bar-button-relief |
| 2392 | This variable specifies the shadow width for tool bar items. | 2392 | This variable specifies the shadow width for tool bar items. |
| 2393 | The value is an integer, a number of pixels. The default is 3. | 2393 | The value is an integer, a number of pixels. The default is 1. |
| 2394 | @end defvar | 2394 | @end defvar |
| 2395 | 2395 | ||
| 2396 | You can define a special meaning for clicking on a tool bar item with | 2396 | You can define a special meaning for clicking on a tool bar item with |
diff --git a/lispref/lists.texi b/lispref/lists.texi index cb033118984..e3891f81971 100644 --- a/lispref/lists.texi +++ b/lispref/lists.texi | |||
| @@ -448,7 +448,7 @@ interesting to note that @code{list} is used more times in the source | |||
| 448 | code for Emacs than @code{cons}. | 448 | code for Emacs than @code{cons}. |
| 449 | 449 | ||
| 450 | @defun cons object1 object2 | 450 | @defun cons object1 object2 |
| 451 | This function is the fundamental function used to build new list | 451 | This function is the fundamental function for building new list |
| 452 | structure. It creates a new cons cell, making @var{object1} the | 452 | structure. It creates a new cons cell, making @var{object1} the |
| 453 | @sc{car}, and @var{object2} the @sc{cdr}. It then returns the new cons | 453 | @sc{car}, and @var{object2} the @sc{cdr}. It then returns the new cons |
| 454 | cell. The arguments @var{object1} and @var{object2} may be any Lisp | 454 | cell. The arguments @var{object1} and @var{object2} may be any Lisp |
| @@ -1436,16 +1436,9 @@ comparison. | |||
| 1436 | 1436 | ||
| 1437 | @defun delete-dups list | 1437 | @defun delete-dups list |
| 1438 | This function destructively removes all @code{equal} duplicates from | 1438 | This function destructively removes all @code{equal} duplicates from |
| 1439 | @var{list} and returns the result. Of several @code{equal} | 1439 | @var{list}, stores the result in @var{list} and returns it. Of |
| 1440 | occurrences of an element in @var{list}, @code{delete-dups} keeps the | 1440 | several @code{equal} occurrences of an element in @var{list}, |
| 1441 | last one. | 1441 | @code{delete-dups} keeps the first one. |
| 1442 | |||
| 1443 | The value of @var{list} after a call to this function is undefined. | ||
| 1444 | Usually, we store the return value back in @var{list}: | ||
| 1445 | |||
| 1446 | @example | ||
| 1447 | (setq list (delete-dups list)) | ||
| 1448 | @end example | ||
| 1449 | @end defun | 1442 | @end defun |
| 1450 | 1443 | ||
| 1451 | See also the function @code{add-to-list}, in @ref{Setting Variables}, | 1444 | See also the function @code{add-to-list}, in @ref{Setting Variables}, |
diff --git a/lispref/loading.texi b/lispref/loading.texi index e171fc70fdf..893b41d2e51 100644 --- a/lispref/loading.texi +++ b/lispref/loading.texi | |||
| @@ -173,7 +173,7 @@ directory). | |||
| 173 | 173 | ||
| 174 | The value of @code{load-path} is initialized from the environment | 174 | The value of @code{load-path} is initialized from the environment |
| 175 | variable @code{EMACSLOADPATH}, if that exists; otherwise its default | 175 | variable @code{EMACSLOADPATH}, if that exists; otherwise its default |
| 176 | value is specified in @file{emacs/src/paths.h} when Emacs is built. | 176 | value is specified in @file{emacs/src/epaths.h} when Emacs is built. |
| 177 | Then the list is expanded by adding subdirectories of the directories | 177 | Then the list is expanded by adding subdirectories of the directories |
| 178 | in the list. | 178 | in the list. |
| 179 | 179 | ||
| @@ -790,18 +790,7 @@ The value of @code{load-history} may have one element whose @sc{car} is | |||
| 790 | by adding the symbols defined to the element for the file being visited, | 790 | by adding the symbols defined to the element for the file being visited, |
| 791 | rather than replacing that element. @xref{Eval}. | 791 | rather than replacing that element. @xref{Eval}. |
| 792 | 792 | ||
| 793 | Preloaded libraries don't contribute initially to @code{load-history}. | 793 | @defvar unload-feature-special-hooks |
| 794 | Instead, preloading writes information about preloaded libraries into a | ||
| 795 | file, which can be loaded later on to add information to | ||
| 796 | @code{load-history} describing the preloaded files. This file is | ||
| 797 | installed in @code{exec-directory} and has a name of the form | ||
| 798 | @file{fns-@var{emacsversion}.el}. | ||
| 799 | |||
| 800 | @findex symbol-file | ||
| 801 | See the source for the function @code{symbol-file}, for an example of | ||
| 802 | code that loads this file to find functions in preloaded libraries. | ||
| 803 | |||
| 804 | @defvar loadhist-special-hooks | ||
| 805 | This variable holds a list of hooks to be scanned before unloading a | 794 | This variable holds a list of hooks to be scanned before unloading a |
| 806 | library, to remove functions defined in the library. | 795 | library, to remove functions defined in the library. |
| 807 | @end defvar | 796 | @end defvar |
diff --git a/lispref/modes.texi b/lispref/modes.texi index 2292346ffdf..4b879cf476a 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -203,7 +203,7 @@ a newline. The command to insert a newline and then indent is | |||
| 203 | @kbd{C-j}. Please keep this distinction uniform for all major modes. | 203 | @kbd{C-j}. Please keep this distinction uniform for all major modes. |
| 204 | 204 | ||
| 205 | @item | 205 | @item |
| 206 | Major modes should not alter options that are primary a matter of user | 206 | Major modes should not alter options that are primarily a matter of user |
| 207 | preference, such as whether Auto-Fill mode is enabled. Leave this to | 207 | preference, such as whether Auto-Fill mode is enabled. Leave this to |
| 208 | each user to decide. However, a major mode should customize other | 208 | each user to decide. However, a major mode should customize other |
| 209 | variables so that Auto-Fill mode will work usefully @emph{if} the user | 209 | variables so that Auto-Fill mode will work usefully @emph{if} the user |
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index 419a23efae7..62bd28fd78b 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi | |||
| @@ -17,7 +17,7 @@ characters and how they are stored in strings and buffers. | |||
| 17 | * Selecting a Representation:: Treating a byte sequence as unibyte or multi. | 17 | * Selecting a Representation:: Treating a byte sequence as unibyte or multi. |
| 18 | * Character Codes:: How unibyte and multibyte relate to | 18 | * Character Codes:: How unibyte and multibyte relate to |
| 19 | codes of individual characters. | 19 | codes of individual characters. |
| 20 | * Character Sets:: The space of possible characters codes | 20 | * Character Sets:: The space of possible character codes |
| 21 | is divided into various character sets. | 21 | is divided into various character sets. |
| 22 | * Chars and Bytes:: More information about multibyte encodings. | 22 | * Chars and Bytes:: More information about multibyte encodings. |
| 23 | * Splitting Characters:: Converting a character to its byte sequence. | 23 | * Splitting Characters:: Converting a character to its byte sequence. |
| @@ -503,6 +503,14 @@ decoding, and for other purposes. Some coding systems specify their | |||
| 503 | own particular translation tables; there are also default translation | 503 | own particular translation tables; there are also default translation |
| 504 | tables which apply to all other coding systems. | 504 | tables which apply to all other coding systems. |
| 505 | 505 | ||
| 506 | For instance, the coding-system @code{utf-8} has a translation table | ||
| 507 | that maps characters of various charsets (e.g., | ||
| 508 | @code{latin-iso8859-@var{x}}) into Unicode character sets. This way, | ||
| 509 | it can encode Latin-2 characters into UTF-8. Meanwhile, | ||
| 510 | @code{unify-8859-on-decoding-mode} operates by specifying | ||
| 511 | @code{standard-translation-table-for-decode} to translate | ||
| 512 | Latin-@var{x} characters into corresponding Unicode characters. | ||
| 513 | |||
| 506 | @defun make-translation-table &rest translations | 514 | @defun make-translation-table &rest translations |
| 507 | This function returns a translation table based on the argument | 515 | This function returns a translation table based on the argument |
| 508 | @var{translations}. Each element of @var{translations} should be a | 516 | @var{translations}. Each element of @var{translations} should be a |
| @@ -558,6 +566,10 @@ coding systems that don't specify any other translation table. | |||
| 558 | Self-inserting characters are translated through this translation | 566 | Self-inserting characters are translated through this translation |
| 559 | table before they are inserted. This variable automatically becomes | 567 | table before they are inserted. This variable automatically becomes |
| 560 | buffer-local when set. | 568 | buffer-local when set. |
| 569 | |||
| 570 | @code{set-buffer-file-coding-system} sets this variable so that your | ||
| 571 | keyboard input gets translated into the character sets that the buffer | ||
| 572 | is likely to contain. | ||
| 561 | @end defvar | 573 | @end defvar |
| 562 | 574 | ||
| 563 | @node Coding Systems | 575 | @node Coding Systems |
| @@ -1065,7 +1077,7 @@ of the right way to use the variable: | |||
| 1065 | @example | 1077 | @example |
| 1066 | ;; @r{Read the file with no character code conversion.} | 1078 | ;; @r{Read the file with no character code conversion.} |
| 1067 | ;; @r{Assume @acronym{crlf} represents end-of-line.} | 1079 | ;; @r{Assume @acronym{crlf} represents end-of-line.} |
| 1068 | (let ((coding-system-for-write 'emacs-mule-dos)) | 1080 | (let ((coding-system-for-read 'emacs-mule-dos)) |
| 1069 | (insert-file-contents filename)) | 1081 | (insert-file-contents filename)) |
| 1070 | @end example | 1082 | @end example |
| 1071 | 1083 | ||
diff --git a/lispref/objects.texi b/lispref/objects.texi index 6cb5adb72b8..7c8eff06295 100644 --- a/lispref/objects.texi +++ b/lispref/objects.texi | |||
| @@ -1499,7 +1499,7 @@ positions. | |||
| 1499 | @cindex @samp{#@var{n}=} read syntax | 1499 | @cindex @samp{#@var{n}=} read syntax |
| 1500 | @cindex @samp{#@var{n}#} read syntax | 1500 | @cindex @samp{#@var{n}#} read syntax |
| 1501 | 1501 | ||
| 1502 | In Emacs 21, to represent shared or circular structure within a | 1502 | In Emacs 21, to represent shared or circular structures within a |
| 1503 | complex of Lisp objects, you can use the reader constructs | 1503 | complex of Lisp objects, you can use the reader constructs |
| 1504 | @samp{#@var{n}=} and @samp{#@var{n}#}. | 1504 | @samp{#@var{n}=} and @samp{#@var{n}#}. |
| 1505 | 1505 | ||
diff --git a/lispref/os.texi b/lispref/os.texi index 5401701b973..b5814372df9 100644 --- a/lispref/os.texi +++ b/lispref/os.texi | |||
| @@ -1306,7 +1306,7 @@ execution is very precise if Emacs is idle. | |||
| 1306 | function, because quitting out of many timer functions can leave | 1306 | function, because quitting out of many timer functions can leave |
| 1307 | things in an inconsistent state. This is normally unproblematical | 1307 | things in an inconsistent state. This is normally unproblematical |
| 1308 | because most timer functions don't do a lot of work. Indeed, for a | 1308 | because most timer functions don't do a lot of work. Indeed, for a |
| 1309 | timer to calls a function that takes substantial time to run is likely | 1309 | timer to call a function that takes substantial time to run is likely |
| 1310 | to be annoying. | 1310 | to be annoying. |
| 1311 | 1311 | ||
| 1312 | @defun run-at-time time repeat function &rest args | 1312 | @defun run-at-time time repeat function &rest args |
diff --git a/lispref/positions.texi b/lispref/positions.texi index 1dee0398050..100b55d01dd 100644 --- a/lispref/positions.texi +++ b/lispref/positions.texi | |||
| @@ -403,8 +403,7 @@ Here is an example of using @code{count-lines}: | |||
| 403 | (defun current-line () | 403 | (defun current-line () |
| 404 | "Return the vertical position of point@dots{}" | 404 | "Return the vertical position of point@dots{}" |
| 405 | (+ (count-lines (window-start) (point)) | 405 | (+ (count-lines (window-start) (point)) |
| 406 | (if (= (current-column) 0) 1 0) | 406 | (if (= (current-column) 0) 1 0))) |
| 407 | -1)) | ||
| 408 | @end group | 407 | @end group |
| 409 | @end example | 408 | @end example |
| 410 | @end defun | 409 | @end defun |
diff --git a/lispref/processes.texi b/lispref/processes.texi index 8e32962de67..c76261908d7 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi | |||
| @@ -1860,7 +1860,7 @@ to hosts on the same network as the local host. | |||
| 1860 | 1860 | ||
| 1861 | @item :keepalive @var{keepalive-flag} | 1861 | @item :keepalive @var{keepalive-flag} |
| 1862 | If @var{keepalive-flag} is non-@code{nil} for a stream connection, | 1862 | If @var{keepalive-flag} is non-@code{nil} for a stream connection, |
| 1863 | enable exchange of low-level keep-alive messa | 1863 | enable exchange of low-level keep-alive messages. |
| 1864 | 1864 | ||
| 1865 | @item :linger @var{linger-arg} | 1865 | @item :linger @var{linger-arg} |
| 1866 | If @var{linger-arg} is non-@code{nil}, wait for successful | 1866 | If @var{linger-arg} is non-@code{nil}, wait for successful |
diff --git a/lispref/searching.texi b/lispref/searching.texi index 94edaae6734..9e26363a43a 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi | |||
| @@ -20,8 +20,8 @@ portions of it. | |||
| 20 | * Regexp Search:: Searching for a match for a regexp. | 20 | * Regexp Search:: Searching for a match for a regexp. |
| 21 | * POSIX Regexps:: Searching POSIX-style for the longest match. | 21 | * POSIX Regexps:: Searching POSIX-style for the longest match. |
| 22 | * Search and Replace:: Internals of @code{query-replace}. | 22 | * Search and Replace:: Internals of @code{query-replace}. |
| 23 | * Match Data:: Finding out which part of the text matched | 23 | * Match Data:: Finding out which part of the text matched, |
| 24 | various parts of a regexp, after regexp search. | 24 | after a string or regexp search. |
| 25 | * Searching and Case:: Case-independent or case-significant searching. | 25 | * Searching and Case:: Case-independent or case-significant searching. |
| 26 | * Standard Regexps:: Useful regexps for finding sentences, pages,... | 26 | * Standard Regexps:: Useful regexps for finding sentences, pages,... |
| 27 | @end menu | 27 | @end menu |
| @@ -497,7 +497,7 @@ and nothing else. @samp{c[ad]\@{3\@}r} matches string such as | |||
| 497 | @samp{caaar}, @samp{cdddr}, @samp{cadar}, and so on. | 497 | @samp{caaar}, @samp{cdddr}, @samp{cadar}, and so on. |
| 498 | 498 | ||
| 499 | @item \@{@var{m},@var{n}\@} | 499 | @item \@{@var{m},@var{n}\@} |
| 500 | is more general postfix operator that specifies repetition with a | 500 | is a more general postfix operator that specifies repetition with a |
| 501 | minimum of @var{m} repeats and a maximum of @var{n} repeats. If @var{m} | 501 | minimum of @var{m} repeats and a maximum of @var{n} repeats. If @var{m} |
| 502 | is omitted, the minimum is 0; if @var{n} is omitted, there is no | 502 | is omitted, the minimum is 0; if @var{n} is omitted, there is no |
| 503 | maximum. | 503 | maximum. |
| @@ -1206,10 +1206,9 @@ Display some help, then ask again. | |||
| 1206 | @cindex match data | 1206 | @cindex match data |
| 1207 | 1207 | ||
| 1208 | Emacs keeps track of the start and end positions of the segments of | 1208 | Emacs keeps track of the start and end positions of the segments of |
| 1209 | text found during a regular expression search. This means, for example, | 1209 | text found during a search. This means, for example, that you can |
| 1210 | that you can search for a complex pattern, such as a date in an Rmail | 1210 | search for a complex pattern, such as a date in an Rmail message, and |
| 1211 | message, and then extract parts of the match under control of the | 1211 | then extract parts of the match under control of the pattern. |
| 1212 | pattern. | ||
| 1213 | 1212 | ||
| 1214 | Because the match data normally describe the most recent search only, | 1213 | Because the match data normally describe the most recent search only, |
| 1215 | you must be careful not to do another search inadvertently between the | 1214 | you must be careful not to do another search inadvertently between the |
| @@ -1665,7 +1664,7 @@ simplified) default value is: | |||
| 1665 | 1664 | ||
| 1666 | This means a period, question mark or exclamation mark (the actual | 1665 | This means a period, question mark or exclamation mark (the actual |
| 1667 | default value also lists their alternatives in other character sets), | 1666 | default value also lists their alternatives in other character sets), |
| 1668 | followed optionally by a closing parenthetical character, followed by | 1667 | followed optionally by closing parenthetical characters, followed by |
| 1669 | tabs, spaces or new lines. | 1668 | tabs, spaces or new lines. |
| 1670 | 1669 | ||
| 1671 | For a detailed explanation of this regular expression, see @ref{Regexp | 1670 | For a detailed explanation of this regular expression, see @ref{Regexp |
diff --git a/lispref/streams.texi b/lispref/streams.texi index b6f211116e6..a4e88b82f2e 100644 --- a/lispref/streams.texi +++ b/lispref/streams.texi | |||
| @@ -687,6 +687,13 @@ The value of this variable is the default output stream---the stream | |||
| 687 | that print functions use when the @var{stream} argument is @code{nil}. | 687 | that print functions use when the @var{stream} argument is @code{nil}. |
| 688 | @end defvar | 688 | @end defvar |
| 689 | 689 | ||
| 690 | @defvar print-quoted | ||
| 691 | If this is non-@code{nil}, that means to print quoted forms using | ||
| 692 | abbreviated reader syntax. @code{(quote foo)} prints as @code{'foo}, | ||
| 693 | @code{(function foo)} as @code{#'foo}, and backquoted forms print | ||
| 694 | using modern backquote syntax. | ||
| 695 | @end defvar | ||
| 696 | |||
| 690 | @defvar print-escape-newlines | 697 | @defvar print-escape-newlines |
| 691 | @cindex @samp{\n} in print | 698 | @cindex @samp{\n} in print |
| 692 | @cindex escape characters | 699 | @cindex escape characters |
diff --git a/lispref/syntax.texi b/lispref/syntax.texi index a2153cee4f8..b2955400c8f 100644 --- a/lispref/syntax.texi +++ b/lispref/syntax.texi | |||
| @@ -761,12 +761,6 @@ can still override the syntax.) | |||
| 761 | @cindex skipping comments | 761 | @cindex skipping comments |
| 762 | If the value is non-@code{nil}, then comments are treated as | 762 | 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}. | 763 | whitespace by the functions in this section and by @code{forward-sexp}. |
| 764 | |||
| 765 | In older Emacs versions, this feature worked only when the comment | ||
| 766 | terminator is something like @samp{*/}, and appears only to end a | ||
| 767 | comment. In languages where newlines terminate comments, it was | ||
| 768 | necessary make this variable @code{nil}, since not every newline is the | ||
| 769 | end of a comment. This limitation no longer exists. | ||
| 770 | @end defvar | 764 | @end defvar |
| 771 | 765 | ||
| 772 | @vindex parse-sexp-lookup-properties | 766 | @vindex parse-sexp-lookup-properties |
diff --git a/lispref/text.texi b/lispref/text.texi index 1b460aa5077..b6e477e6651 100644 --- a/lispref/text.texi +++ b/lispref/text.texi | |||
| @@ -159,7 +159,7 @@ the end of a line. | |||
| 159 | @node Buffer Contents | 159 | @node Buffer Contents |
| 160 | @section Examining Buffer Contents | 160 | @section Examining Buffer Contents |
| 161 | 161 | ||
| 162 | This section describes two functions that allow a Lisp program to | 162 | This section describes functions that allow a Lisp program to |
| 163 | convert any portion of the text in the buffer into a string. | 163 | convert any portion of the text in the buffer into a string. |
| 164 | 164 | ||
| 165 | @defun buffer-substring start end | 165 | @defun buffer-substring start end |
| @@ -351,9 +351,10 @@ unless all @var{args} are either strings or characters. The value is | |||
| 351 | 351 | ||
| 352 | This function is unlike the other insertion functions in that it | 352 | This function is unlike the other insertion functions in that it |
| 353 | relocates markers initially pointing at the insertion point, to point | 353 | relocates markers initially pointing at the insertion point, to point |
| 354 | after the inserted text. If an overlay begins the insertion point, the | 354 | after the inserted text. If an overlay begins at the insertion point, |
| 355 | inserted text falls outside the overlay; if a nonempty overlay ends at | 355 | the inserted text falls outside the overlay; if a nonempty overlay |
| 356 | the insertion point, the inserted text falls inside that overlay. | 356 | ends at the insertion point, the inserted text falls inside that |
| 357 | overlay. | ||
| 357 | @end defun | 358 | @end defun |
| 358 | 359 | ||
| 359 | @defun insert-char character count &optional inherit | 360 | @defun insert-char character count &optional inherit |
| @@ -2988,9 +2989,9 @@ functions (which may be the same function). In any case, all the | |||
| 2988 | @code{point-left} functions are called first, followed by all the | 2989 | @code{point-left} functions are called first, followed by all the |
| 2989 | @code{point-entered} functions. | 2990 | @code{point-entered} functions. |
| 2990 | 2991 | ||
| 2991 | It is possible using @code{char-after} to examine characters at various | 2992 | It is possible with @code{char-after} to examine characters at various |
| 2992 | positions without moving point to those positions. Only an actual | 2993 | buffer positions without moving point to those positions. Only an |
| 2993 | change in the value of point runs these hook functions. | 2994 | actual change in the value of point runs these hook functions. |
| 2994 | @end table | 2995 | @end table |
| 2995 | 2996 | ||
| 2996 | @defvar inhibit-point-motion-hooks | 2997 | @defvar inhibit-point-motion-hooks |
diff --git a/lispref/tips.texi b/lispref/tips.texi index c78d13f947e..e917a90b0e4 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -251,7 +251,7 @@ replacements differs from that of the originals. | |||
| 251 | 251 | ||
| 252 | @item | 252 | @item |
| 253 | Avoid using macros that define functions and variables with names that | 253 | Avoid using macros that define functions and variables with names that |
| 254 | are constructed. It is best for maintenance wen the name of the | 254 | are constructed. It is best for maintenance when the name of the |
| 255 | function or variable being defined is given explicitly in the source | 255 | function or variable being defined is given explicitly in the source |
| 256 | code, as the second element of the list---as it is when you use | 256 | code, as the second element of the list---as it is when you use |
| 257 | @code{defun}, @code{defalias}, @code{defvar} and @code{defopt}. | 257 | @code{defun}, @code{defalias}, @code{defvar} and @code{defopt}. |
diff --git a/lispref/windows.texi b/lispref/windows.texi index 425d5601ec9..f63ef744e67 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi | |||
| @@ -18,7 +18,7 @@ displayed in windows. | |||
| 18 | * Selecting Windows:: The selected window is the one that you edit in. | 18 | * Selecting Windows:: The selected window is the one that you edit in. |
| 19 | * Cyclic Window Ordering:: Moving around the existing windows. | 19 | * Cyclic Window Ordering:: Moving around the existing windows. |
| 20 | * Buffers and Windows:: Each window displays the contents of a buffer. | 20 | * Buffers and Windows:: Each window displays the contents of a buffer. |
| 21 | * Displaying Buffers:: Higher-lever functions for displaying a buffer | 21 | * Displaying Buffers:: Higher-level functions for displaying a buffer |
| 22 | and choosing a window for it. | 22 | and choosing a window for it. |
| 23 | * Choosing Window:: How to choose a window for displaying a buffer. | 23 | * Choosing Window:: How to choose a window for displaying a buffer. |
| 24 | * Window Point:: Each window has its own location of point. | 24 | * Window Point:: Each window has its own location of point. |
| @@ -720,21 +720,6 @@ The two optional arguments work like the optional arguments of | |||
| 720 | like the single optional argument of @code{get-buffer-window}. Perhaps | 720 | like the single optional argument of @code{get-buffer-window}. Perhaps |
| 721 | we should change @code{get-buffer-window} in the future to make it | 721 | we should change @code{get-buffer-window} in the future to make it |
| 722 | compatible with the other functions. | 722 | compatible with the other functions. |
| 723 | |||
| 724 | The argument @var{all-frames} controls which windows to consider. | ||
| 725 | |||
| 726 | @itemize @bullet | ||
| 727 | @item | ||
| 728 | If it is @code{nil}, consider windows on the selected frame. | ||
| 729 | @item | ||
| 730 | If it is @code{t}, consider windows on all frames. | ||
| 731 | @item | ||
| 732 | If it is @code{visible}, consider windows on all visible frames. | ||
| 733 | @item | ||
| 734 | If it is 0, consider windows on all visible or iconified frames. | ||
| 735 | @item | ||
| 736 | If it is a frame, consider windows on that frame. | ||
| 737 | @end itemize | ||
| 738 | @end defun | 723 | @end defun |
| 739 | 724 | ||
| 740 | @defvar buffer-display-time | 725 | @defvar buffer-display-time |
| @@ -616,8 +616,8 @@ echo "Making links to \`man'" | |||
| 616 | echo "Making links to \`lispref'" | 616 | echo "Making links to \`lispref'" |
| 617 | (cd lispref | 617 | (cd lispref |
| 618 | ln `ls -1 *.texi` ../${tempdir}/lispref | 618 | ln `ls -1 *.texi` ../${tempdir}/lispref |
| 619 | ln *.aux *.cps *.fns *.kys *.vrs index.*perm ../${tempdir}/lispref | 619 | ln *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/lispref |
| 620 | ln *.txt *.el spellfile permute-index tindex.pl ../${tempdir}/lispref | 620 | ln *.txt *.el spellfile tindex.pl ../${tempdir}/lispref |
| 621 | test -f README && ln README ../${tempdir}/lispref | 621 | test -f README && ln README ../${tempdir}/lispref |
| 622 | test -f Makefile.in && ln Makefile.in ../${tempdir}/lispref | 622 | test -f Makefile.in && ln Makefile.in ../${tempdir}/lispref |
| 623 | ln ChangeLog ../${tempdir}/lispref | 623 | ln ChangeLog ../${tempdir}/lispref |
diff --git a/src/ChangeLog b/src/ChangeLog index 179b7a16a48..020e02cafcf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,38 @@ | |||
| 1 | 2004-02-17 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * xdisp.c (fast_find_position): Fix return value of new version; | ||
| 4 | it was inverted compared to the 21.1 version. | ||
| 5 | (get_window_cursor_type): Don't look at glyph if NULL. | ||
| 6 | (display_and_set_cursor): Set glyph to NULL if cursor in fringe. | ||
| 7 | |||
| 8 | * keyboard.c: Rework previous change; it didn't consider that the | ||
| 9 | buf array was allocated on the stack. | ||
| 10 | (prev_read): Remove variable. | ||
| 11 | (read_avail_input_buf): New static event buffer array. | ||
| 12 | (in_read_avail_input): New static variable to handle re-entrancy. | ||
| 13 | (read_avail_input): Change buf to pinter to read_avail_input_buf. | ||
| 14 | Use in_read_avail_input to handle re-entrance; when re-entered, | ||
| 15 | fully initialize and use tmp_buf array instead of read_avail_input_buf. | ||
| 16 | Do not initialize read_avail_input_buf in full here; instead assume it | ||
| 17 | is always cleared on entry. To ensure that, we clear (just) the | ||
| 18 | entries that were used before we return. | ||
| 19 | (init_keyboard): Initialize read_avail_input_buf here. | ||
| 20 | |||
| 21 | 2004-02-16 Jesper Harder <harder@ifa.au.dk> (tiny change) | ||
| 22 | |||
| 23 | * cmds.c (Fend_of_line): Doc fix. | ||
| 24 | |||
| 25 | 2004-02-16 Dmitry Antipov <dmitry.antipov@mail.ru> (tiny change) | ||
| 26 | |||
| 27 | * keyboard.c (prev_read): New static variable. | ||
| 28 | (read_avail_input): Use it to zero out only those slots in buf[] | ||
| 29 | that were used last time we were called. | ||
| 30 | |||
| 31 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | ||
| 32 | |||
| 33 | * Makefile.in (obj): Move fringe.o from here... | ||
| 34 | (XOBJ, MAC_OBJ): ...to here. | ||
| 35 | |||
| 1 | 2004-02-16 Stephen Eglen <stephen@gnu.org> | 36 | 2004-02-16 Stephen Eglen <stephen@gnu.org> |
| 2 | 37 | ||
| 3 | * fringe.c (init_fringe_bitmap): Define j in MAC_OS code. | 38 | * fringe.c (init_fringe_bitmap): Define j in MAC_OS code. |
diff --git a/src/Makefile.in b/src/Makefile.in index ac9cae31061..9f4dcd2b26f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -310,9 +310,9 @@ ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcd | |||
| 310 | /* Include xmenu.o in the list of X object files. */ | 310 | /* Include xmenu.o in the list of X object files. */ |
| 311 | 311 | ||
| 312 | #ifdef USE_GTK | 312 | #ifdef USE_GTK |
| 313 | XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o gtkutil.o | 313 | XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o gtkutil.o fringe.o |
| 314 | #else | 314 | #else |
| 315 | XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o | 315 | XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o |
| 316 | #endif | 316 | #endif |
| 317 | 317 | ||
| 318 | /* The X Menu stuff is present in the X10 distribution, but missing | 318 | /* The X Menu stuff is present in the X10 distribution, but missing |
| @@ -334,7 +334,7 @@ LIBXMENU= -lXMenu | |||
| 334 | 334 | ||
| 335 | /* Otherwise, omit xmenu.o from the list of X object files, and | 335 | /* Otherwise, omit xmenu.o from the list of X object files, and |
| 336 | don't worry about the menu library at all. */ | 336 | don't worry about the menu library at all. */ |
| 337 | XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o | 337 | XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o |
| 338 | LIBXMENU= | 338 | LIBXMENU= |
| 339 | #endif /* not HAVE_MENUS */ | 339 | #endif /* not HAVE_MENUS */ |
| 340 | 340 | ||
| @@ -562,7 +562,7 @@ MSDOS_OBJ = dosfns.o msdos.o w16select.o | |||
| 562 | #ifdef HAVE_CARBON | 562 | #ifdef HAVE_CARBON |
| 563 | mac = $(dot)$(dot)/mac/ | 563 | mac = $(dot)$(dot)/mac/ |
| 564 | XMENU_OBJ = | 564 | XMENU_OBJ = |
| 565 | MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o | 565 | MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o fringe.o |
| 566 | emacsapp = $(PWD)/$(mac)Emacs.app/ | 566 | emacsapp = $(PWD)/$(mac)Emacs.app/ |
| 567 | emacsappsrc = ${srcdir}/../mac/Emacs.app/ | 567 | emacsappsrc = ${srcdir}/../mac/Emacs.app/ |
| 568 | #else | 568 | #else |
| @@ -571,7 +571,7 @@ XMENU_OBJ = xmenu.o | |||
| 571 | 571 | ||
| 572 | /* lastfile must follow all files | 572 | /* lastfile must follow all files |
| 573 | whose initialized data areas should be dumped as pure by dump-emacs. */ | 573 | whose initialized data areas should be dumped as pure by dump-emacs. */ |
| 574 | obj= dispnew.o frame.o scroll.o xdisp.o fringe.o $(XMENU_OBJ) window.o \ | 574 | obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ |
| 575 | charset.o coding.o category.o ccl.o \ | 575 | charset.o coding.o category.o ccl.o \ |
| 576 | cm.o term.o xfaces.o $(XOBJ) \ | 576 | cm.o term.o xfaces.o $(XOBJ) \ |
| 577 | emacs.o keyboard.o macros.o keymap.o sysdep.o \ | 577 | emacs.o keyboard.o macros.o keymap.o sysdep.o \ |
diff --git a/src/cmds.c b/src/cmds.c index 02e9e723881..b989bab46ee 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -181,7 +181,7 @@ DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "p", | |||
| 181 | doc: /* Move point to end of current line. | 181 | doc: /* Move point to end of current line. |
| 182 | With argument N not nil or 1, move forward N - 1 lines first. | 182 | With argument N not nil or 1, move forward N - 1 lines first. |
| 183 | If point reaches the beginning or end of buffer, it stops there. | 183 | If point reaches the beginning or end of buffer, it stops there. |
| 184 | To ignore intangibility, bind `inhibit-text-motion-hooks' to t. | 184 | To ignore intangibility, bind `inhibit-point-motion-hooks' to t. |
| 185 | 185 | ||
| 186 | This command does not move point across a field boundary unless doing so | 186 | This command does not move point across a field boundary unless doing so |
| 187 | would move beyond there to a different line; if N is nil or 1, and | 187 | would move beyond there to a different line; if N is nil or 1, and |
diff --git a/src/keyboard.c b/src/keyboard.c index 8223049d79d..26b1bfa89e1 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6560,6 +6560,14 @@ record_asynch_buffer_change () | |||
| 6560 | 6560 | ||
| 6561 | #ifndef VMS | 6561 | #ifndef VMS |
| 6562 | 6562 | ||
| 6563 | /* We make the read_avail_input buffer static to avoid zeroing out the | ||
| 6564 | whole struct input_event buf on every call. */ | ||
| 6565 | static struct input_event read_avail_input_buf[KBD_BUFFER_SIZE]; | ||
| 6566 | |||
| 6567 | /* I don't know whether it is necessary, but make read_avail_input | ||
| 6568 | re-entrant. */ | ||
| 6569 | static int in_read_avail_input = 0; | ||
| 6570 | |||
| 6563 | /* Read any terminal input already buffered up by the system | 6571 | /* Read any terminal input already buffered up by the system |
| 6564 | into the kbd_buffer, but do not wait. | 6572 | into the kbd_buffer, but do not wait. |
| 6565 | 6573 | ||
| @@ -6576,14 +6584,21 @@ static int | |||
| 6576 | read_avail_input (expected) | 6584 | read_avail_input (expected) |
| 6577 | int expected; | 6585 | int expected; |
| 6578 | { | 6586 | { |
| 6579 | struct input_event buf[KBD_BUFFER_SIZE]; | 6587 | struct input_event *buf = read_avail_input_buf; |
| 6588 | struct input_event tmp_buf[KBD_BUFFER_SIZE]; | ||
| 6580 | register int i; | 6589 | register int i; |
| 6581 | struct display *d; | ||
| 6582 | int nread = 0; | 6590 | int nread = 0; |
| 6591 | struct display *d; | ||
| 6583 | 6592 | ||
| 6584 | for (i = 0; i < KBD_BUFFER_SIZE; i++) | 6593 | /* Trivial hack to make read_avail_input re-entrant. */ |
| 6585 | EVENT_INIT (buf[i]); | 6594 | if (in_read_avail_input++) |
| 6595 | { | ||
| 6596 | buf = tmp_buf; | ||
| 6597 | for (i = 0; i < KBD_BUFFER_SIZE; i++) | ||
| 6598 | EVENT_INIT (buf[i]); | ||
| 6599 | } | ||
| 6586 | 6600 | ||
| 6601 | /* Loop through the available displays, and call their input hooks. */ | ||
| 6587 | d = display_list; | 6602 | d = display_list; |
| 6588 | while (d) | 6603 | while (d) |
| 6589 | { | 6604 | { |
| @@ -6593,7 +6608,7 @@ read_avail_input (expected) | |||
| 6593 | /* No need for FIONREAD or fcntl; just say don't wait. */ | 6608 | /* No need for FIONREAD or fcntl; just say don't wait. */ |
| 6594 | nread = (*d->read_socket_hook) (d, buf, KBD_BUFFER_SIZE, expected); | 6609 | nread = (*d->read_socket_hook) (d, buf, KBD_BUFFER_SIZE, expected); |
| 6595 | 6610 | ||
| 6596 | if (nread == -2) | 6611 | if (nread == -2) /* -2 means non-transient error */ |
| 6597 | { | 6612 | { |
| 6598 | /* The display device terminated; it should be closed. */ | 6613 | /* The display device terminated; it should be closed. */ |
| 6599 | 6614 | ||
| @@ -6627,6 +6642,11 @@ read_avail_input (expected) | |||
| 6627 | break; | 6642 | break; |
| 6628 | } | 6643 | } |
| 6629 | 6644 | ||
| 6645 | /* Clear used events */ | ||
| 6646 | if (--in_read_avail_input == 0) | ||
| 6647 | for (i = 0; i < nread; i++) | ||
| 6648 | EVENT_INIT (buf[i]); | ||
| 6649 | |||
| 6630 | return nread; | 6650 | return nread; |
| 6631 | } | 6651 | } |
| 6632 | 6652 | ||
| @@ -6647,13 +6667,12 @@ tty_read_avail_input (struct display *display, | |||
| 6647 | unsigned char cbuf[KBD_BUFFER_SIZE - 1]; | 6667 | unsigned char cbuf[KBD_BUFFER_SIZE - 1]; |
| 6648 | int n_to_read, i; | 6668 | int n_to_read, i; |
| 6649 | struct tty_display_info *tty = display->display_info.tty; | 6669 | struct tty_display_info *tty = display->display_info.tty; |
| 6650 | Lisp_Object frame; | ||
| 6651 | int nread = 0; | 6670 | int nread = 0; |
| 6652 | 6671 | ||
| 6653 | if (display->type != output_termcap) | 6672 | if (display->type != output_termcap) |
| 6654 | abort (); | 6673 | abort (); |
| 6655 | 6674 | ||
| 6656 | /* XXX I think the following code should be moved to separate | 6675 | /* XXX I think the following code should be moved to separate hook |
| 6657 | functions in system-dependent files. */ | 6676 | functions in system-dependent files. */ |
| 6658 | #ifdef WINDOWSNT | 6677 | #ifdef WINDOWSNT |
| 6659 | return 0; | 6678 | return 0; |
| @@ -6668,7 +6687,7 @@ tty_read_avail_input (struct display *display, | |||
| 6668 | 6687 | ||
| 6669 | #else /* not MSDOS */ | 6688 | #else /* not MSDOS */ |
| 6670 | 6689 | ||
| 6671 | if (! tty->term_initted) | 6690 | if (! tty->term_initted) /* In case we get called during bootstrap. */ |
| 6672 | return 0; | 6691 | return 0; |
| 6673 | 6692 | ||
| 6674 | /* Determine how many characters we should *try* to read. */ | 6693 | /* Determine how many characters we should *try* to read. */ |
| @@ -6704,20 +6723,16 @@ tty_read_avail_input (struct display *display, | |||
| 6704 | process group won't get SIGHUP's at logout time. BSDI adheres to | 6723 | process group won't get SIGHUP's at logout time. BSDI adheres to |
| 6705 | this part standard and returns -1 from read (0) with errno==EIO | 6724 | this part standard and returns -1 from read (0) with errno==EIO |
| 6706 | when the control tty is taken away. | 6725 | when the control tty is taken away. |
| 6707 | Jeffrey Honig <jch@bsdi.com> says this is generally safe. */ | 6726 | Jeffrey Honig <jch@bsdi.com> says this is generally safe. */ |
| 6708 | if (nread == -1 && errno == EIO) | 6727 | if (nread == -1 && errno == EIO) |
| 6709 | { | 6728 | return -2; /* Close this display. */ |
| 6710 | return -2; /* Close this display. */ | ||
| 6711 | } | ||
| 6712 | #if defined (AIX) && (! defined (aix386) && defined (_BSD)) | 6729 | #if defined (AIX) && (! defined (aix386) && defined (_BSD)) |
| 6713 | /* The kernel sometimes fails to deliver SIGHUP for ptys. | 6730 | /* The kernel sometimes fails to deliver SIGHUP for ptys. |
| 6714 | This looks incorrect, but it isn't, because _BSD causes | 6731 | This looks incorrect, but it isn't, because _BSD causes |
| 6715 | O_NDELAY to be defined in fcntl.h as O_NONBLOCK, | 6732 | O_NDELAY to be defined in fcntl.h as O_NONBLOCK, |
| 6716 | and that causes a value other than 0 when there is no input. */ | 6733 | and that causes a value other than 0 when there is no input. */ |
| 6717 | if (nread == 0) | 6734 | if (nread == 0) |
| 6718 | { | 6735 | return -2; /* Close this display. */ |
| 6719 | return -2; /* Close this display. */ | ||
| 6720 | } | ||
| 6721 | #endif | 6736 | #endif |
| 6722 | } | 6737 | } |
| 6723 | while ( | 6738 | while ( |
| @@ -6751,11 +6766,6 @@ tty_read_avail_input (struct display *display, | |||
| 6751 | #endif /* not MSDOS */ | 6766 | #endif /* not MSDOS */ |
| 6752 | #endif /* not WINDOWSNT */ | 6767 | #endif /* not WINDOWSNT */ |
| 6753 | 6768 | ||
| 6754 | /* Select the frame corresponding to the active tty. Note that the | ||
| 6755 | value of selected_frame is not reliable here, redisplay tends to | ||
| 6756 | temporarily change it. */ | ||
| 6757 | frame = tty->top_frame; | ||
| 6758 | |||
| 6759 | for (i = 0; i < nread; i++) | 6769 | for (i = 0; i < nread; i++) |
| 6760 | { | 6770 | { |
| 6761 | buf[i].kind = ASCII_KEYSTROKE_EVENT; | 6771 | buf[i].kind = ASCII_KEYSTROKE_EVENT; |
| @@ -6766,7 +6776,10 @@ tty_read_avail_input (struct display *display, | |||
| 6766 | cbuf[i] &= ~0x80; | 6776 | cbuf[i] &= ~0x80; |
| 6767 | 6777 | ||
| 6768 | buf[i].code = cbuf[i]; | 6778 | buf[i].code = cbuf[i]; |
| 6769 | buf[i].frame_or_window = frame; | 6779 | /* Set the frame corresponding to the active tty. Note that the |
| 6780 | value of selected_frame is not reliable here, redisplay tends | ||
| 6781 | to temporarily change it. */ | ||
| 6782 | buf[i].frame_or_window = tty->top_frame; | ||
| 6770 | buf[i].arg = Qnil; | 6783 | buf[i].arg = Qnil; |
| 6771 | } | 6784 | } |
| 6772 | 6785 | ||
| @@ -10658,6 +10671,13 @@ init_keyboard () | |||
| 10658 | do_mouse_tracking = Qnil; | 10671 | do_mouse_tracking = Qnil; |
| 10659 | #endif | 10672 | #endif |
| 10660 | input_pending = 0; | 10673 | input_pending = 0; |
| 10674 | #ifndef VMS | ||
| 10675 | { | ||
| 10676 | int i; | ||
| 10677 | for (i = 0; i < KBD_BUFFER_SIZE; i++) | ||
| 10678 | EVENT_INIT (read_avail_input_buf[i]); | ||
| 10679 | } | ||
| 10680 | #endif | ||
| 10661 | 10681 | ||
| 10662 | /* This means that command_loop_1 won't try to select anything the first | 10682 | /* This means that command_loop_1 won't try to select anything the first |
| 10663 | time through. */ | 10683 | time through. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index edd7cc62e61..96d51b27480 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -19028,7 +19028,7 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 19028 | cursor_type = get_specified_cursor_type (b->cursor_type, width); | 19028 | cursor_type = get_specified_cursor_type (b->cursor_type, width); |
| 19029 | 19029 | ||
| 19030 | /* Use normal cursor if not blinked off. */ | 19030 | /* Use normal cursor if not blinked off. */ |
| 19031 | if (!w->cursor_off_p) | 19031 | if (!w->cursor_off_p && glyph != NULL) |
| 19032 | { | 19032 | { |
| 19033 | if (glyph->type == IMAGE_GLYPH) { | 19033 | if (glyph->type == IMAGE_GLYPH) { |
| 19034 | if (cursor_type == FILLED_BOX_CURSOR) | 19034 | if (cursor_type == FILLED_BOX_CURSOR) |
| @@ -19367,7 +19367,8 @@ display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 19367 | 19367 | ||
| 19368 | current_glyphs = w->current_matrix; | 19368 | current_glyphs = w->current_matrix; |
| 19369 | glyph_row = MATRIX_ROW (current_glyphs, vpos); | 19369 | glyph_row = MATRIX_ROW (current_glyphs, vpos); |
| 19370 | glyph = glyph_row->glyphs[TEXT_AREA] + hpos; | 19370 | glyph = (glyph_row->cursor_in_fringe_p ? NULL |
| 19371 | : glyph_row->glyphs[TEXT_AREA] + hpos); | ||
| 19371 | 19372 | ||
| 19372 | /* If cursor row is not enabled, we don't really know where to | 19373 | /* If cursor row is not enabled, we don't really know where to |
| 19373 | display the cursor. */ | 19374 | display the cursor. */ |
| @@ -19655,7 +19656,7 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) | |||
| 19655 | if (charpos < MATRIX_ROW_START_CHARPOS (first)) | 19656 | if (charpos < MATRIX_ROW_START_CHARPOS (first)) |
| 19656 | { | 19657 | { |
| 19657 | *x = *y = *hpos = *vpos = 0; | 19658 | *x = *y = *hpos = *vpos = 0; |
| 19658 | return 0; | 19659 | return 1; |
| 19659 | } | 19660 | } |
| 19660 | else | 19661 | else |
| 19661 | { | 19662 | { |
| @@ -19695,7 +19696,7 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) | |||
| 19695 | } | 19696 | } |
| 19696 | 19697 | ||
| 19697 | *hpos = glyph - row->glyphs[TEXT_AREA]; | 19698 | *hpos = glyph - row->glyphs[TEXT_AREA]; |
| 19698 | return past_end; | 19699 | return !past_end; |
| 19699 | } | 19700 | } |
| 19700 | 19701 | ||
| 19701 | #else /* not 1 */ | 19702 | #else /* not 1 */ |