diff options
| author | Karoly Lorentey | 2004-02-20 15:41:31 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-02-20 15:41:31 +0000 |
| commit | 3b7fbceb8359279028f466091b22ab11c5484bc3 (patch) | |
| tree | 2717da66d1b1213826e5622d0a57b94d0833a909 | |
| parent | aaaf7fe1673a2a5ece2eebaccf2d67a60e9938eb (diff) | |
| parent | 2320865de4ed4217fd534a5644f6ed0977981df1 (diff) | |
| download | emacs-3b7fbceb8359279028f466091b22ab11c5484bc3.tar.gz emacs-3b7fbceb8359279028f466091b22ab11c5484bc3.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-104
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-105
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-106
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-87
| -rw-r--r-- | lisp/ChangeLog | 60 | ||||
| -rw-r--r-- | lisp/calendar/appt.el | 46 | ||||
| -rw-r--r-- | lisp/calendar/cal-coptic.el | 4 | ||||
| -rw-r--r-- | lisp/calendar/cal-french.el | 4 | ||||
| -rw-r--r-- | lisp/calendar/cal-hebrew.el | 22 | ||||
| -rw-r--r-- | lisp/calendar/cal-islam.el | 12 | ||||
| -rw-r--r-- | lisp/calendar/cal-julian.el | 4 | ||||
| -rw-r--r-- | lisp/calendar/cal-mayan.el | 8 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 6 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 8 | ||||
| -rw-r--r-- | lisp/play/morse.el | 8 | ||||
| -rw-r--r-- | src/ChangeLog | 31 | ||||
| -rw-r--r-- | src/fringe.c | 6 | ||||
| -rw-r--r-- | src/keyboard.c | 176 | ||||
| -rw-r--r-- | src/lisp.h | 18 |
15 files changed, 236 insertions, 177 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5e51f9a093..bf4e852c494 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,35 @@ | |||
| 1 | 2004-02-19 Simon Josefsson <jas@extundo.com> | ||
| 2 | |||
| 3 | * play/morse.el: Fix typo. | ||
| 4 | (morse-code): Add @. | ||
| 5 | |||
| 6 | 2004-02-19 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 7 | |||
| 8 | * calendar/appt.el (appt-display-format): Change default to | ||
| 9 | 'ignore, for backwards compatability. | ||
| 10 | (appt-display-message): If appt-display-format is 'ignore, | ||
| 11 | respect old vars appt-msg-window and appt-visible. | ||
| 12 | (appt-activate): Don't depend on return value of cancel-timer. | ||
| 13 | |||
| 14 | * calendar/calendar.el (calendar-holidays): Doc fix. | ||
| 15 | |||
| 16 | * calendar/cal-coptic.el (coptic-prompt-for-date): | ||
| 17 | Use assoc-string instead of assoc-ignore-case. | ||
| 18 | * calendar/cal-french.el (calendar-goto-french-date): Ditto. | ||
| 19 | * calendar/cal-hebrew.el (calendar-goto-hebrew-date) | ||
| 20 | (mark-hebrew-diary-entries, list-yahrzeit-dates): Ditto. | ||
| 21 | * calendar/cal-islam.el (calendar-goto-islamic-date) | ||
| 22 | (mark-islamic-diary-entries): Ditto. | ||
| 23 | * calendar/cal-julian.el (calendar-goto-julian-date): Ditto. | ||
| 24 | * calendar/cal-mayan.el (calendar-read-mayan-haab-date) | ||
| 25 | (calendar-read-mayan-tzolkin-date): Ditto. | ||
| 26 | * calendar/calendar.el (calendar-read-date): Ditto. | ||
| 27 | * calendar/diary-lib.el (mark-diary-entries): Ditto. | ||
| 28 | |||
| 1 | 2004-02-18 Markus Rost <rost@mathematik.uni-bielefeld.de> | 29 | 2004-02-18 Markus Rost <rost@mathematik.uni-bielefeld.de> |
| 2 | 30 | ||
| 3 | * progmodes/executable.el (executable-command-find-posix-p): Fix | 31 | * progmodes/executable.el (executable-command-find-posix-p): |
| 4 | choice of the directory. | 32 | Fix choice of the directory. |
| 5 | 33 | ||
| 6 | 2004-02-17 Luc Teirlinck <teirllm@auburn.edu> | 34 | 2004-02-17 Luc Teirlinck <teirllm@auburn.edu> |
| 7 | 35 | ||
| @@ -55,11 +83,11 @@ | |||
| 55 | 83 | ||
| 56 | * rmail-spam-filter.el: (vm-use-spam-filter) | 84 | * rmail-spam-filter.el: (vm-use-spam-filter) |
| 57 | (rsf-min-region-length-added-to-spam-list): New variables. | 85 | (rsf-min-region-length-added-to-spam-list): New variables. |
| 58 | (rsf-bbdb-auto-delete-spam-bbdb-entries): Renamed from | 86 | (rsf-bbdb-auto-delete-spam-bbdb-entries): Rename from |
| 59 | rmail-bbdb-auto-delete-spam-entries. Added cc: to recipients for | 87 | rmail-bbdb-auto-delete-spam-entries. Added cc: to recipients for |
| 60 | spam testing. Don't delete spam message if automatic deletion | 88 | spam testing. Don't delete spam message if automatic deletion |
| 61 | after output via variable rmail-delete-after-output is turned on. | 89 | after output via variable rmail-delete-after-output is turned on. |
| 62 | (rsf-bbdb-dont-create-entries-for-deleted-messages): Renamed from | 90 | (rsf-bbdb-dont-create-entries-for-deleted-messages): Rename from |
| 63 | rsf-bbdb-dont-create-entries-for-spam. | 91 | rsf-bbdb-dont-create-entries-for-spam. |
| 64 | (check-field): New function, extracted from code in | 92 | (check-field): New function, extracted from code in |
| 65 | rmail-spam-filter to ease addition of header fields like | 93 | rmail-spam-filter to ease addition of header fields like |
| @@ -69,11 +97,10 @@ | |||
| 69 | (rmail-spam-filter): Replace repeated test code for header fields | 97 | (rmail-spam-filter): Replace repeated test code for header fields |
| 70 | by calls to check-field; change the call to | 98 | by calls to check-field; change the call to |
| 71 | rmail-output-to-rmail-file such that rmail-current-message stays | 99 | rmail-output-to-rmail-file such that rmail-current-message stays |
| 72 | the same to avoid wrong deletion of unseen | 100 | the same to avoid wrong deletion of unseen flags. |
| 73 | flags. | ||
| 74 | (rsf-add-contents-type): New function to convert old format | 101 | (rsf-add-contents-type): New function to convert old format |
| 75 | of rmail-spam-definitions-alist into new one. | 102 | of rmail-spam-definitions-alist into new one. |
| 76 | Changed prefixes of all variables and functions from | 103 | Change prefixes of all variables and functions from |
| 77 | rmail-spam-filter- or spam-filter- or rmail-spam- to rsf-. | 104 | rmail-spam-filter- or spam-filter- or rmail-spam- to rsf-. |
| 78 | 105 | ||
| 79 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | 106 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> |
| @@ -97,8 +124,8 @@ | |||
| 97 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> | 124 | 2004-02-16 Eli Zaretskii <eliz@elta.co.il> |
| 98 | 125 | ||
| 99 | * emacs-lisp/rx.el (rx-check, rx-check-any, rx-check-not) | 126 | * emacs-lisp/rx.el (rx-check, rx-check-any, rx-check-not) |
| 100 | (rx-repeat, rx-check-backref, rx-syntax, rx-to-string): Use | 127 | (rx-repeat, rx-check-backref, rx-syntax, rx-to-string): |
| 101 | lower-case "rx" in all error message. | 128 | Use lower-case "rx" in all error message. |
| 102 | 129 | ||
| 103 | 2004-02-16 Dave Love <fx@gnu.org> | 130 | 2004-02-16 Dave Love <fx@gnu.org> |
| 104 | 131 | ||
| @@ -125,7 +152,7 @@ | |||
| 125 | * autorevert.el (auto-revert-active-p, auto-revert-list-diff) | 152 | * autorevert.el (auto-revert-active-p, auto-revert-list-diff) |
| 126 | (auto-revert-dired-file-list, auto-revert-dired-changed-p) | 153 | (auto-revert-dired-file-list, auto-revert-dired-changed-p) |
| 127 | (auto-revert-handler, auto-revert-active-p): New functions. | 154 | (auto-revert-handler, auto-revert-active-p): New functions. |
| 128 | (auto-revert-buffers): Moved revert logic to `auto-revert-handler' | 155 | (auto-revert-buffers): Move revert logic to `auto-revert-handler' |
| 129 | and `auto-revert-active-p'. | 156 | and `auto-revert-active-p'. |
| 130 | (eval-when-compile): Defvar dired-directory and vc-mode. | 157 | (eval-when-compile): Defvar dired-directory and vc-mode. |
| 131 | (auto-revert-vc-cvs-file-version, auto-revert-vc-buffer-p) | 158 | (auto-revert-vc-cvs-file-version, auto-revert-vc-buffer-p) |
| @@ -188,7 +215,7 @@ | |||
| 188 | 215 | ||
| 189 | 2004-02-14 Martin Stjernholm <bug-cc-mode@gnu.org> | 216 | 2004-02-14 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 190 | 217 | ||
| 191 | * Makefile.in: Fixed the CC Mode recompile kludge so it works | 218 | * Makefile.in: Fix the CC Mode recompile kludge so it works |
| 192 | when building in a different directory. | 219 | when building in a different directory. |
| 193 | 220 | ||
| 194 | 2004-02-13 Luc Teirlinck <teirllm@auburn.edu> | 221 | 2004-02-13 Luc Teirlinck <teirllm@auburn.edu> |
| @@ -197,6 +224,17 @@ | |||
| 197 | 224 | ||
| 198 | 2004-02-11 Stefan Monnier <monnier@iro.umontreal.ca> | 225 | 2004-02-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 199 | 226 | ||
| 227 | * diff.el: Don't use compile any more, use diff-mode instead. | ||
| 228 | (diff-regexp-alist, diff-old-file, diff-new-file) | ||
| 229 | (diff-parse-differences, diff-process-setup): Remove. | ||
| 230 | (diff-sentinel): New fun. | ||
| 231 | (diff): Use it. Run the process ourselves. | ||
| 232 | Use diff-mode for the rest of the processing. | ||
| 233 | |||
| 234 | * diff.el (diff): Simplify code handling `switch'. | ||
| 235 | |||
| 236 | 2004-02-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 237 | |||
| 200 | * pcvs-defs.el (cvs-menu): Add `tag'. | 238 | * pcvs-defs.el (cvs-menu): Add `tag'. |
| 201 | 239 | ||
| 202 | 2004-02-11 Luc Teirlinck <teirllm@auburn.edu> | 240 | 2004-02-11 Luc Teirlinck <teirllm@auburn.edu> |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index f6e33aeefe0..d002b6fd212 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | ;;; documentation of the function `appt-check' is required. | 43 | ;;; documentation of the function `appt-check' is required. |
| 44 | ;;; Relevant customizable variables are also listed in the | 44 | ;;; Relevant customizable variables are also listed in the |
| 45 | ;;; documentation of that function. | 45 | ;;; documentation of that function. |
| 46 | ;;; | 46 | ;;; |
| 47 | ;;; Today's appointment list is initialized from the diary when this | 47 | ;;; Today's appointment list is initialized from the diary when this |
| 48 | ;;; package is activated. Additionally, the appointments list is | 48 | ;;; package is activated. Additionally, the appointments list is |
| 49 | ;;; recreated automatically at 12:01am for those who do not logout | 49 | ;;; recreated automatically at 12:01am for those who do not logout |
| @@ -121,15 +121,16 @@ If non-nil, this variable overrides `appt-visible'." | |||
| 121 | (make-obsolete-variable 'appt-msg-window 'appt-display-format "21.4") | 121 | (make-obsolete-variable 'appt-msg-window 'appt-display-format "21.4") |
| 122 | 122 | ||
| 123 | ;; TODO - add popup. | 123 | ;; TODO - add popup. |
| 124 | (defcustom appt-display-format (cond (appt-msg-window 'window) | 124 | (defcustom appt-display-format 'ignore |
| 125 | (appt-visible 'echo) | ||
| 126 | (t nil)) | ||
| 127 | "How appointment reminders should be displayed. | 125 | "How appointment reminders should be displayed. |
| 128 | The options are: | 126 | The options are: |
| 129 | window - use a separate window | 127 | window - use a separate window |
| 130 | echo - use the echo area | 128 | echo - use the echo area |
| 131 | nil - no visible reminder. | 129 | nil - no visible reminder. |
| 132 | See also `appt-audible' and `appt-display-mode-line'." | 130 | See also `appt-audible' and `appt-display-mode-line'. |
| 131 | |||
| 132 | The default value is 'ignore, which means to fall back on the value | ||
| 133 | of the (obsolete) variables `appt-msg-window' and `appt-visible'." | ||
| 133 | :type '(choice | 134 | :type '(choice |
| 134 | (const :tag "Separate window" window) | 135 | (const :tag "Separate window" window) |
| 135 | (const :tag "Echo-area" echo) | 136 | (const :tag "Echo-area" echo) |
| @@ -222,17 +223,24 @@ If this is non-nil, appointment checking is active.") | |||
| 222 | The string STRING describes the appointment, due in integer MINS minutes. | 223 | The string STRING describes the appointment, due in integer MINS minutes. |
| 223 | The format of the visible reminder is controlled by `appt-display-format'. | 224 | The format of the visible reminder is controlled by `appt-display-format'. |
| 224 | The variable `appt-audible' controls the audible reminder." | 225 | The variable `appt-audible' controls the audible reminder." |
| 225 | (cond ((eq appt-display-format 'window) | 226 | ;; let binding for backwards compatability. Remove when obsolete |
| 226 | (funcall appt-disp-window-function | 227 | ;; vars appt-msg-window and appt-visible are dropped. |
| 227 | (number-to-string mins) | 228 | (let ((appt-display-format |
| 228 | (format-time-string "%a %b %e " (current-time)) | 229 | (if (eq appt-display-format 'ignore) |
| 229 | string) | 230 | (cond (appt-msg-window 'window) |
| 230 | (run-at-time (format "%d sec" appt-display-duration) | 231 | (appt-visible 'echo)) |
| 231 | nil | 232 | appt-display-format))) |
| 232 | appt-delete-window-function)) | 233 | (cond ((eq appt-display-format 'window) |
| 233 | ((eq appt-display-format 'echo) | 234 | (funcall appt-disp-window-function |
| 234 | (message "%s" string))) | 235 | (number-to-string mins) |
| 235 | (if appt-audible (beep 1))) | 236 | (format-time-string "%a %b %e " (current-time)) |
| 237 | string) | ||
| 238 | (run-at-time (format "%d sec" appt-display-duration) | ||
| 239 | nil | ||
| 240 | appt-delete-window-function)) | ||
| 241 | ((eq appt-display-format 'echo) | ||
| 242 | (message "%s" string))) | ||
| 243 | (if appt-audible (beep 1)))) | ||
| 236 | 244 | ||
| 237 | 245 | ||
| 238 | (defun appt-check (&optional force) | 246 | (defun appt-check (&optional force) |
| @@ -648,9 +656,9 @@ ARG is positive, otherwise off." | |||
| 648 | (remove-hook 'write-file-functions 'appt-update-list) | 656 | (remove-hook 'write-file-functions 'appt-update-list) |
| 649 | (or global-mode-string (setq global-mode-string '(""))) | 657 | (or global-mode-string (setq global-mode-string '(""))) |
| 650 | (delq 'appt-mode-string global-mode-string) | 658 | (delq 'appt-mode-string global-mode-string) |
| 651 | (and appt-timer | 659 | (when appt-timer |
| 652 | (cancel-timer appt-timer) | 660 | (cancel-timer appt-timer) |
| 653 | (setq appt-timer nil)) | 661 | (setq appt-timer nil)) |
| 654 | (when appt-active | 662 | (when appt-active |
| 655 | (add-hook 'write-file-functions 'appt-update-list) | 663 | (add-hook 'write-file-functions 'appt-update-list) |
| 656 | (setq appt-timer (run-at-time t 60 'appt-check) | 664 | (setq appt-timer (run-at-time t 60 'appt-check) |
diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index f33e80d6991..df1201a23c4 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el | |||
| @@ -151,14 +151,14 @@ Echo Coptic date unless NOECHO is t." | |||
| 151 | (calendar-coptic-from-absolute | 151 | (calendar-coptic-from-absolute |
| 152 | (calendar-absolute-from-gregorian today)))))) | 152 | (calendar-absolute-from-gregorian today)))))) |
| 153 | (completion-ignore-case t) | 153 | (completion-ignore-case t) |
| 154 | (month (cdr (assoc-ignore-case | 154 | (month (cdr (assoc-string |
| 155 | (completing-read | 155 | (completing-read |
| 156 | (format "%s calendar month name: " coptic-name) | 156 | (format "%s calendar month name: " coptic-name) |
| 157 | (mapcar 'list | 157 | (mapcar 'list |
| 158 | (append coptic-calendar-month-name-array nil)) | 158 | (append coptic-calendar-month-name-array nil)) |
| 159 | nil t) | 159 | nil t) |
| 160 | (calendar-make-alist coptic-calendar-month-name-array | 160 | (calendar-make-alist coptic-calendar-month-name-array |
| 161 | 1)))) | 161 | 1) t))) |
| 162 | (last (coptic-calendar-last-day-of-month month year)) | 162 | (last (coptic-calendar-last-day-of-month month year)) |
| 163 | (day (calendar-read | 163 | (day (calendar-read |
| 164 | (format "%s calendar day (1-%d): " coptic-name last) | 164 | (format "%s calendar day (1-%d): " coptic-name last) |
diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el index 7c855e4127a..d988b008f53 100644 --- a/lisp/calendar/cal-french.el +++ b/lisp/calendar/cal-french.el | |||
| @@ -228,12 +228,12 @@ Echo French Revolutionary date unless NOECHO is t." | |||
| 228 | (concat "Jour " x)) | 228 | (concat "Jour " x)) |
| 229 | special-days)))))))) | 229 | special-days)))))))) |
| 230 | (completion-ignore-case t) | 230 | (completion-ignore-case t) |
| 231 | (month (cdr (assoc-ignore-case | 231 | (month (cdr (assoc-string |
| 232 | (completing-read | 232 | (completing-read |
| 233 | "Mois ou Sansculottide: " | 233 | "Mois ou Sansculottide: " |
| 234 | month-list | 234 | month-list |
| 235 | nil t) | 235 | nil t) |
| 236 | (calendar-make-alist month-list 1 'car)))) | 236 | (calendar-make-alist month-list 1 'car) t))) |
| 237 | (day (if (> month 12) | 237 | (day (if (> month 12) |
| 238 | (- month 12) | 238 | (- month 12) |
| 239 | (calendar-read | 239 | (calendar-read |
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index acdac6ce5c6..776868159be 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el | |||
| @@ -236,17 +236,17 @@ Driven by the variable `calendar-date-display-form'." | |||
| 236 | calendar-hebrew-month-name-array-leap-year | 236 | calendar-hebrew-month-name-array-leap-year |
| 237 | calendar-hebrew-month-name-array-common-year)) | 237 | calendar-hebrew-month-name-array-common-year)) |
| 238 | (completion-ignore-case t) | 238 | (completion-ignore-case t) |
| 239 | (month (cdr (assoc-ignore-case | 239 | (month (cdr (assoc-string |
| 240 | (completing-read | 240 | (completing-read |
| 241 | "Hebrew calendar month name: " | 241 | "Hebrew calendar month name: " |
| 242 | (mapcar 'list (append month-array nil)) | 242 | (mapcar 'list (append month-array nil)) |
| 243 | (if (= year 3761) | 243 | (if (= year 3761) |
| 244 | '(lambda (x) | 244 | '(lambda (x) |
| 245 | (let ((m (cdr | 245 | (let ((m (cdr |
| 246 | (assoc-ignore-case | 246 | (assoc-string |
| 247 | (car x) | 247 | (car x) |
| 248 | (calendar-make-alist | 248 | (calendar-make-alist month-array) |
| 249 | month-array))))) | 249 | t)))) |
| 250 | (< 0 | 250 | (< 0 |
| 251 | (calendar-absolute-from-hebrew | 251 | (calendar-absolute-from-hebrew |
| 252 | (list m | 252 | (list m |
| @@ -254,7 +254,7 @@ Driven by the variable `calendar-date-display-form'." | |||
| 254 | m year) | 254 | m year) |
| 255 | year)))))) | 255 | year)))))) |
| 256 | t) | 256 | t) |
| 257 | (calendar-make-alist month-array 1)))) | 257 | (calendar-make-alist month-array 1) t))) |
| 258 | (last (hebrew-calendar-last-day-of-month month year)) | 258 | (last (hebrew-calendar-last-day-of-month month year)) |
| 259 | (first (if (and (= year 3761) (= month 10)) | 259 | (first (if (and (= year 3761) (= month 10)) |
| 260 | 18 1)) | 260 | 18 1)) |
| @@ -753,18 +753,18 @@ is provided for use as part of the nongregorian-diary-marking-hook." | |||
| 753 | (string-to-int y-str))))) | 753 | (string-to-int y-str))))) |
| 754 | (if dd-name | 754 | (if dd-name |
| 755 | (mark-calendar-days-named | 755 | (mark-calendar-days-named |
| 756 | (cdr (assoc-ignore-case dd-name | 756 | (cdr (assoc-string dd-name |
| 757 | (calendar-make-alist | 757 | (calendar-make-alist |
| 758 | calendar-day-name-array | 758 | calendar-day-name-array |
| 759 | 0 nil calendar-day-abbrev-array)))) | 759 | 0 nil calendar-day-abbrev-array) t))) |
| 760 | (if mm-name | 760 | (if mm-name |
| 761 | (setq mm | 761 | (setq mm |
| 762 | (if (string-equal mm-name "*") 0 | 762 | (if (string-equal mm-name "*") 0 |
| 763 | (cdr | 763 | (cdr |
| 764 | (assoc-ignore-case | 764 | (assoc-string |
| 765 | mm-name | 765 | mm-name |
| 766 | (calendar-make-alist | 766 | (calendar-make-alist |
| 767 | calendar-hebrew-month-name-array-leap-year)))))) | 767 | calendar-hebrew-month-name-array-leap-year) t))))) |
| 768 | (mark-hebrew-calendar-date-pattern mm dd yy))))) | 768 | (mark-hebrew-calendar-date-pattern mm dd yy))))) |
| 769 | (setq d (cdr d))))) | 769 | (setq d (cdr d))))) |
| 770 | 770 | ||
| @@ -839,12 +839,12 @@ from the cursor position." | |||
| 839 | (int-to-string (extract-calendar-year today)))) | 839 | (int-to-string (extract-calendar-year today)))) |
| 840 | (month-array calendar-month-name-array) | 840 | (month-array calendar-month-name-array) |
| 841 | (completion-ignore-case t) | 841 | (completion-ignore-case t) |
| 842 | (month (cdr (assoc-ignore-case | 842 | (month (cdr (assoc-string |
| 843 | (completing-read | 843 | (completing-read |
| 844 | "Month of death (name): " | 844 | "Month of death (name): " |
| 845 | (mapcar 'list (append month-array nil)) | 845 | (mapcar 'list (append month-array nil)) |
| 846 | nil t) | 846 | nil t) |
| 847 | (calendar-make-alist month-array 1)))) | 847 | (calendar-make-alist month-array 1) t))) |
| 848 | (last (calendar-last-day-of-month month year)) | 848 | (last (calendar-last-day-of-month month year)) |
| 849 | (day (calendar-read | 849 | (day (calendar-read |
| 850 | (format "Day of death (1-%d): " last) | 850 | (format "Day of death (1-%d): " last) |
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index 482b77d74d9..8dcf5c29b1f 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el | |||
| @@ -154,12 +154,12 @@ Driven by the variable `calendar-date-display-form'." | |||
| 154 | (calendar-absolute-from-gregorian today)))))) | 154 | (calendar-absolute-from-gregorian today)))))) |
| 155 | (month-array calendar-islamic-month-name-array) | 155 | (month-array calendar-islamic-month-name-array) |
| 156 | (completion-ignore-case t) | 156 | (completion-ignore-case t) |
| 157 | (month (cdr (assoc-ignore-case | 157 | (month (cdr (assoc-string |
| 158 | (completing-read | 158 | (completing-read |
| 159 | "Islamic calendar month name: " | 159 | "Islamic calendar month name: " |
| 160 | (mapcar 'list (append month-array nil)) | 160 | (mapcar 'list (append month-array nil)) |
| 161 | nil t) | 161 | nil t) |
| 162 | (calendar-make-alist month-array 1)))) | 162 | (calendar-make-alist month-array 1) t))) |
| 163 | (last (islamic-calendar-last-day-of-month month year)) | 163 | (last (islamic-calendar-last-day-of-month month year)) |
| 164 | (day (calendar-read | 164 | (day (calendar-read |
| 165 | (format "Islamic calendar day (1-%d): " last) | 165 | (format "Islamic calendar day (1-%d): " last) |
| @@ -372,16 +372,16 @@ provided for use as part of the nongregorian-diary-marking-hook." | |||
| 372 | (string-to-int y-str))))) | 372 | (string-to-int y-str))))) |
| 373 | (if dd-name | 373 | (if dd-name |
| 374 | (mark-calendar-days-named | 374 | (mark-calendar-days-named |
| 375 | (cdr (assoc-ignore-case dd-name | 375 | (cdr (assoc-string dd-name |
| 376 | (calendar-make-alist | 376 | (calendar-make-alist |
| 377 | calendar-day-name-array | 377 | calendar-day-name-array |
| 378 | 0 nil calendar-day-abbrev-array)))) | 378 | 0 nil calendar-day-abbrev-array) t))) |
| 379 | (if mm-name | 379 | (if mm-name |
| 380 | (setq mm (if (string-equal mm-name "*") 0 | 380 | (setq mm (if (string-equal mm-name "*") 0 |
| 381 | (cdr (assoc-ignore-case | 381 | (cdr (assoc-string |
| 382 | mm-name | 382 | mm-name |
| 383 | (calendar-make-alist | 383 | (calendar-make-alist |
| 384 | calendar-islamic-month-name-array)))))) | 384 | calendar-islamic-month-name-array) t))))) |
| 385 | (mark-islamic-calendar-date-pattern mm dd yy))))) | 385 | (mark-islamic-calendar-date-pattern mm dd yy))))) |
| 386 | (setq d (cdr d))))) | 386 | (setq d (cdr d))))) |
| 387 | 387 | ||
diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index ac422602dc4..67fb8515b24 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el | |||
| @@ -115,12 +115,12 @@ Driven by the variable `calendar-date-display-form'." | |||
| 115 | today)))))) | 115 | today)))))) |
| 116 | (month-array calendar-month-name-array) | 116 | (month-array calendar-month-name-array) |
| 117 | (completion-ignore-case t) | 117 | (completion-ignore-case t) |
| 118 | (month (cdr (assoc-ignore-case | 118 | (month (cdr (assoc-string |
| 119 | (completing-read | 119 | (completing-read |
| 120 | "Julian calendar month name: " | 120 | "Julian calendar month name: " |
| 121 | (mapcar 'list (append month-array nil)) | 121 | (mapcar 'list (append month-array nil)) |
| 122 | nil t) | 122 | nil t) |
| 123 | (calendar-make-alist month-array 1)))) | 123 | (calendar-make-alist month-array 1) t))) |
| 124 | (last | 124 | (last |
| 125 | (if (and (zerop (% year 4)) (= month 2)) | 125 | (if (and (zerop (% year 4)) (= month 2)) |
| 126 | 29 | 126 | 29 |
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index acaa1709080..c2c3e027c4b 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el | |||
| @@ -256,11 +256,11 @@ Returns nil if such a tzolkin-haab combination is impossible." | |||
| 256 | (haab-month-list (append calendar-mayan-haab-month-name-array | 256 | (haab-month-list (append calendar-mayan-haab-month-name-array |
| 257 | (and (< haab-day 5) '("Uayeb")))) | 257 | (and (< haab-day 5) '("Uayeb")))) |
| 258 | (haab-month (cdr | 258 | (haab-month (cdr |
| 259 | (assoc-ignore-case | 259 | (assoc-string |
| 260 | (completing-read "Haab uinal: " | 260 | (completing-read "Haab uinal: " |
| 261 | (mapcar 'list haab-month-list) | 261 | (mapcar 'list haab-month-list) |
| 262 | nil t) | 262 | nil t) |
| 263 | (calendar-make-alist haab-month-list 1))))) | 263 | (calendar-make-alist haab-month-list 1) t)))) |
| 264 | (cons haab-day haab-month))) | 264 | (cons haab-day haab-month))) |
| 265 | 265 | ||
| 266 | (defun calendar-read-mayan-tzolkin-date () | 266 | (defun calendar-read-mayan-tzolkin-date () |
| @@ -271,11 +271,11 @@ Returns nil if such a tzolkin-haab combination is impossible." | |||
| 271 | '(lambda (x) (and (> x 0) (< x 14))))) | 271 | '(lambda (x) (and (> x 0) (< x 14))))) |
| 272 | (tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil)) | 272 | (tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil)) |
| 273 | (tzolkin-name (cdr | 273 | (tzolkin-name (cdr |
| 274 | (assoc-ignore-case | 274 | (assoc-string |
| 275 | (completing-read "Tzolkin uinal: " | 275 | (completing-read "Tzolkin uinal: " |
| 276 | (mapcar 'list tzolkin-name-list) | 276 | (mapcar 'list tzolkin-name-list) |
| 277 | nil t) | 277 | nil t) |
| 278 | (calendar-make-alist tzolkin-name-list 1))))) | 278 | (calendar-make-alist tzolkin-name-list 1) t)))) |
| 279 | (cons tzolkin-count tzolkin-name))) | 279 | (cons tzolkin-count tzolkin-name))) |
| 280 | 280 | ||
| 281 | (defun calendar-next-calendar-round-date | 281 | (defun calendar-next-calendar-round-date |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 7440a5c7e02..a0644f54aa2 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1164,7 +1164,7 @@ example, to include American presidential elections, which occur on the first | |||
| 1164 | Tuesday after the first Monday in November of years divisible by 4, add | 1164 | Tuesday after the first Monday in November of years divisible by 4, add |
| 1165 | 1165 | ||
| 1166 | (holiday-sexp | 1166 | (holiday-sexp |
| 1167 | (if (zerop (% year 4)) | 1167 | '(if (zerop (% year 4)) |
| 1168 | (calendar-gregorian-from-absolute | 1168 | (calendar-gregorian-from-absolute |
| 1169 | (1+ (calendar-dayname-on-or-before | 1169 | (1+ (calendar-dayname-on-or-before |
| 1170 | 1 (+ 6 (calendar-absolute-from-gregorian | 1170 | 1 (+ 6 (calendar-absolute-from-gregorian |
| @@ -2544,12 +2544,12 @@ If optional NODAY is t, does not ask for day, but just returns | |||
| 2544 | (calendar-current-date))))) | 2544 | (calendar-current-date))))) |
| 2545 | (month-array calendar-month-name-array) | 2545 | (month-array calendar-month-name-array) |
| 2546 | (completion-ignore-case t) | 2546 | (completion-ignore-case t) |
| 2547 | (month (cdr (assoc-ignore-case | 2547 | (month (cdr (assoc-string |
| 2548 | (completing-read | 2548 | (completing-read |
| 2549 | "Month name: " | 2549 | "Month name: " |
| 2550 | (mapcar 'list (append month-array nil)) | 2550 | (mapcar 'list (append month-array nil)) |
| 2551 | nil t) | 2551 | nil t) |
| 2552 | (calendar-make-alist month-array 1)))) | 2552 | (calendar-make-alist month-array 1) t))) |
| 2553 | (last (calendar-last-day-of-month month year))) | 2553 | (last (calendar-last-day-of-month month year))) |
| 2554 | (if noday | 2554 | (if noday |
| 2555 | (if (eq noday t) | 2555 | (if (eq noday t) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index d2a0075fb71..bb4ea20f804 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -906,19 +906,19 @@ After the entries are marked, the hooks `nongregorian-diary-marking-hook' and | |||
| 906 | marks (nth 1 temp)))) | 906 | marks (nth 1 temp)))) |
| 907 | (if dd-name | 907 | (if dd-name |
| 908 | (mark-calendar-days-named | 908 | (mark-calendar-days-named |
| 909 | (cdr (assoc-ignore-case | 909 | (cdr (assoc-string |
| 910 | dd-name | 910 | dd-name |
| 911 | (calendar-make-alist | 911 | (calendar-make-alist |
| 912 | calendar-day-name-array | 912 | calendar-day-name-array |
| 913 | 0 nil calendar-day-abbrev-array))) marks) | 913 | 0 nil calendar-day-abbrev-array) t)) marks) |
| 914 | (if mm-name | 914 | (if mm-name |
| 915 | (setq mm | 915 | (setq mm |
| 916 | (if (string-equal mm-name "*") 0 | 916 | (if (string-equal mm-name "*") 0 |
| 917 | (cdr (assoc-ignore-case | 917 | (cdr (assoc-string |
| 918 | mm-name | 918 | mm-name |
| 919 | (calendar-make-alist | 919 | (calendar-make-alist |
| 920 | calendar-month-name-array | 920 | calendar-month-name-array |
| 921 | 1 nil calendar-month-abbrev-array)))))) | 921 | 1 nil calendar-month-abbrev-array) t))))) |
| 922 | (mark-calendar-date-pattern mm dd yy marks)))) | 922 | (mark-calendar-date-pattern mm dd yy marks)))) |
| 923 | (setq d (cdr d)))) | 923 | (setq d (cdr d)))) |
| 924 | (mark-sexp-diary-entries) | 924 | (mark-sexp-diary-entries) |
diff --git a/lisp/play/morse.el b/lisp/play/morse.el index cda88f4e640..ce4e4877e5e 100644 --- a/lisp/play/morse.el +++ b/lisp/play/morse.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*- | 1 | ;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995, 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995, 2002, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Rick Farnbach <rick_farnbach@MENTORG.COM> | 5 | ;; Author: Rick Farnbach <rick_farnbach@MENTORG.COM> |
| 6 | ;; Keywords: games | 6 | ;; Keywords: games |
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; Converts text to Morse code and back with M-x morese-region and | 27 | ;; Converts text to Morse code and back with M-x morse-region and |
| 28 | ;; M-x unmorse-region (though Morse code is no longer official :-(). | 28 | ;; M-x unmorse-region (though Morse code is no longer official :-(). |
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| @@ -88,7 +88,9 @@ | |||
| 88 | ("Ñ" . "--.--") | 88 | ("Ñ" . "--.--") |
| 89 | ("Ö" . "---.") | 89 | ("Ö" . "---.") |
| 90 | ("Ø" . "---.") | 90 | ("Ø" . "---.") |
| 91 | ("Ü" . "..--")) | 91 | ("Ü" . "..--") |
| 92 | ;; Recently standardized | ||
| 93 | ("@" . ".--.-.")) | ||
| 92 | "Morse code character set.") | 94 | "Morse code character set.") |
| 93 | 95 | ||
| 94 | ;;;###autoload | 96 | ;;;###autoload |
diff --git a/src/ChangeLog b/src/ChangeLog index 744259568e4..58661af0867 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2004-02-20 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * keyboard.c: Undo 2004-02-16 and 2004-02-17 changes. | ||
| 4 | The following changes are relative to the 2004-01-21 revision. | ||
| 5 | (NREAD_INPUT_EVENTS): Define as max number of input events to read | ||
| 6 | in one call to read_socket_hook. Value is 8. | ||
| 7 | (read_avail_input): Separate and rework handling of read_socket_hook | ||
| 8 | and non-read_socket_hook cases. Use smaller input_event buffer | ||
| 9 | in read_socket_hook case, and repeat if full buffer is read. Use | ||
| 10 | new local variable 'discard' to skip input after C-g. | ||
| 11 | In non-read_socket_hook case, just use a single input_event, and | ||
| 12 | call kbd_buffer_store_event on the fly for each character. | ||
| 13 | |||
| 14 | 2004-02-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 15 | |||
| 16 | * lisp.h (union Lisp_Object): Give a more precise type for `type'. | ||
| 17 | Remove unused `gu' alternative. | ||
| 18 | |||
| 19 | 2004-02-19 Andreas Schwab <schwab@suse.de> | ||
| 20 | |||
| 21 | * fringe.c (Fdefine_fringe_bitmap): Use && instead of & to avoid | ||
| 22 | warning. | ||
| 23 | |||
| 1 | 2004-02-18 Kim F. Storm <storm@cua.dk> | 24 | 2004-02-18 Kim F. Storm <storm@cua.dk> |
| 2 | 25 | ||
| 3 | * xdisp.c (get_window_cursor_type, display_and_set_cursor): | 26 | * xdisp.c (get_window_cursor_type, display_and_set_cursor): |
| @@ -44,9 +67,9 @@ | |||
| 44 | 67 | ||
| 45 | 2004-02-15 Stefan Monnier <monnier@iro.umontreal.ca> | 68 | 2004-02-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 46 | 69 | ||
| 47 | * data.c (Fbyteorder): | 70 | * data.c (Fbyteorder): |
| 48 | * fringe.c (Fdefine_fringe_bitmap): | 71 | * fringe.c (Fdefine_fringe_bitmap): |
| 49 | * xdisp.c (handle_single_display_prop): | 72 | * xdisp.c (handle_single_display_prop): |
| 50 | * xselect.c (x_handle_dnd_message): Lisp_Object/int mixup. | 73 | * xselect.c (x_handle_dnd_message): Lisp_Object/int mixup. |
| 51 | 74 | ||
| 52 | 2004-02-16 Jason Rumney <jasonr@gnu.org> | 75 | 2004-02-16 Jason Rumney <jasonr@gnu.org> |
| @@ -59,7 +82,7 @@ | |||
| 59 | controlling emulation of a three button mouse with option and | 82 | controlling emulation of a three button mouse with option and |
| 60 | command keys. | 83 | command keys. |
| 61 | (Qreverse, mac_get_enumlated_btn): Handle the emulation | 84 | (Qreverse, mac_get_enumlated_btn): Handle the emulation |
| 62 | (mac_event_to_emacs_modifiers, XTread_socket): Ditto | 85 | (mac_event_to_emacs_modifiers, XTread_socket): Ditto. |
| 63 | 86 | ||
| 64 | 2004-02-15 Kim F. Storm <storm@cua.dk> | 87 | 2004-02-15 Kim F. Storm <storm@cua.dk> |
| 65 | 88 | ||
diff --git a/src/fringe.c b/src/fringe.c index bd93b4cfce5..b14668e8d7e 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -1192,9 +1192,9 @@ Return new bitmap number, or nil of no more free bitmap slots. */) | |||
| 1192 | 1192 | ||
| 1193 | fb.dynamic = 1; | 1193 | fb.dynamic = 1; |
| 1194 | 1194 | ||
| 1195 | xfb = (struct fringe_bitmap *)xmalloc (sizeof fb | 1195 | xfb = (struct fringe_bitmap *) xmalloc (sizeof fb |
| 1196 | + fb.height * BYTES_PER_BITMAP_ROW); | 1196 | + fb.height * BYTES_PER_BITMAP_ROW); |
| 1197 | fb.bits = b = (unsigned short *)(xfb+1); | 1197 | fb.bits = b = (unsigned short *) (xfb + 1); |
| 1198 | bzero (b, fb.height); | 1198 | bzero (b, fb.height); |
| 1199 | 1199 | ||
| 1200 | j = 0; | 1200 | j = 0; |
diff --git a/src/keyboard.c b/src/keyboard.c index 26b1bfa89e1..4cae90cd764 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -4051,9 +4051,9 @@ kbd_buffer_get_event (kbp, used_mouse_menu) | |||
| 4051 | If there is no valid info, it does not store anything | 4051 | If there is no valid info, it does not store anything |
| 4052 | so x remains nil. */ | 4052 | so x remains nil. */ |
| 4053 | x = Qnil; | 4053 | x = Qnil; |
| 4054 | 4054 | ||
| 4055 | /* XXX Can f or mouse_position_hook be NULL here? */ | 4055 | /* XXX Can f or mouse_position_hook be NULL here? */ |
| 4056 | if (f && FRAME_DISPLAY (f)->mouse_position_hook) | 4056 | if (f && FRAME_DISPLAY (f)->mouse_position_hook) |
| 4057 | (*FRAME_DISPLAY (f)->mouse_position_hook) (&f, 0, &bar_window, | 4057 | (*FRAME_DISPLAY (f)->mouse_position_hook) (&f, 0, &bar_window, |
| 4058 | &part, &x, &y, &time); | 4058 | &part, &x, &y, &time); |
| 4059 | 4059 | ||
| @@ -4986,7 +4986,7 @@ make_lispy_position (f, x, y, time) | |||
| 4986 | { | 4986 | { |
| 4987 | Lisp_Object string; | 4987 | Lisp_Object string; |
| 4988 | int charpos; | 4988 | int charpos; |
| 4989 | 4989 | ||
| 4990 | posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; | 4990 | posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; |
| 4991 | rx = wx, ry = wy; | 4991 | rx = wx, ry = wy; |
| 4992 | string = marginal_area_string (w, part, &rx, &ry, &charpos, | 4992 | string = marginal_area_string (w, part, &rx, &ry, &charpos, |
| @@ -5469,7 +5469,7 @@ make_lispy_event (event) | |||
| 5469 | { | 5469 | { |
| 5470 | Lisp_Object position; | 5470 | Lisp_Object position; |
| 5471 | Lisp_Object head; | 5471 | Lisp_Object head; |
| 5472 | 5472 | ||
| 5473 | /* Build the position as appropriate for this mouse click. */ | 5473 | /* Build the position as appropriate for this mouse click. */ |
| 5474 | struct frame *f = XFRAME (event->frame_or_window); | 5474 | struct frame *f = XFRAME (event->frame_or_window); |
| 5475 | 5475 | ||
| @@ -6457,7 +6457,7 @@ get_filtered_input_pending (addr, do_timers_now, filter_events) | |||
| 6457 | /* If input is being read as it arrives, and we have none, there is none. */ | 6457 | /* If input is being read as it arrives, and we have none, there is none. */ |
| 6458 | if (*addr > 0 || (interrupt_input && ! interrupts_deferred)) | 6458 | if (*addr > 0 || (interrupt_input && ! interrupts_deferred)) |
| 6459 | return; | 6459 | return; |
| 6460 | 6460 | ||
| 6461 | /* Try to read some input and see how much we get. */ | 6461 | /* Try to read some input and see how much we get. */ |
| 6462 | gobble_input (0); | 6462 | gobble_input (0); |
| 6463 | *addr = (!NILP (Vquit_flag) | 6463 | *addr = (!NILP (Vquit_flag) |
| @@ -6560,14 +6560,6 @@ 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 | |||
| 6571 | /* Read any terminal input already buffered up by the system | 6563 | /* Read any terminal input already buffered up by the system |
| 6572 | into the kbd_buffer, but do not wait. | 6564 | into the kbd_buffer, but do not wait. |
| 6573 | 6565 | ||
| @@ -6578,75 +6570,89 @@ static int in_read_avail_input = 0; | |||
| 6578 | only when SIGIO is blocked. | 6570 | only when SIGIO is blocked. |
| 6579 | 6571 | ||
| 6580 | Returns the number of keyboard chars read, or -1 meaning | 6572 | Returns the number of keyboard chars read, or -1 meaning |
| 6581 | this is a bad time to try to read input. */ | 6573 | this is a bad time to try to read input. |
| 6574 | |||
| 6575 | Typically, there are just a few available input events to be read | ||
| 6576 | here, so we really don't need to allocate and initialize a big | ||
| 6577 | buffer of input_events as we used to do. Instead, we just allocate | ||
| 6578 | a small buffer of input events -- and then poll for more input if we | ||
| 6579 | read a full buffer of input events. */ | ||
| 6580 | |||
| 6581 | #define NREAD_INPUT_EVENTS 8 | ||
| 6582 | 6582 | ||
| 6583 | static int | 6583 | static int |
| 6584 | read_avail_input (expected) | 6584 | read_avail_input (expected) |
| 6585 | int expected; | 6585 | int expected; |
| 6586 | { | 6586 | { |
| 6587 | struct input_event *buf = read_avail_input_buf; | ||
| 6588 | struct input_event tmp_buf[KBD_BUFFER_SIZE]; | ||
| 6589 | register int i; | 6587 | register int i; |
| 6590 | int nread = 0; | 6588 | int nread = 0; |
| 6591 | struct display *d; | 6589 | struct display *d; |
| 6592 | |||
| 6593 | /* Trivial hack to make read_avail_input re-entrant. */ | ||
| 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 | } | ||
| 6600 | 6590 | ||
| 6601 | /* Loop through the available displays, and call their input hooks. */ | 6591 | /* Loop through the available displays, and call their input hooks. */ |
| 6602 | d = display_list; | 6592 | d = display_list; |
| 6603 | while (d) | 6593 | while (d) |
| 6604 | { | 6594 | { |
| 6605 | struct display *next = d->next_display; | 6595 | struct display *next = d->next_display; |
| 6606 | |||
| 6607 | if (d->read_socket_hook) | ||
| 6608 | /* No need for FIONREAD or fcntl; just say don't wait. */ | ||
| 6609 | nread = (*d->read_socket_hook) (d, buf, KBD_BUFFER_SIZE, expected); | ||
| 6610 | 6596 | ||
| 6611 | if (nread == -2) /* -2 means non-transient error */ | 6597 | if (d->read_socket_hook) |
| 6612 | { | 6598 | { |
| 6613 | /* The display device terminated; it should be closed. */ | 6599 | int discard = 0; |
| 6600 | int nr; | ||
| 6614 | 6601 | ||
| 6615 | /* Kill Emacs if this was our last display. */ | 6602 | do { |
| 6616 | if (! display_list->next_display) | 6603 | struct input_event buf[NREAD_INPUT_EVENTS]; |
| 6617 | kill (getpid (), SIGHUP); | ||
| 6618 | 6604 | ||
| 6619 | /* XXX Is calling delete_display safe here? It calls Fdelete_frame. */ | 6605 | for (i = 0; i < NREAD_INPUT_EVENTS; i++) |
| 6620 | if (d->delete_display_hook) | 6606 | EVENT_INIT (buf[i]); |
| 6621 | (*d->delete_display_hook) (d); | 6607 | |
| 6622 | else | 6608 | /* No need for FIONREAD or fcntl; just say don't wait. */ |
| 6623 | delete_display (d); | 6609 | nr = (*d->read_socket_hook) (d, buf, NREAD_INPUT_EVENTS, expected); |
| 6624 | } | 6610 | |
| 6625 | else if (nread > 0) | 6611 | if (nr > 0) |
| 6626 | { | 6612 | { |
| 6627 | /* We've got input. */ | 6613 | /* We've got input. */ |
| 6628 | break; | 6614 | nread += nr; |
| 6615 | expected = 0; | ||
| 6616 | |||
| 6617 | /* Scan the chars for C-g and store them in kbd_buffer. */ | ||
| 6618 | for (i = 0; !discard && i < nr; i++) | ||
| 6619 | { | ||
| 6620 | kbd_buffer_store_event (&buf[i]); | ||
| 6621 | /* Don't look at input that follows a C-g too closely. | ||
| 6622 | This reduces lossage due to autorepeat on C-g. */ | ||
| 6623 | if (buf[i].kind == ASCII_KEYSTROKE_EVENT | ||
| 6624 | && buf[i].code == quit_char) | ||
| 6625 | discard = 1; | ||
| 6626 | } | ||
| 6627 | } | ||
| 6628 | else if (nr == -2) /* Non-transient error. */ | ||
| 6629 | { | ||
| 6630 | /* The display device terminated; it should be closed. */ | ||
| 6631 | |||
| 6632 | /* Kill Emacs if this was our last display. */ | ||
| 6633 | if (! display_list->next_display) | ||
| 6634 | /* Formerly simply reported no input, but that | ||
| 6635 | sometimes led to a failure of Emacs to terminate. | ||
| 6636 | SIGHUP seems appropriate if we can't reach the | ||
| 6637 | terminal. */ | ||
| 6638 | /* ??? Is it really right to send the signal just to | ||
| 6639 | this process rather than to the whole process | ||
| 6640 | group? Perhaps on systems with FIONREAD Emacs is | ||
| 6641 | alone in its group. */ | ||
| 6642 | kill (getpid (), SIGHUP); | ||
| 6643 | |||
| 6644 | /* XXX Is calling delete_display safe here? It calls Fdelete_frame. */ | ||
| 6645 | if (d->delete_display_hook) | ||
| 6646 | (*d->delete_display_hook) (d); | ||
| 6647 | else | ||
| 6648 | delete_display (d); | ||
| 6649 | } | ||
| 6650 | } while (nr == NREAD_INPUT_EVENTS); | ||
| 6629 | } | 6651 | } |
| 6630 | 6652 | ||
| 6631 | d = next; | 6653 | d = next; |
| 6632 | } | 6654 | } |
| 6633 | 6655 | ||
| 6634 | /* Scan the chars for C-g and store them in kbd_buffer. */ | ||
| 6635 | for (i = 0; i < nread; i++) | ||
| 6636 | { | ||
| 6637 | kbd_buffer_store_event (&buf[i]); | ||
| 6638 | /* Don't look at input that follows a C-g too closely. | ||
| 6639 | This reduces lossage due to autorepeat on C-g. */ | ||
| 6640 | if (buf[i].kind == ASCII_KEYSTROKE_EVENT | ||
| 6641 | && buf[i].code == quit_char) | ||
| 6642 | break; | ||
| 6643 | } | ||
| 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 | |||
| 6650 | return nread; | 6656 | return nread; |
| 6651 | } | 6657 | } |
| 6652 | 6658 | ||
| @@ -6668,10 +6674,10 @@ tty_read_avail_input (struct display *display, | |||
| 6668 | int n_to_read, i; | 6674 | int n_to_read, i; |
| 6669 | struct tty_display_info *tty = display->display_info.tty; | 6675 | struct tty_display_info *tty = display->display_info.tty; |
| 6670 | int nread = 0; | 6676 | int nread = 0; |
| 6671 | 6677 | ||
| 6672 | if (display->type != output_termcap) | 6678 | if (display->type != output_termcap) |
| 6673 | abort (); | 6679 | abort (); |
| 6674 | 6680 | ||
| 6675 | /* XXX I think the following code should be moved to separate hook | 6681 | /* XXX I think the following code should be moved to separate hook |
| 6676 | functions in system-dependent files. */ | 6682 | functions in system-dependent files. */ |
| 6677 | #ifdef WINDOWSNT | 6683 | #ifdef WINDOWSNT |
| @@ -6681,15 +6687,15 @@ tty_read_avail_input (struct display *display, | |||
| 6681 | n_to_read = dos_keysns (); | 6687 | n_to_read = dos_keysns (); |
| 6682 | if (n_to_read == 0) | 6688 | if (n_to_read == 0) |
| 6683 | return 0; | 6689 | return 0; |
| 6684 | 6690 | ||
| 6685 | cbuf[0] = dos_keyread (); | 6691 | cbuf[0] = dos_keyread (); |
| 6686 | nread = 1; | 6692 | nread = 1; |
| 6687 | 6693 | ||
| 6688 | #else /* not MSDOS */ | 6694 | #else /* not MSDOS */ |
| 6689 | 6695 | ||
| 6690 | if (! tty->term_initted) /* In case we get called during bootstrap. */ | 6696 | if (! tty->term_initted) /* In case we get called during bootstrap. */ |
| 6691 | return 0; | 6697 | return 0; |
| 6692 | 6698 | ||
| 6693 | /* Determine how many characters we should *try* to read. */ | 6699 | /* Determine how many characters we should *try* to read. */ |
| 6694 | #ifdef FIONREAD | 6700 | #ifdef FIONREAD |
| 6695 | /* Find out how much input is available. */ | 6701 | /* Find out how much input is available. */ |
| @@ -6713,7 +6719,7 @@ tty_read_avail_input (struct display *display, | |||
| 6713 | you lose; | 6719 | you lose; |
| 6714 | #endif | 6720 | #endif |
| 6715 | #endif | 6721 | #endif |
| 6716 | 6722 | ||
| 6717 | /* Now read; for one reason or another, this will not block. | 6723 | /* Now read; for one reason or another, this will not block. |
| 6718 | NREAD is set to the number of chars read. */ | 6724 | NREAD is set to the number of chars read. */ |
| 6719 | do | 6725 | do |
| @@ -6753,19 +6759,19 @@ tty_read_avail_input (struct display *display, | |||
| 6753 | 0 | 6759 | 0 |
| 6754 | #endif | 6760 | #endif |
| 6755 | ); | 6761 | ); |
| 6756 | 6762 | ||
| 6757 | #ifndef FIONREAD | 6763 | #ifndef FIONREAD |
| 6758 | #if defined (USG) || defined (DGUX) || defined (CYGWIN) | 6764 | #if defined (USG) || defined (DGUX) || defined (CYGWIN) |
| 6759 | fcntl (fileno (TTY_INPUT (tty)), F_SETFL, 0); | 6765 | fcntl (fileno (TTY_INPUT (tty)), F_SETFL, 0); |
| 6760 | #endif /* USG or DGUX or CYGWIN */ | 6766 | #endif /* USG or DGUX or CYGWIN */ |
| 6761 | #endif /* no FIONREAD */ | 6767 | #endif /* no FIONREAD */ |
| 6762 | 6768 | ||
| 6763 | if (nread <= 0) | 6769 | if (nread <= 0) |
| 6764 | return nread; | 6770 | return nread; |
| 6765 | 6771 | ||
| 6766 | #endif /* not MSDOS */ | 6772 | #endif /* not MSDOS */ |
| 6767 | #endif /* not WINDOWSNT */ | 6773 | #endif /* not WINDOWSNT */ |
| 6768 | 6774 | ||
| 6769 | for (i = 0; i < nread; i++) | 6775 | for (i = 0; i < nread; i++) |
| 6770 | { | 6776 | { |
| 6771 | buf[i].kind = ASCII_KEYSTROKE_EVENT; | 6777 | buf[i].kind = ASCII_KEYSTROKE_EVENT; |
| @@ -6774,7 +6780,7 @@ tty_read_avail_input (struct display *display, | |||
| 6774 | buf[i].modifiers = meta_modifier; | 6780 | buf[i].modifiers = meta_modifier; |
| 6775 | if (tty->meta_key != 2) | 6781 | if (tty->meta_key != 2) |
| 6776 | cbuf[i] &= ~0x80; | 6782 | cbuf[i] &= ~0x80; |
| 6777 | 6783 | ||
| 6778 | buf[i].code = cbuf[i]; | 6784 | buf[i].code = cbuf[i]; |
| 6779 | /* Set the frame corresponding to the active tty. Note that the | 6785 | /* Set the frame corresponding to the active tty. Note that the |
| 6780 | value of selected_frame is not reliable here, redisplay tends | 6786 | value of selected_frame is not reliable here, redisplay tends |
| @@ -6785,7 +6791,6 @@ tty_read_avail_input (struct display *display, | |||
| 6785 | 6791 | ||
| 6786 | return nread; | 6792 | return nread; |
| 6787 | } | 6793 | } |
| 6788 | |||
| 6789 | #endif /* not VMS */ | 6794 | #endif /* not VMS */ |
| 6790 | 6795 | ||
| 6791 | void | 6796 | void |
| @@ -8316,7 +8321,7 @@ access_keymap_keyremap (map, key, prompt, do_funcall) | |||
| 8316 | int do_funcall; | 8321 | int do_funcall; |
| 8317 | { | 8322 | { |
| 8318 | Lisp_Object next; | 8323 | Lisp_Object next; |
| 8319 | 8324 | ||
| 8320 | next = access_keymap (map, key, 1, 0, 1); | 8325 | next = access_keymap (map, key, 1, 0, 1); |
| 8321 | 8326 | ||
| 8322 | /* Handle symbol with autoload definition. */ | 8327 | /* Handle symbol with autoload definition. */ |
| @@ -8331,7 +8336,7 @@ access_keymap_keyremap (map, key, prompt, do_funcall) | |||
| 8331 | && (!NILP (Farrayp (XSYMBOL (next)->function)) | 8336 | && (!NILP (Farrayp (XSYMBOL (next)->function)) |
| 8332 | || KEYMAPP (XSYMBOL (next)->function))) | 8337 | || KEYMAPP (XSYMBOL (next)->function))) |
| 8333 | next = XSYMBOL (next)->function; | 8338 | next = XSYMBOL (next)->function; |
| 8334 | 8339 | ||
| 8335 | /* If the keymap gives a function, not an | 8340 | /* If the keymap gives a function, not an |
| 8336 | array, then call the function with one arg and use | 8341 | array, then call the function with one arg and use |
| 8337 | its value instead. */ | 8342 | its value instead. */ |
| @@ -9345,7 +9350,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9345 | /* Adjust the function-key-map counters. */ | 9350 | /* Adjust the function-key-map counters. */ |
| 9346 | fkey.end += diff; | 9351 | fkey.end += diff; |
| 9347 | fkey.start += diff; | 9352 | fkey.start += diff; |
| 9348 | 9353 | ||
| 9349 | goto replay_sequence; | 9354 | goto replay_sequence; |
| 9350 | } | 9355 | } |
| 9351 | } | 9356 | } |
| @@ -10146,7 +10151,7 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10146 | 10151 | ||
| 10147 | if (tty_list && tty_list->next) | 10152 | if (tty_list && tty_list->next) |
| 10148 | error ("Suspend is not supported with multiple ttys"); | 10153 | error ("Suspend is not supported with multiple ttys"); |
| 10149 | 10154 | ||
| 10150 | if (!NILP (stuffstring)) | 10155 | if (!NILP (stuffstring)) |
| 10151 | CHECK_STRING (stuffstring); | 10156 | CHECK_STRING (stuffstring); |
| 10152 | 10157 | ||
| @@ -10280,7 +10285,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 10280 | else | 10285 | else |
| 10281 | { | 10286 | { |
| 10282 | /* Otherwise, the SIGINT was probably generated by C-g. */ | 10287 | /* Otherwise, the SIGINT was probably generated by C-g. */ |
| 10283 | 10288 | ||
| 10284 | /* Set internal_last_event_frame to the top frame of the | 10289 | /* Set internal_last_event_frame to the top frame of the |
| 10285 | controlling tty, if we have a frame there. We disable the | 10290 | controlling tty, if we have a frame there. We disable the |
| 10286 | interrupt key on secondary ttys, so the SIGINT must have come | 10291 | interrupt key on secondary ttys, so the SIGINT must have come |
| @@ -10294,7 +10299,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 10294 | } | 10299 | } |
| 10295 | 10300 | ||
| 10296 | /* This routine is called at interrupt level in response to C-g. | 10301 | /* This routine is called at interrupt level in response to C-g. |
| 10297 | 10302 | ||
| 10298 | It is called from the SIGINT handler or kbd_buffer_store_event. | 10303 | It is called from the SIGINT handler or kbd_buffer_store_event. |
| 10299 | 10304 | ||
| 10300 | If `waiting_for_input' is non zero, then unless `echoing' is | 10305 | If `waiting_for_input' is non zero, then unless `echoing' is |
| @@ -10307,7 +10312,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ | |||
| 10307 | static void | 10312 | static void |
| 10308 | handle_interrupt () | 10313 | handle_interrupt () |
| 10309 | { | 10314 | { |
| 10310 | char c; | 10315 | char c; |
| 10311 | struct frame *sf = SELECTED_FRAME (); | 10316 | struct frame *sf = SELECTED_FRAME (); |
| 10312 | 10317 | ||
| 10313 | cancel_echoing (); | 10318 | cancel_echoing (); |
| @@ -10480,7 +10485,7 @@ See also `current-input-mode'. */) | |||
| 10480 | Currently it compiles fine, but its semantics are wrong. It sets | 10485 | Currently it compiles fine, but its semantics are wrong. It sets |
| 10481 | global parameters (e.g. interrupt_input) based on only the | 10486 | global parameters (e.g. interrupt_input) based on only the |
| 10482 | current frame's device. */ | 10487 | current frame's device. */ |
| 10483 | 10488 | ||
| 10484 | if (!NILP (quit) | 10489 | if (!NILP (quit) |
| 10485 | && (!INTEGERP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)) | 10490 | && (!INTEGERP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)) |
| 10486 | error ("set-input-mode: QUIT must be an ASCII character"); | 10491 | error ("set-input-mode: QUIT must be an ASCII character"); |
| @@ -10528,7 +10533,7 @@ See also `current-input-mode'. */) | |||
| 10528 | else | 10533 | else |
| 10529 | tty->meta_key = 2; | 10534 | tty->meta_key = 2; |
| 10530 | } | 10535 | } |
| 10531 | 10536 | ||
| 10532 | if (!NILP (quit)) | 10537 | if (!NILP (quit)) |
| 10533 | /* Don't let this value be out of range. */ | 10538 | /* Don't let this value be out of range. */ |
| 10534 | quit_char = XINT (quit) & (NILP (meta) ? 0177 : 0377); | 10539 | quit_char = XINT (quit) & (NILP (meta) ? 0177 : 0377); |
| @@ -10562,7 +10567,7 @@ The elements of this list correspond to the arguments of | |||
| 10562 | { | 10567 | { |
| 10563 | Lisp_Object val[4]; | 10568 | Lisp_Object val[4]; |
| 10564 | struct frame *sf = XFRAME (selected_frame); | 10569 | struct frame *sf = XFRAME (selected_frame); |
| 10565 | 10570 | ||
| 10566 | val[0] = interrupt_input ? Qt : Qnil; | 10571 | val[0] = interrupt_input ? Qt : Qnil; |
| 10567 | if (FRAME_TERMCAP_P (sf)) | 10572 | if (FRAME_TERMCAP_P (sf)) |
| 10568 | { | 10573 | { |
| @@ -10671,13 +10676,6 @@ init_keyboard () | |||
| 10671 | do_mouse_tracking = Qnil; | 10676 | do_mouse_tracking = Qnil; |
| 10672 | #endif | 10677 | #endif |
| 10673 | input_pending = 0; | 10678 | 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 | ||
| 10681 | 10679 | ||
| 10682 | /* This means that command_loop_1 won't try to select anything the first | 10680 | /* This means that command_loop_1 won't try to select anything the first |
| 10683 | time through. */ | 10681 | time through. */ |
| @@ -11423,7 +11421,7 @@ keys_of_keyboard () | |||
| 11423 | /* Handling it at such a low-level causes read_key_sequence to get | 11421 | /* Handling it at such a low-level causes read_key_sequence to get |
| 11424 | * confused because it doesn't realize that the current_buffer was | 11422 | * confused because it doesn't realize that the current_buffer was |
| 11425 | * changed by read_char. | 11423 | * changed by read_char. |
| 11426 | * | 11424 | * |
| 11427 | * initial_define_lispy_key (Vspecial_event_map, "select-window", | 11425 | * initial_define_lispy_key (Vspecial_event_map, "select-window", |
| 11428 | * "handle-select-window"); */ | 11426 | * "handle-select-window"); */ |
| 11429 | initial_define_lispy_key (Vspecial_event_map, "save-session", | 11427 | initial_define_lispy_key (Vspecial_event_map, "save-session", |
diff --git a/src/lisp.h b/src/lisp.h index a0bc2af24bb..8affbc76126 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -178,18 +178,13 @@ union Lisp_Object | |||
| 178 | struct | 178 | struct |
| 179 | { | 179 | { |
| 180 | EMACS_INT val : VALBITS; | 180 | EMACS_INT val : VALBITS; |
| 181 | EMACS_UINT type : GCTYPEBITS; | 181 | enum Lisp_Type type : GCTYPEBITS; |
| 182 | } s; | 182 | } s; |
| 183 | struct | 183 | struct |
| 184 | { | 184 | { |
| 185 | EMACS_UINT val : VALBITS; | 185 | EMACS_UINT val : VALBITS; |
| 186 | EMACS_UINT type : GCTYPEBITS; | 186 | enum Lisp_Type type : GCTYPEBITS; |
| 187 | } u; | 187 | } u; |
| 188 | struct | ||
| 189 | { | ||
| 190 | EMACS_UINT val : VALBITS; | ||
| 191 | enum Lisp_Type type : GCTYPEBITS; | ||
| 192 | } gu; | ||
| 193 | } | 188 | } |
| 194 | Lisp_Object; | 189 | Lisp_Object; |
| 195 | 190 | ||
| @@ -204,19 +199,14 @@ union Lisp_Object | |||
| 204 | 199 | ||
| 205 | struct | 200 | struct |
| 206 | { | 201 | { |
| 207 | EMACS_UINT type : GCTYPEBITS; | 202 | enum Lisp_Type type : GCTYPEBITS; |
| 208 | EMACS_INT val : VALBITS; | 203 | EMACS_INT val : VALBITS; |
| 209 | } s; | 204 | } s; |
| 210 | struct | 205 | struct |
| 211 | { | 206 | { |
| 212 | EMACS_UINT type : GCTYPEBITS; | 207 | enum Lisp_Type type : GCTYPEBITS; |
| 213 | EMACS_UINT val : VALBITS; | 208 | EMACS_UINT val : VALBITS; |
| 214 | } u; | 209 | } u; |
| 215 | struct | ||
| 216 | { | ||
| 217 | enum Lisp_Type type : GCTYPEBITS; | ||
| 218 | EMACS_UINT val : VALBITS; | ||
| 219 | } gu; | ||
| 220 | } | 210 | } |
| 221 | Lisp_Object; | 211 | Lisp_Object; |
| 222 | 212 | ||