diff options
| author | Karoly Lorentey | 2004-08-03 12:45:59 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-08-03 12:45:59 +0000 |
| commit | 4fce8dfae60dce6a19bef88ce893bcc019576c66 (patch) | |
| tree | 41dcfb7ebfda8af1faba9e2833283f3dd1fba472 /lisp | |
| parent | d0e37e4839b378aa90ba6686013f9563cc3c0821 (diff) | |
| parent | ed5c373cab5483317a8b6fca3d8d4d52432934fc (diff) | |
| download | emacs-4fce8dfae60dce6a19bef88ce893bcc019576c66.tar.gz emacs-4fce8dfae60dce6a19bef88ce893bcc019576c66.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-473
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-474
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-475
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-476
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-477
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-478
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-225
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 45 | ||||
| -rw-r--r-- | lisp/abbrev.el | 15 | ||||
| -rw-r--r-- | lisp/avoid.el | 6 | ||||
| -rw-r--r-- | lisp/help-mode.el | 2 | ||||
| -rw-r--r-- | lisp/international/utf-8.el | 21 | ||||
| -rw-r--r-- | lisp/novice.el | 6 | ||||
| -rw-r--r-- | lisp/printing.el | 14 | ||||
| -rw-r--r-- | lisp/replace.el | 41 | ||||
| -rw-r--r-- | lisp/subr.el | 16 | ||||
| -rw-r--r-- | lisp/windmove.el | 6 | ||||
| -rw-r--r-- | lisp/window.el | 2 |
11 files changed, 120 insertions, 54 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea1392783f6..b5134b2647f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,48 @@ | |||
| 1 | 2004-08-02 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * avoid.el (mouse-avoidance-point-position): Use window-inside-edges | ||
| 4 | and call compute-motion with nil for topos and width to get proper | ||
| 5 | usable width and height for both window and non-window systems. | ||
| 6 | |||
| 7 | * windmove.el (windmove-coordinates-of-position): Let compute-motion | ||
| 8 | calculate usable window width and height. | ||
| 9 | |||
| 10 | * window.el (window-buffer-height): Call compute-motion with nil width. | ||
| 11 | |||
| 12 | 2004-08-01 David Kastrup <dak@gnu.org> | ||
| 13 | |||
| 14 | * replace.el (query-replace-read-from): Use | ||
| 15 | `query-replace-compile-replacement'. | ||
| 16 | (query-replace-compile-replacement): New function. | ||
| 17 | (query-replace-read-to): Use `query-replace-compile-replacement' | ||
| 18 | for repeating the last command. | ||
| 19 | |||
| 20 | 2004-08-01 John Paul Wallington <jpw@gnu.org> | ||
| 21 | |||
| 22 | * printing.el (toplevel, pr-ps-fast-fire, pr-ps-set-utility) | ||
| 23 | (pr-ps-set-printer, pr-txt-set-printer, pr-eval-setting-alist) | ||
| 24 | (pr-switches): Remove period from end of error messages. | ||
| 25 | |||
| 26 | * help-mode.el (help-go-back): Likewise. | ||
| 27 | |||
| 28 | * abbrev.el (only-global-abbrevs): Doc fix. | ||
| 29 | (edit-abbrevs-map): Define within defvar. | ||
| 30 | (quietly-read-abbrev-file): Doc fix. | ||
| 31 | |||
| 32 | 2004-07-31 Luc Teirlinck <teirllm@auburn.edu> | ||
| 33 | |||
| 34 | * novice.el (enable-command, disable-command): Doc fixes. | ||
| 35 | |||
| 36 | * subr.el (event-modifiers, event-basic-type): Doc fixes. | ||
| 37 | |||
| 38 | 2004-07-30 Richard M. Stallman <rms@gnu.org> | ||
| 39 | |||
| 40 | * subr.el (with-local-quit): Doc fix. | ||
| 41 | |||
| 42 | 2004-07-30 Luc Teirlinck <teirllm@auburn.edu> | ||
| 43 | |||
| 44 | * international/utf-8.el (utf-translate-cjk-mode): Doc fix. | ||
| 45 | |||
| 1 | 2004-07-28 Luc Teirlinck <teirllm@auburn.edu> | 46 | 2004-07-28 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 47 | ||
| 3 | * custom.el (defcustom): Doc fix. | 48 | * custom.el (defcustom): Doc fix. |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 3be0014fd0e..3580c136948 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (defcustom only-global-abbrevs nil | 31 | (defcustom only-global-abbrevs nil |
| 32 | "*t means user plans to use global abbrevs only. | 32 | "Non-nil means user plans to use global abbrevs only. |
| 33 | This makes the commands that normally define mode-specific abbrevs | 33 | This makes the commands that normally define mode-specific abbrevs |
| 34 | define global abbrevs instead." | 34 | define global abbrevs instead." |
| 35 | :type 'boolean | 35 | :type 'boolean |
| @@ -59,13 +59,12 @@ to enable or disable Abbrev mode in the current buffer." | |||
| 59 | :group 'abbrev-mode) | 59 | :group 'abbrev-mode) |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | (defvar edit-abbrevs-map nil | 62 | (defvar edit-abbrevs-map |
| 63 | (let ((map (make-sparse-keymap))) | ||
| 64 | (define-key map "\C-x\C-s" 'edit-abbrevs-redefine) | ||
| 65 | (define-key map "\C-c\C-c" 'edit-abbrevs-redefine) | ||
| 66 | map) | ||
| 63 | "Keymap used in `edit-abbrevs'.") | 67 | "Keymap used in `edit-abbrevs'.") |
| 64 | (if edit-abbrevs-map | ||
| 65 | nil | ||
| 66 | (setq edit-abbrevs-map (make-sparse-keymap)) | ||
| 67 | (define-key edit-abbrevs-map "\C-x\C-s" 'edit-abbrevs-redefine) | ||
| 68 | (define-key edit-abbrevs-map "\C-c\C-c" 'edit-abbrevs-redefine)) | ||
| 69 | 68 | ||
| 70 | (defun kill-all-abbrevs () | 69 | (defun kill-all-abbrevs () |
| 71 | "Undefine all defined abbrevs." | 70 | "Undefine all defined abbrevs." |
| @@ -195,7 +194,7 @@ Optional second argument QUIETLY non-nil means don't display a message." | |||
| 195 | (setq abbrevs-changed nil)) | 194 | (setq abbrevs-changed nil)) |
| 196 | 195 | ||
| 197 | (defun quietly-read-abbrev-file (&optional file) | 196 | (defun quietly-read-abbrev-file (&optional file) |
| 198 | "Read abbrev definitions from file written with write-abbrev-file. | 197 | "Read abbrev definitions from file written with `write-abbrev-file'. |
| 199 | Optional argument FILE is the name of the file to read; | 198 | Optional argument FILE is the name of the file to read; |
| 200 | it defaults to the value of `abbrev-file-name'. | 199 | it defaults to the value of `abbrev-file-name'. |
| 201 | Does not display any message." | 200 | Does not display any message." |
diff --git a/lisp/avoid.el b/lisp/avoid.el index 5a5a09622cd..536b80abdbe 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -139,15 +139,15 @@ Only applies in mouse-avoidance-modes `animate' and `jump'." | |||
| 139 | "Return the position of point as (FRAME X . Y). | 139 | "Return the position of point as (FRAME X . Y). |
| 140 | Analogous to mouse-position." | 140 | Analogous to mouse-position." |
| 141 | (let* ((w (selected-window)) | 141 | (let* ((w (selected-window)) |
| 142 | (edges (window-edges w)) | 142 | (edges (window-inside-edges w)) |
| 143 | (list | 143 | (list |
| 144 | (compute-motion (max (window-start w) (point-min)) ; start pos | 144 | (compute-motion (max (window-start w) (point-min)) ; start pos |
| 145 | ;; window-start can be < point-min if the | 145 | ;; window-start can be < point-min if the |
| 146 | ;; latter has changed since the last redisplay | 146 | ;; latter has changed since the last redisplay |
| 147 | '(0 . 0) ; start XY | 147 | '(0 . 0) ; start XY |
| 148 | (point) ; stop pos | 148 | (point) ; stop pos |
| 149 | (cons (window-width) (window-height)); stop XY: none | 149 | nil ; stop XY: none |
| 150 | (1- (window-width)) ; width | 150 | nil ; width |
| 151 | (cons (window-hscroll w) 0) ; 0 may not be right? | 151 | (cons (window-hscroll w) 0) ; 0 may not be right? |
| 152 | (selected-window)))) | 152 | (selected-window)))) |
| 153 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) | 153 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 11656ec368c..a2dcdf91ed8 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -581,7 +581,7 @@ help buffer." | |||
| 581 | (interactive) | 581 | (interactive) |
| 582 | (if help-xref-stack | 582 | (if help-xref-stack |
| 583 | (help-xref-go-back (current-buffer)) | 583 | (help-xref-go-back (current-buffer)) |
| 584 | (error "No previous help buffer."))) | 584 | (error "No previous help buffer"))) |
| 585 | 585 | ||
| 586 | (defun help-do-xref (pos function args) | 586 | (defun help-do-xref (pos function args) |
| 587 | "Call the help cross-reference function FUNCTION with args ARGS. | 587 | "Call the help cross-reference function FUNCTION with args ARGS. |
diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 77a51abb43f..bad79b58743 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el | |||
| @@ -273,7 +273,7 @@ The value nil means that the tables are not yet loaded.") | |||
| 273 | (utf-translate-cjk-load-tables)) | 273 | (utf-translate-cjk-load-tables)) |
| 274 | (gethash code-point | 274 | (gethash code-point |
| 275 | (get 'utf-subst-table-for-decode 'translation-hash-table))) | 275 | (get 'utf-subst-table-for-decode 'translation-hash-table))) |
| 276 | 276 | ||
| 277 | 277 | ||
| 278 | (defun utf-lookup-subst-table-for-encode (char) | 278 | (defun utf-lookup-subst-table-for-encode (char) |
| 279 | (if (and utf-translate-cjk-mode | 279 | (if (and utf-translate-cjk-mode |
| @@ -282,9 +282,11 @@ The value nil means that the tables are not yet loaded.") | |||
| 282 | (utf-translate-cjk-load-tables)) | 282 | (utf-translate-cjk-load-tables)) |
| 283 | (gethash char | 283 | (gethash char |
| 284 | (get 'utf-subst-table-for-encode 'translation-hash-table))) | 284 | (get 'utf-subst-table-for-encode 'translation-hash-table))) |
| 285 | 285 | ||
| 286 | (define-minor-mode utf-translate-cjk-mode | 286 | (define-minor-mode utf-translate-cjk-mode |
| 287 | "Whether the UTF based coding systems should decode/encode CJK characters. | 287 | "Toggle whether UTF based coding systems de/encode CJK characters. |
| 288 | If ARG is an integer, enable if ARG is positive and disable if | ||
| 289 | zero or negative. This is a minor mode. | ||
| 288 | Enabling this allows the coding systems mule-utf-8, | 290 | Enabling this allows the coding systems mule-utf-8, |
| 289 | mule-utf-16le and mule-utf-16be to encode characters in the charsets | 291 | mule-utf-16le and mule-utf-16be to encode characters in the charsets |
| 290 | `korean-ksc5601', `chinese-gb2312', `chinese-big5-1', | 292 | `korean-ksc5601', `chinese-gb2312', `chinese-big5-1', |
| @@ -296,9 +298,10 @@ according to the language environment in effect when this option is | |||
| 296 | turned on: ksc5601 for Korean, gb2312 for Chinese-GB, big5 for | 298 | turned on: ksc5601 for Korean, gb2312 for Chinese-GB, big5 for |
| 297 | Chinese-Big5 and jisx for other environments. | 299 | Chinese-Big5 and jisx for other environments. |
| 298 | 300 | ||
| 299 | This option is on by default. If you are not interested in CJK | 301 | This mode is on by default. If you are not interested in CJK |
| 300 | characters and want to avoid some overhead on encoding/decoding | 302 | characters and want to avoid some overhead on encoding/decoding |
| 301 | by the above coding systems, you can customize this option to nil." | 303 | by the above coding systems, you can customize the user option |
| 304 | `utf-translate-cjk-mode' to nil." | ||
| 302 | :init-value t | 305 | :init-value t |
| 303 | :version "21.4" | 306 | :version "21.4" |
| 304 | :type 'boolean | 307 | :type 'boolean |
| @@ -605,7 +608,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 605 | ;; UTF-8 decoder generates an UTF-8 sequence represented by a | 608 | ;; UTF-8 decoder generates an UTF-8 sequence represented by a |
| 606 | ;; sequence eight-bit-control/graphic chars for an untranslatable | 609 | ;; sequence eight-bit-control/graphic chars for an untranslatable |
| 607 | ;; character and an invalid byte. | 610 | ;; character and an invalid byte. |
| 608 | ;; | 611 | ;; |
| 609 | ;; This CCL parses that sequence (the first byte is already in r1), | 612 | ;; This CCL parses that sequence (the first byte is already in r1), |
| 610 | ;; writes out the original bytes of that sequence, and sets r5 to | 613 | ;; writes out the original bytes of that sequence, and sets r5 to |
| 611 | ;; -1. | 614 | ;; -1. |
| @@ -624,7 +627,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 624 | (read-multibyte-character r5 r6) | 627 | (read-multibyte-character r5 r6) |
| 625 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) | 628 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) |
| 626 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) | 629 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) |
| 627 | ((write r1) ; invalid UTF-8 | 630 | ((write r1) ; invalid UTF-8 |
| 628 | (r1 = -1) | 631 | (r1 = -1) |
| 629 | (end))) | 632 | (end))) |
| 630 | 633 | ||
| @@ -641,7 +644,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 641 | (r1 = -1) | 644 | (r1 = -1) |
| 642 | ;; Read the 3rd byte. | 645 | ;; Read the 3rd byte. |
| 643 | (read-multibyte-character r5 r6) | 646 | (read-multibyte-character r5 r6) |
| 644 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) | 647 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) |
| 645 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) | 648 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) |
| 646 | (end)) ; invalid UTF-8 | 649 | (end)) ; invalid UTF-8 |
| 647 | (write r6) | 650 | (write r6) |
| @@ -651,7 +654,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 651 | (end))) | 654 | (end))) |
| 652 | ;; Read the 4th byte. | 655 | ;; Read the 4th byte. |
| 653 | (read-multibyte-character r5 r6) | 656 | (read-multibyte-character r5 r6) |
| 654 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) | 657 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) |
| 655 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) | 658 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) |
| 656 | (end)) ; invalid UTF-8 | 659 | (end)) ; invalid UTF-8 |
| 657 | ;; 4-byte sequence for an untranslated character. | 660 | ;; 4-byte sequence for an untranslated character. |
diff --git a/lisp/novice.el b/lisp/novice.el index 159c9a96780..1cb89066481 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -104,7 +104,8 @@ SPC to try the command just this once, but leave it disabled. | |||
| 104 | ;;;###autoload | 104 | ;;;###autoload |
| 105 | (defun enable-command (command) | 105 | (defun enable-command (command) |
| 106 | "Allow COMMAND to be executed without special confirmation from now on. | 106 | "Allow COMMAND to be executed without special confirmation from now on. |
| 107 | The user's .emacs file is altered so that this will apply | 107 | COMMAND must be a symbol. |
| 108 | This command alters the user's .emacs file so that this will apply | ||
| 108 | to future sessions." | 109 | to future sessions." |
| 109 | (interactive "CEnable command: ") | 110 | (interactive "CEnable command: ") |
| 110 | (put command 'disabled nil) | 111 | (put command 'disabled nil) |
| @@ -141,7 +142,8 @@ to future sessions." | |||
| 141 | ;;;###autoload | 142 | ;;;###autoload |
| 142 | (defun disable-command (command) | 143 | (defun disable-command (command) |
| 143 | "Require special confirmation to execute COMMAND from now on. | 144 | "Require special confirmation to execute COMMAND from now on. |
| 144 | The user's .emacs file is altered so that this will apply | 145 | COMMAND must be a symbol. |
| 146 | This command alters the user's .emacs file so that this will apply | ||
| 145 | to future sessions." | 147 | to future sessions." |
| 146 | (interactive "CDisable command: ") | 148 | (interactive "CDisable command: ") |
| 147 | (if (not (commandp command)) | 149 | (if (not (commandp command)) |
diff --git a/lisp/printing.el b/lisp/printing.el index 22a3f762ab6..08303e0595d 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -974,7 +974,7 @@ Please send all bug fixes and enhancements to | |||
| 974 | 974 | ||
| 975 | 975 | ||
| 976 | (and (string< ps-print-version "6.6.4") | 976 | (and (string< ps-print-version "6.6.4") |
| 977 | (error "`printing' requires `ps-print' package version 6.6.4 or later.")) | 977 | (error "`printing' requires `ps-print' package version 6.6.4 or later")) |
| 978 | 978 | ||
| 979 | 979 | ||
| 980 | (eval-and-compile | 980 | (eval-and-compile |
| @@ -4254,7 +4254,7 @@ are both set to t." | |||
| 4254 | (pr-ps-buffer-ps-print | 4254 | (pr-ps-buffer-ps-print |
| 4255 | (if (integerp n-up) | 4255 | (if (integerp n-up) |
| 4256 | (min (max n-up 1) 100) | 4256 | (min (max n-up 1) 100) |
| 4257 | (error "n-up must be an integer greater than zero.")) | 4257 | (error "n-up must be an integer greater than zero")) |
| 4258 | filename))) | 4258 | filename))) |
| 4259 | 4259 | ||
| 4260 | 4260 | ||
| @@ -5031,7 +5031,7 @@ non-nil." | |||
| 5031 | (let ((item (cdr (assq value pr-ps-utility-alist)))) | 5031 | (let ((item (cdr (assq value pr-ps-utility-alist)))) |
| 5032 | (or item | 5032 | (or item |
| 5033 | (error | 5033 | (error |
| 5034 | "Invalid PostScript utility name `%s' for variable `pr-ps-utility'." | 5034 | "Invalid PostScript utility name `%s' for variable `pr-ps-utility'" |
| 5035 | value)) | 5035 | value)) |
| 5036 | (setq pr-ps-utility value) | 5036 | (setq pr-ps-utility value) |
| 5037 | (pr-eval-alist (nthcdr 9 item))) | 5037 | (pr-eval-alist (nthcdr 9 item))) |
| @@ -5042,7 +5042,7 @@ non-nil." | |||
| 5042 | (let ((ps (cdr (assq value pr-ps-printer-alist)))) | 5042 | (let ((ps (cdr (assq value pr-ps-printer-alist)))) |
| 5043 | (or ps | 5043 | (or ps |
| 5044 | (error | 5044 | (error |
| 5045 | "Invalid PostScript printer name `%s' for variable `pr-ps-name'." | 5045 | "Invalid PostScript printer name `%s' for variable `pr-ps-name'" |
| 5046 | value)) | 5046 | value)) |
| 5047 | (setq pr-ps-name value | 5047 | (setq pr-ps-name value |
| 5048 | pr-ps-command (pr-dosify-file-name (nth 0 ps)) | 5048 | pr-ps-command (pr-dosify-file-name (nth 0 ps)) |
| @@ -5068,7 +5068,7 @@ non-nil." | |||
| 5068 | (defun pr-txt-set-printer (value) | 5068 | (defun pr-txt-set-printer (value) |
| 5069 | (let ((txt (cdr (assq value pr-txt-printer-alist)))) | 5069 | (let ((txt (cdr (assq value pr-txt-printer-alist)))) |
| 5070 | (or txt | 5070 | (or txt |
| 5071 | (error "Invalid text printer name `%s' for variable `pr-txt-name'." | 5071 | (error "Invalid text printer name `%s' for variable `pr-txt-name'" |
| 5072 | value)) | 5072 | value)) |
| 5073 | (setq pr-txt-name value | 5073 | (setq pr-txt-name value |
| 5074 | pr-txt-command (pr-dosify-file-name (nth 0 txt)) | 5074 | pr-txt-command (pr-dosify-file-name (nth 0 txt)) |
| @@ -5121,7 +5121,7 @@ non-nil." | |||
| 5121 | (setq global nil))) | 5121 | (setq global nil))) |
| 5122 | (and inherits | 5122 | (and inherits |
| 5123 | (if (memq inherits old) | 5123 | (if (memq inherits old) |
| 5124 | (error "Circular inheritance for `%S'." inherits) | 5124 | (error "Circular inheritance for `%S'" inherits) |
| 5125 | (setq local-list | 5125 | (setq local-list |
| 5126 | (pr-eval-setting-alist inherits global | 5126 | (pr-eval-setting-alist inherits global |
| 5127 | (cons inherits old))))) | 5127 | (cons inherits old))))) |
| @@ -5349,7 +5349,7 @@ non-nil." | |||
| 5349 | 5349 | ||
| 5350 | (defun pr-switches (switches mess) | 5350 | (defun pr-switches (switches mess) |
| 5351 | (or (listp switches) | 5351 | (or (listp switches) |
| 5352 | (error "%S should have a list of strings." mess)) | 5352 | (error "%S should have a list of strings" mess)) |
| 5353 | (ps-flatten-list ; dynamic evaluation | 5353 | (ps-flatten-list ; dynamic evaluation |
| 5354 | (mapcar 'ps-eval-switch switches))) | 5354 | (mapcar 'ps-eval-switch switches))) |
| 5355 | 5355 | ||
diff --git a/lisp/replace.el b/lisp/replace.el index f09868cc6d3..47437659923 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -94,7 +94,8 @@ wants to replace FROM with TO." | |||
| 94 | query-replace-from-history-variable | 94 | query-replace-from-history-variable |
| 95 | nil t)))) | 95 | nil t)))) |
| 96 | (if (and (zerop (length from)) lastto lastfrom) | 96 | (if (and (zerop (length from)) lastto lastfrom) |
| 97 | (cons lastfrom lastto) | 97 | (cons lastfrom |
| 98 | (query-replace-compile-replacement lastto regexp-flag)) | ||
| 98 | ;; Warn if user types \n or \t, but don't reject the input. | 99 | ;; Warn if user types \n or \t, but don't reject the input. |
| 99 | (and regexp-flag | 100 | (and regexp-flag |
| 100 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) | 101 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) |
| @@ -107,15 +108,12 @@ wants to replace FROM with TO." | |||
| 107 | (sit-for 2))) | 108 | (sit-for 2))) |
| 108 | from)))) | 109 | from)))) |
| 109 | 110 | ||
| 110 | (defun query-replace-read-to (from string regexp-flag) | 111 | (defun query-replace-compile-replacement (to regexp-flag) |
| 111 | "Query and return the `from' argument of a query-replace operation." | 112 | "Maybe convert a regexp replacement TO to Lisp. |
| 112 | (let ((to (save-excursion | 113 | Returns a list suitable for `perform-replace' if necessary, |
| 113 | (read-from-minibuffer | 114 | the original string if not." |
| 114 | (format "%s %s with: " string (query-replace-descr from)) | 115 | (if (and regexp-flag |
| 115 | nil nil nil | 116 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to)) |
| 116 | query-replace-to-history-variable from t)))) | ||
| 117 | (when (and regexp-flag | ||
| 118 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to)) | ||
| 119 | (let (pos list char) | 117 | (let (pos list char) |
| 120 | (while | 118 | (while |
| 121 | (progn | 119 | (progn |
| @@ -142,14 +140,25 @@ wants to replace FROM with TO." | |||
| 142 | (cdr pos)))) | 140 | (cdr pos)))) |
| 143 | (setq to (substring to end))))) | 141 | (setq to (substring to end))))) |
| 144 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))) | 142 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))) |
| 145 | (setq to (nreverse (delete "" (cons to list))))) | 143 | (setq to (nreverse (delete "" (cons to list)))) |
| 146 | (replace-match-string-symbols to) | 144 | (replace-match-string-symbols to) |
| 147 | (setq to (cons 'replace-eval-replacement | 145 | (cons 'replace-eval-replacement |
| 148 | (if (> (length to) 1) | 146 | (if (cdr to) |
| 149 | (cons 'concat to) | 147 | (cons 'concat to) |
| 150 | (car to))))) | 148 | (car to)))) |
| 151 | to)) | 149 | to)) |
| 152 | 150 | ||
| 151 | |||
| 152 | (defun query-replace-read-to (from string regexp-flag) | ||
| 153 | "Query and return the `to' argument of a query-replace operation." | ||
| 154 | (query-replace-compile-replacement | ||
| 155 | (save-excursion | ||
| 156 | (read-from-minibuffer | ||
| 157 | (format "%s %s with: " string (query-replace-descr from)) | ||
| 158 | nil nil nil | ||
| 159 | query-replace-to-history-variable from t)) | ||
| 160 | regexp-flag)) | ||
| 161 | |||
| 153 | (defun query-replace-read-args (string regexp-flag &optional noerror) | 162 | (defun query-replace-read-args (string regexp-flag &optional noerror) |
| 154 | (unless noerror | 163 | (unless noerror |
| 155 | (barf-if-buffer-read-only)) | 164 | (barf-if-buffer-read-only)) |
diff --git a/lisp/subr.el b/lisp/subr.el index 64e9bdc6e24..2b329ef623f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -644,7 +644,11 @@ The normal global definition of the character C-x indirects to this keymap.") | |||
| 644 | "Return a list of symbols representing the modifier keys in event EVENT. | 644 | "Return a list of symbols representing the modifier keys in event EVENT. |
| 645 | The elements of the list may include `meta', `control', | 645 | The elements of the list may include `meta', `control', |
| 646 | `shift', `hyper', `super', `alt', `click', `double', `triple', `drag', | 646 | `shift', `hyper', `super', `alt', `click', `double', `triple', `drag', |
| 647 | and `down'." | 647 | and `down'. |
| 648 | EVENT may be an event or an event type. If EVENT is a symbol | ||
| 649 | that has never been used in an event that has been read as input | ||
| 650 | in the current Emacs session, then this function can return nil, | ||
| 651 | even when EVENT actually has modifiers." | ||
| 648 | (let ((type event)) | 652 | (let ((type event)) |
| 649 | (if (listp type) | 653 | (if (listp type) |
| 650 | (setq type (car type))) | 654 | (setq type (car type))) |
| @@ -671,7 +675,10 @@ and `down'." | |||
| 671 | 675 | ||
| 672 | (defun event-basic-type (event) | 676 | (defun event-basic-type (event) |
| 673 | "Return the basic type of the given event (all modifiers removed). | 677 | "Return the basic type of the given event (all modifiers removed). |
| 674 | The value is a printing character (not upper case) or a symbol." | 678 | The value is a printing character (not upper case) or a symbol. |
| 679 | EVENT may be an event or an event type. If EVENT is a symbol | ||
| 680 | that has never been used in an event that has been read as input | ||
| 681 | in the current Emacs session, then this function may return nil." | ||
| 675 | (if (consp event) | 682 | (if (consp event) |
| 676 | (setq event (car event))) | 683 | (setq event (car event))) |
| 677 | (if (symbolp event) | 684 | (if (symbolp event) |
| @@ -1906,7 +1913,10 @@ See also `with-temp-file' and `with-output-to-string'." | |||
| 1906 | (kill-buffer nil))))) | 1913 | (kill-buffer nil))))) |
| 1907 | 1914 | ||
| 1908 | (defmacro with-local-quit (&rest body) | 1915 | (defmacro with-local-quit (&rest body) |
| 1909 | "Execute BODY with `inhibit-quit' temporarily bound to nil." | 1916 | "Execute BODY, allowing quits to terminate BODY but not escape further. |
| 1917 | When a quit terminates BODY, `with-local-quit' requests another quit when | ||
| 1918 | it finishes. That quit will be processed in turn, the next time quitting | ||
| 1919 | is again allowed." | ||
| 1910 | (declare (debug t) (indent 0)) | 1920 | (declare (debug t) (indent 0)) |
| 1911 | `(condition-case nil | 1921 | `(condition-case nil |
| 1912 | (let ((inhibit-quit nil)) | 1922 | (let ((inhibit-quit nil)) |
diff --git a/lisp/windmove.el b/lisp/windmove.el index 7008b86335e..642f04a1d8d 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -429,14 +429,12 @@ the return value from `windmove-coordinates-of-position' is (0 . 0) | |||
| 429 | regardless of the where point is in the buffer and where the window | 429 | regardless of the where point is in the buffer and where the window |
| 430 | is placed in the frame." | 430 | is placed in the frame." |
| 431 | (let* ((wind (if (null window) (selected-window) window)) | 431 | (let* ((wind (if (null window) (selected-window) window)) |
| 432 | (usable-width (1- (window-width wind))) ; 1- for cont. column | ||
| 433 | (usable-height (1- (window-height wind))) ; 1- for mode line | ||
| 434 | (big-hairy-result (compute-motion | 432 | (big-hairy-result (compute-motion |
| 435 | (window-start) | 433 | (window-start) |
| 436 | '(0 . 0) | 434 | '(0 . 0) |
| 437 | pos | 435 | pos |
| 438 | (cons usable-width usable-height) | 436 | nil ; (window-width window-height) |
| 439 | usable-width | 437 | nil ; window-width |
| 440 | (cons (window-hscroll) | 438 | (cons (window-hscroll) |
| 441 | 0) ; why zero? | 439 | 0) ; why zero? |
| 442 | wind))) | 440 | wind))) |
diff --git a/lisp/window.el b/lisp/window.el index 96bfc8b5581..5ec752f3f23 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -408,7 +408,7 @@ lines than are actually needed in the case where some error may be present." | |||
| 408 | '(0 . 0) | 408 | '(0 . 0) |
| 409 | (- (point-max) (if ignore-final-newline 1 0)) | 409 | (- (point-max) (if ignore-final-newline 1 0)) |
| 410 | (cons 0 100000000) | 410 | (cons 0 100000000) |
| 411 | (window-width window) | 411 | nil |
| 412 | nil | 412 | nil |
| 413 | window)))))) | 413 | window)))))) |
| 414 | 414 | ||