diff options
| author | Miles Bader | 2006-09-06 07:30:39 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-09-06 07:30:39 +0000 |
| commit | fae22cbf7f66b7adc732e46a27b821114c812fdd (patch) | |
| tree | a1c7545e4579d1da9d7d00d98287b1bff4dd0c26 | |
| parent | af6ea8ad8d62810d901561ae4a56d89f22ebacf0 (diff) | |
| parent | 04e28558df772845d83d5e870300b755b2528b57 (diff) | |
| download | emacs-fae22cbf7f66b7adc732e46a27b821114c812fdd.tar.gz emacs-fae22cbf7f66b7adc732e46a27b821114c812fdd.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 423-426)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 131-133)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-109
| -rw-r--r-- | admin/FOR-RELEASE | 25 | ||||
| -rw-r--r-- | lisp/ChangeLog | 46 | ||||
| -rw-r--r-- | lisp/emulation/cua-base.el | 140 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 29 | ||||
| -rw-r--r-- | lisp/ido.el | 3 | ||||
| -rw-r--r-- | lisp/pgg-gpg.el | 20 | ||||
| -rw-r--r-- | lisp/pgg.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 89 | ||||
| -rw-r--r-- | lisp/term/xterm.el | 40 | ||||
| -rw-r--r-- | src/ChangeLog | 26 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/window.c | 92 | ||||
| -rw-r--r-- | src/xdisp.c | 51 |
18 files changed, 424 insertions, 177 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 13c6e13bac5..e90623374d5 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -44,18 +44,35 @@ attention of Windows users to fixing them. | |||
| 44 | ** Drew Adams 12 Aug bug rpt: overlay display artifact: trace left behind | 44 | ** Drew Adams 12 Aug bug rpt: overlay display artifact: trace left behind |
| 45 | Windows only bug. | 45 | Windows only bug. |
| 46 | 46 | ||
| 47 | ** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem on Cygwin. | ||
| 48 | (Did we decide that is unreproducible?) | ||
| 49 | |||
| 47 | * BUGS | 50 | * BUGS |
| 48 | 51 | ||
| 49 | ** Milan Zamazal's Aug 23 bug report about crashes with certain fonts. | 52 | ** How rcirc puts cursor at bottom. |
| 50 | 53 | ||
| 51 | ** C-g fails to interrupt accept-process-output in Gnus. | 54 | ** rcirc uses member*. |
| 52 | 55 | ||
| 53 | ** Implement buffer-chars-modified-tick. | 56 | ** Field handling in C-n. |
| 54 | 57 | ||
| 55 | ** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem. | 58 | ** cursor display on images that don't use :mask. |
| 59 | |||
| 60 | ** C-g fails to interrupt accept-process-output in Gnus. | ||
| 61 | (Is that fixed?) | ||
| 56 | 62 | ||
| 57 | ** Make key-binding use the maps specified by positions given in the events. | 63 | ** Make key-binding use the maps specified by positions given in the events. |
| 58 | 64 | ||
| 65 | ** Is it necessary to solve in another way the problem that was solved | ||
| 66 | by Satyaki Das's removed pgg patches? | ||
| 67 | |||
| 68 | ** mouse-autoselect-window delay patch | ||
| 69 | |||
| 70 | ** Bug in woman, Juri Linkov, Sep 3. | ||
| 71 | |||
| 72 | ** Problem of passing temp files to GPG thru call-process. | ||
| 73 | |||
| 74 | ** Image scrolling problems reported by David Kastrup. (KFS working). | ||
| 75 | |||
| 59 | 76 | ||
| 60 | * DOCUMENTATION | 77 | * DOCUMENTATION |
| 61 | 78 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f8b66c0e32..3be25537031 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,49 @@ | |||
| 1 | 2006-09-06 Nick Roberts <nickrob@snap.net.nz> | ||
| 2 | |||
| 3 | * progmodes/gdb-ui.el (gdb-var-list-children-regexp) | ||
| 4 | (gdb-var-list-children-regexp-1): Tweak regexps to catch full | ||
| 5 | string values. | ||
| 6 | |||
| 7 | 2006-09-06 Kim F. Storm <storm@cua.dk> | ||
| 8 | |||
| 9 | * simple.el (line-move-partial): New function to do vscrolling for | ||
| 10 | partially visible images / tall lines. Rewrite based on code | ||
| 11 | previously in line-move. Simplify backwards vscrolling. | ||
| 12 | (line-move): Use it. Simplify. | ||
| 13 | |||
| 14 | 2006-09-05 Kim F. Storm <storm@cua.dk> | ||
| 15 | |||
| 16 | * emulation/cua-base.el (cua--pre-command-handler-1): Rewrite. | ||
| 17 | |||
| 18 | 2006-09-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 19 | |||
| 20 | * progmodes/compile.el (compilation-error-regexp-alist-alist): | ||
| 21 | Process the `gcc-include' after the `gnu' rule. | ||
| 22 | |||
| 23 | 2006-09-05 Kim F. Storm <storm@cua.dk> | ||
| 24 | |||
| 25 | * ido.el (ido-visit-buffer): Use buffer name if buffer arg is a buffer. | ||
| 26 | |||
| 27 | 2006-09-05 Daiki Ueno <ueno@unixuser.org> | ||
| 28 | |||
| 29 | * pgg.el (pgg-clear-string): Alias to clear-string for backward | ||
| 30 | compatibility. | ||
| 31 | |||
| 32 | * pgg-gpg.el (pgg-gpg-process-region): Avoid display blinking with | ||
| 33 | inhibit-redisplay; encode passphrase with locale-coding-system. | ||
| 34 | |||
| 35 | 2006-09-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 36 | |||
| 37 | * term/xterm.el (terminal-init-xterm): Add more C-M- bindings. | ||
| 38 | |||
| 39 | 2006-09-05 Nick Roberts <nickrob@snap.net.nz> | ||
| 40 | |||
| 41 | * progmodes/gdb-ui.el (gdb-var-list-children-regexp) | ||
| 42 | (gdb-var-list-children-regexp): Make type field optional. | ||
| 43 | |||
| 44 | * progmodes/gud.el (gud-speedbar-buttons): Allow for no type | ||
| 45 | e.g public, protected in C++. | ||
| 46 | |||
| 1 | 2006-09-04 John Paul Wallington <jpw@pobox.com> | 47 | 2006-09-04 John Paul Wallington <jpw@pobox.com> |
| 2 | 48 | ||
| 3 | * simple.el (completion-show-help): New defcustom. | 49 | * simple.el (completion-show-help): New defcustom. |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index e1e88ee4399..2fbd09600bd 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1097,73 +1097,79 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1097 | ;;; Pre-command hook | 1097 | ;;; Pre-command hook |
| 1098 | 1098 | ||
| 1099 | (defun cua--pre-command-handler-1 () | 1099 | (defun cua--pre-command-handler-1 () |
| 1100 | (let ((movement (eq (get this-command 'CUA) 'move))) | 1100 | ;; Cancel prefix key timeout if user enters another key. |
| 1101 | 1101 | (when cua--prefix-override-timer | |
| 1102 | ;; Cancel prefix key timeout if user enters another key. | 1102 | (if (timerp cua--prefix-override-timer) |
| 1103 | (when cua--prefix-override-timer | 1103 | (cancel-timer cua--prefix-override-timer)) |
| 1104 | (if (timerp cua--prefix-override-timer) | 1104 | (setq cua--prefix-override-timer nil)) |
| 1105 | (cancel-timer cua--prefix-override-timer)) | 1105 | |
| 1106 | (setq cua--prefix-override-timer nil)) | 1106 | (cond |
| 1107 | 1107 | ;; Only symbol commands can have necessary properties | |
| 1108 | ;; Handle shifted cursor keys and other movement commands. | 1108 | ((not (symbolp this-command)) |
| 1109 | ;; If region is not active, region is activated if key is shifted. | 1109 | nil) |
| 1110 | ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). | 1110 | |
| 1111 | ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. | 1111 | ;; Handle delete-selection property on non-movement commands |
| 1112 | (if movement | 1112 | ((not (eq (get this-command 'CUA) 'move)) |
| 1113 | (cond | 1113 | (when (and mark-active (not deactivate-mark)) |
| 1114 | ((if window-system | 1114 | (let* ((ds (or (get this-command 'delete-selection) |
| 1115 | (memq 'shift (event-modifiers | 1115 | (get this-command 'pending-delete))) |
| 1116 | (aref (this-single-command-raw-keys) 0))) | 1116 | (nc (cond |
| 1117 | (or | 1117 | ((not ds) nil) |
| 1118 | (memq 'shift (event-modifiers | 1118 | ((eq ds 'yank) |
| 1119 | (aref (this-single-command-keys) 0))) | 1119 | 'cua-paste) |
| 1120 | ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home. | 1120 | ((eq ds 'kill) |
| 1121 | (and (boundp 'function-key-map) | 1121 | (if cua--rectangle |
| 1122 | function-key-map | 1122 | 'cua-copy-rectangle |
| 1123 | (let ((ev (lookup-key function-key-map | 1123 | 'cua-copy-region)) |
| 1124 | (this-single-command-raw-keys)))) | 1124 | ((eq ds 'supersede) |
| 1125 | (and (vector ev) | 1125 | (if cua--rectangle |
| 1126 | (symbolp (setq ev (aref ev 0))) | 1126 | 'cua-delete-rectangle |
| 1127 | (string-match "S-" (symbol-name ev))))))) | 1127 | 'cua-delete-region)) |
| 1128 | (unless mark-active | 1128 | (t |
| 1129 | (push-mark-command nil t)) | 1129 | (if cua--rectangle |
| 1130 | (setq cua--last-region-shifted t) | 1130 | 'cua-delete-rectangle ;; replace? |
| 1131 | (setq cua--explicit-region-start nil)) | 1131 | 'cua-replace-region))))) |
| 1132 | ((or cua--explicit-region-start cua--rectangle) | 1132 | (if nc |
| 1133 | (unless mark-active | 1133 | (setq this-original-command this-command |
| 1134 | (push-mark-command nil nil))) | 1134 | this-command nc))))) |
| 1135 | (t | 1135 | |
| 1136 | ;; If we set mark-active to nil here, the region highlight will not be | 1136 | ;; Handle shifted cursor keys and other movement commands. |
| 1137 | ;; removed by the direct_output_ commands. | 1137 | ;; If region is not active, region is activated if key is shifted. |
| 1138 | (setq deactivate-mark t))) | 1138 | ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). |
| 1139 | 1139 | ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. | |
| 1140 | ;; Handle delete-selection property on other commands | 1140 | ((if window-system |
| 1141 | (if (and mark-active (not deactivate-mark)) | 1141 | (memq 'shift (event-modifiers |
| 1142 | (let* ((ds (or (get this-command 'delete-selection) | 1142 | (aref (this-single-command-raw-keys) 0))) |
| 1143 | (get this-command 'pending-delete))) | 1143 | (or |
| 1144 | (nc (cond | 1144 | (memq 'shift (event-modifiers |
| 1145 | ((not ds) nil) | 1145 | (aref (this-single-command-keys) 0))) |
| 1146 | ((eq ds 'yank) | 1146 | ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home. |
| 1147 | 'cua-paste) | 1147 | (and (boundp 'function-key-map) |
| 1148 | ((eq ds 'kill) | 1148 | function-key-map |
| 1149 | (if cua--rectangle | 1149 | (let ((ev (lookup-key function-key-map |
| 1150 | 'cua-copy-rectangle | 1150 | (this-single-command-raw-keys)))) |
| 1151 | 'cua-copy-region)) | 1151 | (and (vector ev) |
| 1152 | ((eq ds 'supersede) | 1152 | (symbolp (setq ev (aref ev 0))) |
| 1153 | (if cua--rectangle | 1153 | (string-match "S-" (symbol-name ev))))))) |
| 1154 | 'cua-delete-rectangle | 1154 | (unless mark-active |
| 1155 | 'cua-delete-region)) | 1155 | (push-mark-command nil t)) |
| 1156 | (t | 1156 | (setq cua--last-region-shifted t) |
| 1157 | (if cua--rectangle | 1157 | (setq cua--explicit-region-start nil)) |
| 1158 | 'cua-delete-rectangle ;; replace? | 1158 | |
| 1159 | 'cua-replace-region))))) | 1159 | ;; Set mark if user explicitly said to do so |
| 1160 | (if nc | 1160 | ((or cua--explicit-region-start cua--rectangle) |
| 1161 | (setq this-original-command this-command | 1161 | (unless mark-active |
| 1162 | this-command nc))))) | 1162 | (push-mark-command nil nil))) |
| 1163 | 1163 | ||
| 1164 | ;; Detect extension of rectangles by mouse or other movement | 1164 | ;; Else clear mark after this command. |
| 1165 | (setq cua--buffer-and-point-before-command | 1165 | (t |
| 1166 | (if cua--rectangle (cons (current-buffer) (point)))))) | 1166 | ;; If we set mark-active to nil here, the region highlight will not be |
| 1167 | ;; removed by the direct_output_ commands. | ||
| 1168 | (setq deactivate-mark t))) | ||
| 1169 | |||
| 1170 | ;; Detect extension of rectangles by mouse or other movement | ||
| 1171 | (setq cua--buffer-and-point-before-command | ||
| 1172 | (if cua--rectangle (cons (current-buffer) (point))))) | ||
| 1167 | 1173 | ||
| 1168 | (defun cua--pre-command-handler () | 1174 | (defun cua--pre-command-handler () |
| 1169 | (when cua-mode | 1175 | (when cua-mode |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 81d566fc856..25a7ff4c29a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -5,6 +5,12 @@ | |||
| 5 | 5 | ||
| 6 | 2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> | 6 | 2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> |
| 7 | 7 | ||
| 8 | * gnus-art.el (article-decode-encoded-words): Make it fast. | ||
| 9 | |||
| 10 | 2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 11 | |||
| 12 | * gnus-art.el (article-decode-encoded-words): Don't infloop in XEmacs. | ||
| 13 | |||
| 8 | * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\' | 14 | * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\' |
| 9 | in quoted string into `\'. | 15 | in quoted string into `\'. |
| 10 | 16 | ||
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 17cbbeb0a75..7690d533cc8 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2381,22 +2381,23 @@ If PROMPT (the prefix), prompt for a coding system to use." | |||
| 2381 | (error)) | 2381 | (error)) |
| 2382 | gnus-newsgroup-ignored-charsets)) | 2382 | gnus-newsgroup-ignored-charsets)) |
| 2383 | (inhibit-read-only t) | 2383 | (inhibit-read-only t) |
| 2384 | start) | 2384 | end start) |
| 2385 | (save-restriction | 2385 | (goto-char (point-min)) |
| 2386 | (article-narrow-to-head) | 2386 | (when (search-forward "\n\n" nil 'move) |
| 2387 | (while (not (eobp)) | 2387 | (forward-line -1)) |
| 2388 | (setq start (point)) | 2388 | (setq end (point)) |
| 2389 | (if (prog1 | 2389 | (while (not (bobp)) |
| 2390 | (looking-at "\ | 2390 | (while (progn |
| 2391 | (forward-line -1) | ||
| 2392 | (and (not (bobp)) | ||
| 2393 | (memq (char-after) '(?\t ? ))))) | ||
| 2394 | (setq start (point)) | ||
| 2395 | (if (looking-at "\ | ||
| 2391 | \\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\ | 2396 | \\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\ |
| 2392 | \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):") | 2397 | \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):") |
| 2393 | (while (progn | 2398 | (funcall gnus-decode-address-function start end) |
| 2394 | (forward-line) | 2399 | (funcall gnus-decode-header-function start end)) |
| 2395 | (if (eobp) | 2400 | (goto-char (setq end start))))) |
| 2396 | nil | ||
| 2397 | (memq (char-after) '(?\t ? )))))) | ||
| 2398 | (funcall gnus-decode-address-function start (point)) | ||
| 2399 | (funcall gnus-decode-header-function start (point))))))) | ||
| 2400 | 2401 | ||
| 2401 | (defun article-decode-group-name () | 2402 | (defun article-decode-group-name () |
| 2402 | "Decode group names in `Newsgroups:'." | 2403 | "Decode group names in `Newsgroups:'." |
diff --git a/lisp/ido.el b/lisp/ido.el index 2d531728b67..797827eafd4 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -3781,7 +3781,8 @@ for first matching file." | |||
| 3781 | (defun ido-visit-buffer (buffer method &optional record) | 3781 | (defun ido-visit-buffer (buffer method &optional record) |
| 3782 | "Switch to BUFFER according to METHOD. | 3782 | "Switch to BUFFER according to METHOD. |
| 3783 | Record command in `command-history' if optional RECORD is non-nil." | 3783 | Record command in `command-history' if optional RECORD is non-nil." |
| 3784 | 3784 | (if (bufferp buffer) | |
| 3785 | (setq buffer (buffer-name buffer))) | ||
| 3785 | (let (win newframe) | 3786 | (let (win newframe) |
| 3786 | (cond | 3787 | (cond |
| 3787 | ((eq method 'kill) | 3788 | ((eq method 'kill) |
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el index 46dbf833311..07be6c47f61 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/pgg-gpg.el | |||
| @@ -74,7 +74,10 @@ | |||
| 74 | (errors-buffer pgg-errors-buffer) | 74 | (errors-buffer pgg-errors-buffer) |
| 75 | (orig-mode (default-file-modes)) | 75 | (orig-mode (default-file-modes)) |
| 76 | (process-connection-type nil) | 76 | (process-connection-type nil) |
| 77 | process status exit-status) | 77 | (inhibit-redisplay t) |
| 78 | process status exit-status | ||
| 79 | passphrase-with-newline | ||
| 80 | encoded-passphrase-with-new-line) | ||
| 78 | (with-current-buffer (get-buffer-create errors-buffer) | 81 | (with-current-buffer (get-buffer-create errors-buffer) |
| 79 | (buffer-disable-undo) | 82 | (buffer-disable-undo) |
| 80 | (erase-buffer)) | 83 | (erase-buffer)) |
| @@ -87,7 +90,16 @@ | |||
| 87 | program args))) | 90 | program args))) |
| 88 | (set-process-sentinel process #'ignore) | 91 | (set-process-sentinel process #'ignore) |
| 89 | (when passphrase | 92 | (when passphrase |
| 90 | (process-send-string process (concat passphrase "\n"))) | 93 | (setq passphrase-with-newline (concat passphrase "\n")) |
| 94 | (if (boundp 'locale-coding-system) | ||
| 95 | (progn | ||
| 96 | (setq encoded-passphrase-with-new-line | ||
| 97 | (encode-coding-string passphrase-with-newline | ||
| 98 | locale-coding-system)) | ||
| 99 | (pgg-clear-string passphrase-with-newline)) | ||
| 100 | (setq encoded-passphrase-with-new-line passphrase-with-newline | ||
| 101 | passphrase-with-newline nil)) | ||
| 102 | (process-send-string process encoded-passphrase-with-new-line)) | ||
| 91 | (process-send-region process start end) | 103 | (process-send-region process start end) |
| 92 | (process-send-eof process) | 104 | (process-send-eof process) |
| 93 | (while (eq 'run (process-status process)) | 105 | (while (eq 'run (process-status process)) |
| @@ -108,6 +120,10 @@ | |||
| 108 | (error "%s exited abnormally: '%s'" program exit-status)) | 120 | (error "%s exited abnormally: '%s'" program exit-status)) |
| 109 | (if (= 127 exit-status) | 121 | (if (= 127 exit-status) |
| 110 | (error "%s could not be found" program)))) | 122 | (error "%s could not be found" program)))) |
| 123 | (if passphrase-with-newline | ||
| 124 | (pgg-clear-string passphrase-with-newline)) | ||
| 125 | (if encoded-passphrase-with-new-line | ||
| 126 | (pgg-clear-string encoded-passphrase-with-new-line)) | ||
| 111 | (if (and process (eq 'run (process-status process))) | 127 | (if (and process (eq 'run (process-status process))) |
| 112 | (interrupt-process process)) | 128 | (interrupt-process process)) |
| 113 | (if (file-exists-p output-file-name) | 129 | (if (file-exists-p output-file-name) |
diff --git a/lisp/pgg.el b/lisp/pgg.el index 7a30dafce8d..e8a85b58fae 100644 --- a/lisp/pgg.el +++ b/lisp/pgg.el | |||
| @@ -148,6 +148,11 @@ regulate cache behavior." | |||
| 148 | #'pgg-remove-passphrase-from-cache | 148 | #'pgg-remove-passphrase-from-cache |
| 149 | key notruncate)))) | 149 | key notruncate)))) |
| 150 | 150 | ||
| 151 | (if (fboundp 'clear-string) | ||
| 152 | (defalias 'pgg-clear-string 'clear-string) | ||
| 153 | (defun pgg-clear-string (string) | ||
| 154 | (fillarray string ?_))) | ||
| 155 | |||
| 151 | (defun pgg-remove-passphrase-from-cache (key &optional notruncate) | 156 | (defun pgg-remove-passphrase-from-cache (key &optional notruncate) |
| 152 | "Omit passphrase associated with KEY in time-limited passphrase cache. | 157 | "Omit passphrase associated with KEY in time-limited passphrase cache. |
| 153 | 158 | ||
| @@ -166,7 +171,7 @@ regulate cache behavior." | |||
| 166 | (interned-timer-key (intern-soft key pgg-pending-timers)) | 171 | (interned-timer-key (intern-soft key pgg-pending-timers)) |
| 167 | (old-timer (symbol-value interned-timer-key))) | 172 | (old-timer (symbol-value interned-timer-key))) |
| 168 | (when passphrase | 173 | (when passphrase |
| 169 | (fillarray passphrase ?_) | 174 | (pgg-clear-string passphrase) |
| 170 | (unintern key pgg-passphrase-cache)) | 175 | (unintern key pgg-passphrase-cache)) |
| 171 | (when old-timer | 176 | (when old-timer |
| 172 | (pgg-cancel-timer old-timer) | 177 | (pgg-cancel-timer old-timer) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e8c09113d39..1c59409566a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -218,10 +218,6 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 218 | nil 1 nil 2 0 | 218 | nil 1 nil 2 0 |
| 219 | (2 (compilation-face '(3)))) | 219 | (2 (compilation-face '(3)))) |
| 220 | 220 | ||
| 221 | (gcc-include | ||
| 222 | "^\\(?:In file included\\| \\) from \ | ||
| 223 | \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) | ||
| 224 | |||
| 225 | (gnu | 221 | (gnu |
| 226 | ;; I have no idea what this first line is supposed to match, but it | 222 | ;; I have no idea what this first line is supposed to match, but it |
| 227 | ;; makes things ambiguous with output such as "foo:344:50:blabla" since | 223 | ;; makes things ambiguous with output such as "foo:344:50:blabla" since |
| @@ -241,6 +237,12 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 241 | \[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)" | 237 | \[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)" |
| 242 | 1 (2 . 5) (4 . 6) (7 . 8)) | 238 | 1 (2 . 5) (4 . 6) (7 . 8)) |
| 243 | 239 | ||
| 240 | ;; The `gnu' style above can incorrectly match gcc's "In file | ||
| 241 | ;; included from" message, so we process that first. -- cyd | ||
| 242 | (gcc-include | ||
| 243 | "^\\(?:In file included\\| \\) from \ | ||
| 244 | \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) | ||
| 245 | |||
| 244 | (lcc | 246 | (lcc |
| 245 | "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" | 247 | "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" |
| 246 | 2 3 4 (1)) | 248 | 2 3 4 (1)) |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f45bb2fe524..3f21e4ac96b 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -782,7 +782,7 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 782 | 782 | ||
| 783 | (defconst gdb-var-list-children-regexp | 783 | (defconst gdb-var-list-children-regexp |
| 784 | "child={.*?name=\"\\(.*?\\)\",.*?exp=\"\\(.*?\\)\",.*?\ | 784 | "child={.*?name=\"\\(.*?\\)\",.*?exp=\"\\(.*?\\)\",.*?\ |
| 785 | numchild=\"\\(.*?\\)\",.*?type=\"\\(.*?\\)\".*?}") | 785 | numchild=\"\\(.*?\\)\"\\(}\\|,.*?\\(type=\"\\(.*?\\)\"\\)?.*?}\\)") |
| 786 | 786 | ||
| 787 | (defun gdb-var-list-children-handler (varnum) | 787 | (defun gdb-var-list-children-handler (varnum) |
| 788 | (goto-char (point-min)) | 788 | (goto-char (point-min)) |
| @@ -796,7 +796,7 @@ numchild=\"\\(.*?\\)\",.*?type=\"\\(.*?\\)\".*?}") | |||
| 796 | (let ((varchild (list (match-string 1) | 796 | (let ((varchild (list (match-string 1) |
| 797 | (match-string 2) | 797 | (match-string 2) |
| 798 | (match-string 3) | 798 | (match-string 3) |
| 799 | (match-string 4) | 799 | (match-string 6) |
| 800 | nil nil))) | 800 | nil nil))) |
| 801 | (if (assoc (car varchild) gdb-var-list) | 801 | (if (assoc (car varchild) gdb-var-list) |
| 802 | (throw 'child-already-watched nil)) | 802 | (throw 'child-already-watched nil)) |
| @@ -3346,7 +3346,8 @@ is set in them." | |||
| 3346 | 3346 | ||
| 3347 | (defconst gdb-var-list-children-regexp-1 | 3347 | (defconst gdb-var-list-children-regexp-1 |
| 3348 | "child={.*?name=\"\\(.+?\\)\",.*?exp=\"\\(.+?\\)\",.*?\ | 3348 | "child={.*?name=\"\\(.+?\\)\",.*?exp=\"\\(.+?\\)\",.*?\ |
| 3349 | numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}") | 3349 | numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\)\ |
| 3350 | \\(}\\|,.*?\\(type=\"\\(.+?\\)\"\\)?.*?}\\)") | ||
| 3350 | 3351 | ||
| 3351 | (defun gdb-var-list-children-handler-1 (varnum) | 3352 | (defun gdb-var-list-children-handler-1 (varnum) |
| 3352 | (goto-char (point-min)) | 3353 | (goto-char (point-min)) |
| @@ -3360,7 +3361,7 @@ numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}") | |||
| 3360 | (let ((varchild (list (match-string 1) | 3361 | (let ((varchild (list (match-string 1) |
| 3361 | (match-string 2) | 3362 | (match-string 2) |
| 3362 | (match-string 3) | 3363 | (match-string 3) |
| 3363 | (match-string 5) | 3364 | (match-string 7) |
| 3364 | (read (match-string 4)) | 3365 | (read (match-string 4)) |
| 3365 | nil))) | 3366 | nil))) |
| 3366 | (if (assoc (car varchild) gdb-var-list) | 3367 | (if (assoc (car varchild) gdb-var-list) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 84b40e8ba80..b42e1b7fdc7 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -456,8 +456,8 @@ required by the caller." | |||
| 456 | (while var-list | 456 | (while var-list |
| 457 | (let* (char (depth 0) (start 0) (var (car var-list)) | 457 | (let* (char (depth 0) (start 0) (var (car var-list)) |
| 458 | (varnum (car var)) (expr (nth 1 var)) | 458 | (varnum (car var)) (expr (nth 1 var)) |
| 459 | (type (nth 3 var)) (value (nth 4 var)) | 459 | (type (if (nth 3 var) (nth 3 var) " ")) |
| 460 | (status (nth 5 var))) | 460 | (value (nth 4 var)) (status (nth 5 var))) |
| 461 | (put-text-property | 461 | (put-text-property |
| 462 | 0 (length expr) 'face font-lock-variable-name-face expr) | 462 | 0 (length expr) 'face font-lock-variable-name-face expr) |
| 463 | (put-text-property | 463 | (put-text-property |
diff --git a/lisp/simple.el b/lisp/simple.el index e53cb1fb3e8..a9684ce85e6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3477,6 +3477,56 @@ Outline mode sets this." | |||
| 3477 | (or (memq prop buffer-invisibility-spec) | 3477 | (or (memq prop buffer-invisibility-spec) |
| 3478 | (assq prop buffer-invisibility-spec))))) | 3478 | (assq prop buffer-invisibility-spec))))) |
| 3479 | 3479 | ||
| 3480 | ;; Returns non-nil if partial move was done. | ||
| 3481 | (defun line-move-partial (arg noerror to-end) | ||
| 3482 | (if (< arg 0) | ||
| 3483 | ;; Move backward (up). | ||
| 3484 | ;; If already vscrolled, reduce vscroll | ||
| 3485 | (let ((vs (window-vscroll nil t))) | ||
| 3486 | (when (> vs (frame-char-height)) | ||
| 3487 | (set-window-vscroll nil (- vs (frame-char-height)) t))) | ||
| 3488 | |||
| 3489 | ;; Move forward (down). | ||
| 3490 | (let* ((ppos (posn-at-point)) | ||
| 3491 | (py (cdr (or (posn-actual-col-row ppos) | ||
| 3492 | (posn-col-row ppos)))) | ||
| 3493 | (vs (window-vscroll nil t)) | ||
| 3494 | (evis (or (pos-visible-in-window-p (window-end nil t) nil t) | ||
| 3495 | (pos-visible-in-window-p (1- (window-end nil t)) nil t))) | ||
| 3496 | (rbot (nth 3 evis)) | ||
| 3497 | (vpos (nth 5 evis))) | ||
| 3498 | (cond | ||
| 3499 | ;; (0) Last window line should be visible - fail if not. | ||
| 3500 | ((null evis) | ||
| 3501 | nil) | ||
| 3502 | ;; If last line of window is fully visible, move forward. | ||
| 3503 | ((null rbot) | ||
| 3504 | nil) | ||
| 3505 | ;; If cursor is not in the bottom scroll margin, move forward. | ||
| 3506 | ((< py (min (- (window-text-height) scroll-margin 1) | ||
| 3507 | (1- vpos))) | ||
| 3508 | nil) | ||
| 3509 | ;; When already vscrolled, we vscroll some more if we can, | ||
| 3510 | ;; or clear vscroll and move forward at end of tall image. | ||
| 3511 | ((> vs 0) | ||
| 3512 | (when (> rbot 0) | ||
| 3513 | (set-window-vscroll nil (+ vs (min rbot (frame-char-height))) t))) | ||
| 3514 | ;; If cursor just entered the bottom scroll margin, move forward, | ||
| 3515 | ;; but also vscroll one line so redisplay wont recenter. | ||
| 3516 | ((= py (min (- (window-text-height) scroll-margin 1) | ||
| 3517 | (1- vpos))) | ||
| 3518 | (set-window-vscroll nil (frame-char-height) t) | ||
| 3519 | (line-move-1 arg noerror to-end) | ||
| 3520 | t) | ||
| 3521 | ;; If there are lines above the last line, scroll-up one line. | ||
| 3522 | ((> vpos 0) | ||
| 3523 | (scroll-up 1) | ||
| 3524 | t) | ||
| 3525 | ;; Finally, start vscroll. | ||
| 3526 | (t | ||
| 3527 | (set-window-vscroll nil (frame-char-height) t)))))) | ||
| 3528 | |||
| 3529 | |||
| 3480 | ;; This is like line-move-1 except that it also performs | 3530 | ;; This is like line-move-1 except that it also performs |
| 3481 | ;; vertical scrolling of tall images if appropriate. | 3531 | ;; vertical scrolling of tall images if appropriate. |
| 3482 | ;; That is not really a clean thing to do, since it mixes | 3532 | ;; That is not really a clean thing to do, since it mixes |
| @@ -3484,37 +3534,14 @@ Outline mode sets this." | |||
| 3484 | ;; a cleaner solution to the problem of making C-n do something | 3534 | ;; a cleaner solution to the problem of making C-n do something |
| 3485 | ;; useful given a tall image. | 3535 | ;; useful given a tall image. |
| 3486 | (defun line-move (arg &optional noerror to-end try-vscroll) | 3536 | (defun line-move (arg &optional noerror to-end try-vscroll) |
| 3487 | (if (and auto-window-vscroll try-vscroll | 3537 | (unless (and auto-window-vscroll try-vscroll |
| 3488 | ;; But don't vscroll in a keyboard macro. | 3538 | ;; Only vscroll for single line moves |
| 3489 | (not defining-kbd-macro) | 3539 | (= (abs arg) 1) |
| 3490 | (not executing-kbd-macro)) | 3540 | ;; But don't vscroll in a keyboard macro. |
| 3491 | (let ((forward (> arg 0)) | 3541 | (not defining-kbd-macro) |
| 3492 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) | 3542 | (not executing-kbd-macro) |
| 3493 | (if (and (consp part) | 3543 | (line-move-partial arg noerror to-end)) |
| 3494 | (> (if forward (cdr part) (car part)) 0)) | 3544 | (set-window-vscroll nil 0 t) |
| 3495 | (set-window-vscroll nil | ||
| 3496 | (if forward | ||
| 3497 | (+ (window-vscroll nil t) | ||
| 3498 | (min (cdr part) | ||
| 3499 | (* (frame-char-height) arg))) | ||
| 3500 | (max 0 | ||
| 3501 | (- (window-vscroll nil t) | ||
| 3502 | (min (car part) | ||
| 3503 | (* (frame-char-height) (- arg)))))) | ||
| 3504 | t) | ||
| 3505 | (set-window-vscroll nil 0) | ||
| 3506 | (when (line-move-1 arg noerror to-end) | ||
| 3507 | (when (not forward) | ||
| 3508 | ;; Update display before calling pos-visible-in-window-p, | ||
| 3509 | ;; because it depends on window-start being up-to-date. | ||
| 3510 | (sit-for 0) | ||
| 3511 | ;; If the current line is partly hidden at the bottom, | ||
| 3512 | ;; scroll it partially up so as to unhide the bottom. | ||
| 3513 | (if (and (setq part (nth 2 (pos-visible-in-window-p | ||
| 3514 | (line-beginning-position) nil t))) | ||
| 3515 | (> (cdr part) 0)) | ||
| 3516 | (set-window-vscroll nil (cdr part) t))) | ||
| 3517 | t))) | ||
| 3518 | (line-move-1 arg noerror to-end))) | 3545 | (line-move-1 arg noerror to-end))) |
| 3519 | 3546 | ||
| 3520 | ;; This is the guts of next-line and previous-line. | 3547 | ;; This is the guts of next-line and previous-line. |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 73d26b56b74..018841fe168 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -261,6 +261,9 @@ | |||
| 261 | (define-key map "\e[27;6;62~" [?\C->]) | 261 | (define-key map "\e[27;6;62~" [?\C->]) |
| 262 | (define-key map "\e[27;6;63~" [(C-\?)]) | 262 | (define-key map "\e[27;6;63~" [(C-\?)]) |
| 263 | 263 | ||
| 264 | ;; These are the strings emitted for various C-M- combinations | ||
| 265 | ;; for keyboards that the Meta and Alt modifiers are on the same | ||
| 266 | ;; key (usually labeled "Alt"). | ||
| 264 | (define-key map "\e[27;13;9~" [(C-M-tab)]) | 267 | (define-key map "\e[27;13;9~" [(C-M-tab)]) |
| 265 | (define-key map "\e[27;13;13~" [(C-M-return)]) | 268 | (define-key map "\e[27;13;13~" [(C-M-return)]) |
| 266 | 269 | ||
| @@ -298,6 +301,43 @@ | |||
| 298 | (define-key map "\e[27;14;62~" [?\C-\M->]) | 301 | (define-key map "\e[27;14;62~" [?\C-\M->]) |
| 299 | (define-key map "\e[27;14;63~" [(C-M-\?)]) | 302 | (define-key map "\e[27;14;63~" [(C-M-\?)]) |
| 300 | 303 | ||
| 304 | (define-key map "\e[27;7;9~" [(C-M-tab)]) | ||
| 305 | (define-key map "\e[27;7;13~" [(C-M-return)]) | ||
| 306 | |||
| 307 | (define-key map "\e[27;7;39~" [?\C-\M-\']) | ||
| 308 | (define-key map "\e[27;7;44~" [?\C-\M-,]) | ||
| 309 | (define-key map "\e[27;7;45~" [?\C-\M--]) | ||
| 310 | (define-key map "\e[27;7;46~" [?\C-\M-.]) | ||
| 311 | (define-key map "\e[27;7;47~" [?\C-\M-/]) | ||
| 312 | (define-key map "\e[27;7;48~" [?\C-\M-0]) | ||
| 313 | (define-key map "\e[27;7;49~" [?\C-\M-1]) | ||
| 314 | (define-key map "\e[27;7;50~" [?\C-\M-2]) | ||
| 315 | (define-key map "\e[27;7;51~" [?\C-\M-3]) | ||
| 316 | (define-key map "\e[27;7;52~" [?\C-\M-4]) | ||
| 317 | (define-key map "\e[27;7;53~" [?\C-\M-5]) | ||
| 318 | (define-key map "\e[27;7;54~" [?\C-\M-6]) | ||
| 319 | (define-key map "\e[27;7;55~" [?\C-\M-7]) | ||
| 320 | (define-key map "\e[27;7;56~" [?\C-\M-8]) | ||
| 321 | (define-key map "\e[27;7;57~" [?\C-\M-9]) | ||
| 322 | (define-key map "\e[27;7;59~" [?\C-\M-\;]) | ||
| 323 | (define-key map "\e[27;7;61~" [?\C-\M-=]) | ||
| 324 | (define-key map "\e[27;7;92~" [?\C-\M-\\]) | ||
| 325 | |||
| 326 | (define-key map "\e[27;8;33~" [?\C-\M-!]) | ||
| 327 | (define-key map "\e[27;8;34~" [?\C-\M-\"]) | ||
| 328 | (define-key map "\e[27;8;35~" [?\C-\M-#]) | ||
| 329 | (define-key map "\e[27;8;36~" [?\C-\M-$]) | ||
| 330 | (define-key map "\e[27;8;37~" [?\C-\M-%]) | ||
| 331 | (define-key map "\e[27;8;38~" [(C-M-&)]) | ||
| 332 | (define-key map "\e[27;8;40~" [?\C-\M-(]) | ||
| 333 | (define-key map "\e[27;8;41~" [?\C-\M-)]) | ||
| 334 | (define-key map "\e[27;8;42~" [?\C-\M-*]) | ||
| 335 | (define-key map "\e[27;8;43~" [?\C-\M-+]) | ||
| 336 | (define-key map "\e[27;8;58~" [?\C-\M-:]) | ||
| 337 | (define-key map "\e[27;8;60~" [?\C-\M-<]) | ||
| 338 | (define-key map "\e[27;8;62~" [?\C-\M->]) | ||
| 339 | (define-key map "\e[27;8;63~" [(C-M-\?)]) | ||
| 340 | |||
| 301 | (define-key map "\e[27;2;9~" [S-tab]) | 341 | (define-key map "\e[27;2;9~" [S-tab]) |
| 302 | (define-key map "\e[27;2;13~" [S-return]) | 342 | (define-key map "\e[27;2;13~" [S-return]) |
| 303 | 343 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 64b3b884bfa..a1194906fbb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,29 @@ | |||
| 1 | 2006-09-06 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * editfns.c (Fformat_time_string): Use make_unibyte_string to make | ||
| 4 | a Lisp string from the result of emacs_memftimeu call. | ||
| 5 | |||
| 6 | 2006-09-06 Kim F. Storm <storm@cua.dk> | ||
| 7 | |||
| 8 | * xdisp.c (pos_visible_p): Remove exact_mode_line_heights_p arg; | ||
| 9 | so always calculate heights even when pos-visible-in-window-p is | ||
| 10 | called with partially = t. Don't overshoot last_visible_y in move_it_to. | ||
| 11 | Return row height and row number in new rowh and vpos args. | ||
| 12 | (cursor_row_fully_visible_p): First line is always "fully visible". | ||
| 13 | (try_window): Don't clear matrix if vscrolled. | ||
| 14 | |||
| 15 | * lisp.h (pos_visible_p): Update prototype. | ||
| 16 | |||
| 17 | * window.c (Fpos_visible_in_window_p): Adapt to new pos_visible_p. | ||
| 18 | Return row height and row number for partially visible rows. | ||
| 19 | Modify return value to a 2 element list for fully visible rows | ||
| 20 | and 6 for partially visible row. | ||
| 21 | (window_scroll_pixel_based): Use pos_visible_p directly instead of | ||
| 22 | Fpos_visible_in_window_p. Fix auto vscrolling for partially visible lines. | ||
| 23 | Only vscroll backwards if already vscrolled forwards. Unconditionally | ||
| 24 | vscroll forwards if PT is first (and only) line. Set new window start | ||
| 25 | instead of scrolling at start/end of tall line. | ||
| 26 | |||
| 1 | 2006-09-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 27 | 2006-09-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 28 | ||
| 3 | * macterm.c (install_window_handler, mac_handle_window_event) | 29 | * macterm.c (install_window_handler, mac_handle_window_event) |
diff --git a/src/editfns.c b/src/editfns.c index 2fcacc16901..10c5cbe1153 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1692,7 +1692,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) | |||
| 1692 | SBYTES (format_string), | 1692 | SBYTES (format_string), |
| 1693 | tm, ut); | 1693 | tm, ut); |
| 1694 | if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0')) | 1694 | if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0')) |
| 1695 | return code_convert_string_norecord (make_string (buf, result), | 1695 | return code_convert_string_norecord (make_unibyte_string (buf, result), |
| 1696 | Vlocale_coding_system, 0); | 1696 | Vlocale_coding_system, 0); |
| 1697 | 1697 | ||
| 1698 | /* If buffer was too small, make it bigger and try again. */ | 1698 | /* If buffer was too small, make it bigger and try again. */ |
diff --git a/src/lisp.h b/src/lisp.h index 7c6826d7bda..4421dfedf95 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2551,7 +2551,7 @@ extern void syms_of_xdisp P_ ((void)); | |||
| 2551 | extern void init_xdisp P_ ((void)); | 2551 | extern void init_xdisp P_ ((void)); |
| 2552 | extern Lisp_Object safe_eval P_ ((Lisp_Object)); | 2552 | extern Lisp_Object safe_eval P_ ((Lisp_Object)); |
| 2553 | extern int pos_visible_p P_ ((struct window *, int, int *, | 2553 | extern int pos_visible_p P_ ((struct window *, int, int *, |
| 2554 | int *, int *, int *, int)); | 2554 | int *, int *, int *, int *, int *)); |
| 2555 | 2555 | ||
| 2556 | /* Defined in vm-limit.c. */ | 2556 | /* Defined in vm-limit.c. */ |
| 2557 | extern void memory_warnings P_ ((POINTER_TYPE *, void (*warnfun) ())); | 2557 | extern void memory_warnings P_ ((POINTER_TYPE *, void (*warnfun) ())); |
diff --git a/src/window.c b/src/window.c index 7f3e71ec145..4208323eab3 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -336,10 +336,12 @@ If POS is only out of view because of horizontal scrolling, return non-nil. | |||
| 336 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. | 336 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. |
| 337 | 337 | ||
| 338 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, | 338 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, |
| 339 | return value is a list (X Y PARTIAL) where X and Y are the pixel coordinates | 339 | return value is a list of 2 or 6 elements (X Y [RTOP RBOT ROWH VPOS]), |
| 340 | relative to the top left corner of the window. PARTIAL is nil if the character | 340 | where X and Y are the pixel coordinates relative to the top left corner |
| 341 | after POS is fully visible; otherwise it is a cons (RTOP . RBOT) where RTOP | 341 | of the window. The remaining elements are omitted if the character after |
| 342 | and RBOT are the number of pixels invisible at the top and bottom of the row. */) | 342 | POS is fully visible; otherwise, RTOP and RBOT are the number of pixels |
| 343 | invisible at the top and bottom of the row, ROWH is the height of the display | ||
| 344 | row, and VPOS is the row number (0-based) containing POS. */) | ||
| 343 | (pos, window, partially) | 345 | (pos, window, partially) |
| 344 | Lisp_Object pos, window, partially; | 346 | Lisp_Object pos, window, partially; |
| 345 | { | 347 | { |
| @@ -348,7 +350,7 @@ and RBOT are the number of pixels invisible at the top and bottom of the row. * | |||
| 348 | register struct buffer *buf; | 350 | register struct buffer *buf; |
| 349 | struct text_pos top; | 351 | struct text_pos top; |
| 350 | Lisp_Object in_window = Qnil; | 352 | Lisp_Object in_window = Qnil; |
| 351 | int rtop, rbot, fully_p = 1; | 353 | int rtop, rbot, rowh, vpos, fully_p = 1; |
| 352 | int x, y; | 354 | int x, y; |
| 353 | 355 | ||
| 354 | w = decode_window (window); | 356 | w = decode_window (window); |
| @@ -371,17 +373,20 @@ and RBOT are the number of pixels invisible at the top and bottom of the row. * | |||
| 371 | && posint <= BUF_ZV (buf) | 373 | && posint <= BUF_ZV (buf) |
| 372 | && CHARPOS (top) >= BUF_BEGV (buf) | 374 | && CHARPOS (top) >= BUF_BEGV (buf) |
| 373 | && CHARPOS (top) <= BUF_ZV (buf) | 375 | && CHARPOS (top) <= BUF_ZV (buf) |
| 374 | && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, NILP (partially)) | 376 | && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos) |
| 375 | && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p))) | 377 | && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p))) |
| 376 | in_window = Qt; | 378 | in_window = Qt; |
| 377 | 379 | ||
| 378 | if (!NILP (in_window) && !NILP (partially)) | 380 | if (!NILP (in_window) && !NILP (partially)) |
| 379 | in_window = Fcons (make_number (x), | 381 | { |
| 380 | Fcons (make_number (y), | 382 | Lisp_Object part = Qnil; |
| 381 | Fcons ((fully_p ? Qnil | 383 | if (!fully_p) |
| 382 | : Fcons (make_number (rtop), | 384 | part = list4 (make_number (rtop), make_number (rbot), |
| 383 | make_number (rbot))), | 385 | make_number (rowh), make_number (vpos)); |
| 384 | Qnil))); | 386 | in_window = Fcons (make_number (x), |
| 387 | Fcons (make_number (y), part)); | ||
| 388 | } | ||
| 389 | |||
| 385 | return in_window; | 390 | return in_window; |
| 386 | } | 391 | } |
| 387 | 392 | ||
| @@ -4818,10 +4823,10 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4818 | struct it it; | 4823 | struct it it; |
| 4819 | struct window *w = XWINDOW (window); | 4824 | struct window *w = XWINDOW (window); |
| 4820 | struct text_pos start; | 4825 | struct text_pos start; |
| 4821 | Lisp_Object tem; | ||
| 4822 | int this_scroll_margin; | 4826 | int this_scroll_margin; |
| 4823 | /* True if we fiddled the window vscroll field without really scrolling. */ | 4827 | /* True if we fiddled the window vscroll field without really scrolling. */ |
| 4824 | int vscrolled = 0; | 4828 | int vscrolled = 0; |
| 4829 | int x, y, rtop, rbot, rowh, vpos; | ||
| 4825 | 4830 | ||
| 4826 | SET_TEXT_POS_FROM_MARKER (start, w->start); | 4831 | SET_TEXT_POS_FROM_MARKER (start, w->start); |
| 4827 | 4832 | ||
| @@ -4829,8 +4834,8 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4829 | the screen. Allow PT to be partially visible, otherwise | 4834 | the screen. Allow PT to be partially visible, otherwise |
| 4830 | something like (scroll-down 1) with PT in the line before | 4835 | something like (scroll-down 1) with PT in the line before |
| 4831 | the partially visible one would recenter. */ | 4836 | the partially visible one would recenter. */ |
| 4832 | tem = Fpos_visible_in_window_p (make_number (PT), window, Qt); | 4837 | |
| 4833 | if (NILP (tem)) | 4838 | if (!pos_visible_p (w, PT, &x, &y, &rtop, &rbot, &rowh, &vpos)) |
| 4834 | { | 4839 | { |
| 4835 | /* Move backward half the height of the window. Performance note: | 4840 | /* Move backward half the height of the window. Performance note: |
| 4836 | vmotion used here is about 10% faster, but would give wrong | 4841 | vmotion used here is about 10% faster, but would give wrong |
| @@ -4855,7 +4860,7 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4855 | } | 4860 | } |
| 4856 | else if (auto_window_vscroll_p) | 4861 | else if (auto_window_vscroll_p) |
| 4857 | { | 4862 | { |
| 4858 | if (tem = XCAR (XCDR (XCDR (tem))), CONSP (tem)) | 4863 | if (rtop || rbot) /* partially visible */ |
| 4859 | { | 4864 | { |
| 4860 | int px; | 4865 | int px; |
| 4861 | int dy = WINDOW_FRAME_LINE_HEIGHT (w); | 4866 | int dy = WINDOW_FRAME_LINE_HEIGHT (w); |
| @@ -4865,19 +4870,52 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4865 | dy); | 4870 | dy); |
| 4866 | dy *= n; | 4871 | dy *= n; |
| 4867 | 4872 | ||
| 4868 | if (n < 0 && (px = XINT (XCAR (tem))) > 0) | 4873 | if (n < 0) |
| 4869 | { | 4874 | { |
| 4870 | px = max (0, -w->vscroll - min (px, -dy)); | 4875 | /* Only vscroll backwards if already vscrolled forwards. */ |
| 4871 | Fset_window_vscroll (window, make_number (px), Qt); | 4876 | if (w->vscroll < 0 && rtop > 0) |
| 4872 | return; | 4877 | { |
| 4878 | px = max (0, -w->vscroll - min (rtop, -dy)); | ||
| 4879 | Fset_window_vscroll (window, make_number (px), Qt); | ||
| 4880 | return; | ||
| 4881 | } | ||
| 4873 | } | 4882 | } |
| 4874 | if (n > 0 && (px = XINT (XCDR (tem))) > 0) | 4883 | if (n > 0) |
| 4875 | { | 4884 | { |
| 4876 | px = max (0, -w->vscroll + min (px, dy)); | 4885 | /* Do vscroll if already vscrolled or only display line. */ |
| 4877 | Fset_window_vscroll (window, make_number (px), Qt); | 4886 | if (rbot > 0 && (w->vscroll < 0 || vpos == 0)) |
| 4878 | return; | 4887 | { |
| 4888 | px = max (0, -w->vscroll + min (rbot, dy)); | ||
| 4889 | Fset_window_vscroll (window, make_number (px), Qt); | ||
| 4890 | return; | ||
| 4891 | } | ||
| 4892 | |||
| 4893 | /* Maybe modify window start instead of scrolling. */ | ||
| 4894 | if (rbot > 0 || w->vscroll < 0) | ||
| 4895 | { | ||
| 4896 | int spos; | ||
| 4897 | |||
| 4898 | Fset_window_vscroll (window, make_number (0), Qt); | ||
| 4899 | /* If there are other text lines above the current row, | ||
| 4900 | move window start to current row. Else to next row. */ | ||
| 4901 | if (rbot > 0) | ||
| 4902 | spos = XINT (Fline_beginning_position (Qnil)); | ||
| 4903 | else | ||
| 4904 | spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV); | ||
| 4905 | set_marker_restricted (w->start, make_number (spos), | ||
| 4906 | w->buffer); | ||
| 4907 | w->start_at_line_beg = Qt; | ||
| 4908 | w->update_mode_line = Qt; | ||
| 4909 | XSETFASTINT (w->last_modified, 0); | ||
| 4910 | XSETFASTINT (w->last_overlay_modified, 0); | ||
| 4911 | /* Set force_start so that redisplay_window will run the | ||
| 4912 | window-scroll-functions. */ | ||
| 4913 | w->force_start = Qt; | ||
| 4914 | return; | ||
| 4915 | } | ||
| 4879 | } | 4916 | } |
| 4880 | } | 4917 | } |
| 4918 | /* Cancel previous vscroll. */ | ||
| 4881 | Fset_window_vscroll (window, make_number (0), Qt); | 4919 | Fset_window_vscroll (window, make_number (0), Qt); |
| 4882 | } | 4920 | } |
| 4883 | 4921 | ||
| @@ -4918,7 +4956,7 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4918 | if (dy <= 0) | 4956 | if (dy <= 0) |
| 4919 | { | 4957 | { |
| 4920 | move_it_vertically_backward (&it, -dy); | 4958 | move_it_vertically_backward (&it, -dy); |
| 4921 | /* Ensure we actually does move, e.g. in case we are currently | 4959 | /* Ensure we actually do move, e.g. in case we are currently |
| 4922 | looking at an image that is taller that the window height. */ | 4960 | looking at an image that is taller that the window height. */ |
| 4923 | while (start_pos == IT_CHARPOS (it) | 4961 | while (start_pos == IT_CHARPOS (it) |
| 4924 | && start_pos > BEGV) | 4962 | && start_pos > BEGV) |
| @@ -4928,7 +4966,7 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4928 | { | 4966 | { |
| 4929 | move_it_to (&it, ZV, -1, it.current_y + dy, -1, | 4967 | move_it_to (&it, ZV, -1, it.current_y + dy, -1, |
| 4930 | MOVE_TO_POS | MOVE_TO_Y); | 4968 | MOVE_TO_POS | MOVE_TO_Y); |
| 4931 | /* Ensure we actually does move, e.g. in case we are currently | 4969 | /* Ensure we actually do move, e.g. in case we are currently |
| 4932 | looking at an image that is taller that the window height. */ | 4970 | looking at an image that is taller that the window height. */ |
| 4933 | while (start_pos == IT_CHARPOS (it) | 4971 | while (start_pos == IT_CHARPOS (it) |
| 4934 | && start_pos < ZV) | 4972 | && start_pos < ZV) |
| @@ -6656,7 +6694,7 @@ display marginal areas and the text area. */) | |||
| 6656 | CHECK_NATNUM (left_width); | 6694 | CHECK_NATNUM (left_width); |
| 6657 | if (!NILP (right_width)) | 6695 | if (!NILP (right_width)) |
| 6658 | CHECK_NATNUM (right_width); | 6696 | CHECK_NATNUM (right_width); |
| 6659 | 6697 | ||
| 6660 | /* Do nothing on a tty. */ | 6698 | /* Do nothing on a tty. */ |
| 6661 | if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) | 6699 | if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) |
| 6662 | && (!EQ (w->left_fringe_width, left_width) | 6700 | && (!EQ (w->left_fringe_width, left_width) |
diff --git a/src/xdisp.c b/src/xdisp.c index 0e60020f110..f26a4231e9d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1281,13 +1281,12 @@ line_bottom_y (it) | |||
| 1281 | /* Return 1 if position CHARPOS is visible in window W. | 1281 | /* Return 1 if position CHARPOS is visible in window W. |
| 1282 | If visible, set *X and *Y to pixel coordinates of top left corner. | 1282 | If visible, set *X and *Y to pixel coordinates of top left corner. |
| 1283 | Set *RTOP and *RBOT to pixel height of an invisible area of glyph at POS. | 1283 | Set *RTOP and *RBOT to pixel height of an invisible area of glyph at POS. |
| 1284 | EXACT_MODE_LINE_HEIGHTS_P non-zero means compute exact mode-line | 1284 | Set *ROWH and *VPOS to row's visible height and VPOS (row number). */ |
| 1285 | and header-lines heights. */ | ||
| 1286 | 1285 | ||
| 1287 | int | 1286 | int |
| 1288 | pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | 1287 | pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos) |
| 1289 | struct window *w; | 1288 | struct window *w; |
| 1290 | int charpos, *x, *y, *rtop, *rbot, exact_mode_line_heights_p; | 1289 | int charpos, *x, *y, *rtop, *rbot, *rowh, *vpos; |
| 1291 | { | 1290 | { |
| 1292 | struct it it; | 1291 | struct it it; |
| 1293 | struct text_pos top; | 1292 | struct text_pos top; |
| @@ -1305,22 +1304,19 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1305 | 1304 | ||
| 1306 | SET_TEXT_POS_FROM_MARKER (top, w->start); | 1305 | SET_TEXT_POS_FROM_MARKER (top, w->start); |
| 1307 | 1306 | ||
| 1308 | /* Compute exact mode line heights, if requested. */ | 1307 | /* Compute exact mode line heights. */ |
| 1309 | if (exact_mode_line_heights_p) | 1308 | if (WINDOW_WANTS_MODELINE_P (w)) |
| 1310 | { | 1309 | current_mode_line_height |
| 1311 | if (WINDOW_WANTS_MODELINE_P (w)) | 1310 | = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), |
| 1312 | current_mode_line_height | 1311 | current_buffer->mode_line_format); |
| 1313 | = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), | ||
| 1314 | current_buffer->mode_line_format); | ||
| 1315 | 1312 | ||
| 1316 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 1313 | if (WINDOW_WANTS_HEADER_LINE_P (w)) |
| 1317 | current_header_line_height | 1314 | current_header_line_height |
| 1318 | = display_mode_line (w, HEADER_LINE_FACE_ID, | 1315 | = display_mode_line (w, HEADER_LINE_FACE_ID, |
| 1319 | current_buffer->header_line_format); | 1316 | current_buffer->header_line_format); |
| 1320 | } | ||
| 1321 | 1317 | ||
| 1322 | start_display (&it, w, top); | 1318 | start_display (&it, w, top); |
| 1323 | move_it_to (&it, charpos, -1, it.last_visible_y, -1, | 1319 | move_it_to (&it, charpos, -1, it.last_visible_y-1, -1, |
| 1324 | MOVE_TO_POS | MOVE_TO_Y); | 1320 | MOVE_TO_POS | MOVE_TO_Y); |
| 1325 | 1321 | ||
| 1326 | /* Note that we may overshoot because of invisible text. */ | 1322 | /* Note that we may overshoot because of invisible text. */ |
| @@ -1341,6 +1337,9 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1341 | *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); | 1337 | *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); |
| 1342 | *rtop = max (0, window_top_y - top_y); | 1338 | *rtop = max (0, window_top_y - top_y); |
| 1343 | *rbot = max (0, bottom_y - it.last_visible_y); | 1339 | *rbot = max (0, bottom_y - it.last_visible_y); |
| 1340 | *rowh = max (0, (min (bottom_y, it.last_visible_y) | ||
| 1341 | - max (top_y, window_top_y))); | ||
| 1342 | *vpos = it.vpos; | ||
| 1344 | } | 1343 | } |
| 1345 | } | 1344 | } |
| 1346 | else | 1345 | else |
| @@ -1359,6 +1358,11 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1359 | *rtop = max (0, -it2.current_y); | 1358 | *rtop = max (0, -it2.current_y); |
| 1360 | *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent) | 1359 | *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent) |
| 1361 | - it.last_visible_y)); | 1360 | - it.last_visible_y)); |
| 1361 | *rowh = max (0, (min (it2.current_y + it2.max_ascent + it2.max_descent, | ||
| 1362 | it.last_visible_y) | ||
| 1363 | - max (it2.current_y, | ||
| 1364 | WINDOW_HEADER_LINE_HEIGHT (w)))); | ||
| 1365 | *vpos = it2.vpos; | ||
| 1362 | } | 1366 | } |
| 1363 | } | 1367 | } |
| 1364 | 1368 | ||
| @@ -1370,6 +1374,15 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) | |||
| 1370 | if (visible_p && XFASTINT (w->hscroll) > 0) | 1374 | if (visible_p && XFASTINT (w->hscroll) > 0) |
| 1371 | *x -= XFASTINT (w->hscroll) * WINDOW_FRAME_COLUMN_WIDTH (w); | 1375 | *x -= XFASTINT (w->hscroll) * WINDOW_FRAME_COLUMN_WIDTH (w); |
| 1372 | 1376 | ||
| 1377 | #if 0 | ||
| 1378 | /* Debugging code. */ | ||
| 1379 | if (visible_p) | ||
| 1380 | fprintf (stderr, "+pv pt=%d vs=%d --> x=%d y=%d rt=%d rb=%d rh=%d vp=%d\n", | ||
| 1381 | charpos, w->vscroll, *x, *y, *rtop, *rbot, *rowh, *vpos); | ||
| 1382 | else | ||
| 1383 | fprintf (stderr, "-pv pt=%d vs=%d\n", charpos, w->vscroll); | ||
| 1384 | #endif | ||
| 1385 | |||
| 1373 | return visible_p; | 1386 | return visible_p; |
| 1374 | } | 1387 | } |
| 1375 | 1388 | ||
| @@ -12166,7 +12179,8 @@ cursor_row_fully_visible_p (w, force_p, current_matrix_p) | |||
| 12166 | window_height = window_box_height (w); | 12179 | window_height = window_box_height (w); |
| 12167 | if (row->height >= window_height) | 12180 | if (row->height >= window_height) |
| 12168 | { | 12181 | { |
| 12169 | if (!force_p || MINI_WINDOW_P (w) || w->vscroll) | 12182 | if (!force_p || MINI_WINDOW_P (w) |
| 12183 | || w->vscroll || w->cursor.vpos == 0) | ||
| 12170 | return 1; | 12184 | return 1; |
| 12171 | } | 12185 | } |
| 12172 | return 0; | 12186 | return 0; |
| @@ -13650,7 +13664,8 @@ try_window (window, pos, check_margins) | |||
| 13650 | this_scroll_margin = min (this_scroll_margin, WINDOW_TOTAL_LINES (w) / 4); | 13664 | this_scroll_margin = min (this_scroll_margin, WINDOW_TOTAL_LINES (w) / 4); |
| 13651 | this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); | 13665 | this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); |
| 13652 | 13666 | ||
| 13653 | if ((w->cursor.y < this_scroll_margin | 13667 | if ((w->cursor.y >= 0 /* not vscrolled */ |
| 13668 | && w->cursor.y < this_scroll_margin | ||
| 13654 | && CHARPOS (pos) > BEGV | 13669 | && CHARPOS (pos) > BEGV |
| 13655 | && IT_CHARPOS (it) < ZV) | 13670 | && IT_CHARPOS (it) < ZV) |
| 13656 | /* rms: considering make_cursor_line_fully_visible_p here | 13671 | /* rms: considering make_cursor_line_fully_visible_p here |