diff options
| author | Karoly Lorentey | 2004-01-11 23:12:24 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-01-11 23:12:24 +0000 |
| commit | 309990406b2d16da6ad4131c6530d309e44945ec (patch) | |
| tree | 6ab819286b6741c21a4c09bce238dd487c74c0cb | |
| parent | 2246281fb0e2ab610d14efa7166a9ceb02597643 (diff) | |
| parent | 21dcb70922cb684722b7ea12f4e7af1224a534e0 (diff) | |
| download | emacs-309990406b2d16da6ad4131c6530d309e44945ec.tar.gz emacs-309990406b2d16da6ad4131c6530d309e44945ec.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-31
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-55
| -rw-r--r-- | lisp/ChangeLog | 46 | ||||
| -rw-r--r-- | lisp/calendar/appt.el | 415 | ||||
| -rw-r--r-- | lisp/calendar/cal-x.el | 12 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 47 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 65 | ||||
| -rw-r--r-- | lisp/textmodes/texnfo-upd.el | 11 | ||||
| -rw-r--r-- | man/ChangeLog | 4 | ||||
| -rw-r--r-- | man/calendar.texi | 63 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/alloc.c | 4 |
10 files changed, 384 insertions, 288 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d7f5d9c652..7029193eec9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,49 @@ | |||
| 1 | 2004-01-11 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 2 | |||
| 3 | * calendar/appt.el: Update copyright and commentary. | ||
| 4 | (appt-issue-message): Delete (see appt-activate). | ||
| 5 | (appt-visible, appt-msg-window): Make obsolete, in favour of | ||
| 6 | appt-display-format. | ||
| 7 | (appt-display-mode-line, appt-display-duration) | ||
| 8 | (appt-display-diary, appt-time-msg-list, appt-mode-string) | ||
| 9 | (appt-prev-comp-time, appt-display-count, appt-timer) | ||
| 10 | (appt-convert-time): Doc change. | ||
| 11 | (appt-disp-window-function, appt-delete-window-function): Use | ||
| 12 | defcustom rather than defvar. | ||
| 13 | (appt-display-format): New variable. | ||
| 14 | (appt-display-message): New function with display code from | ||
| 15 | appt-check. | ||
| 16 | (appt-check): Add optional FORCE argument. Doc change. Add | ||
| 17 | appt-make-list to diary-hook if displaying diary. Remove | ||
| 18 | checking of view-diary-entries-initially. Message | ||
| 19 | display section removed to new function appt-display-message. | ||
| 20 | (appt-display-window): Doc change. Remove unused internal var | ||
| 21 | this-buffer. Do not beep, since appt-display-message does that. | ||
| 22 | (appt-make-list): Doc change. Use caar. | ||
| 23 | (appt-sort-list): Simplify by using builtin sort function. | ||
| 24 | (appt-update-list): New function for updating appts when diary is | ||
| 25 | saved. | ||
| 26 | (appt-activate): New autoloaded function to toggle package | ||
| 27 | functionality. | ||
| 28 | |||
| 29 | * calendar/cal-x.el: (calendar-one-frame-setup) | ||
| 30 | (calendar-only-one-frame-setup, calendar-two-frame-setup): Doc | ||
| 31 | change. | ||
| 32 | |||
| 33 | * calendar/calendar.el: Update copyright. | ||
| 34 | (view-diary-entries-initially, european-calendar-style): Doc | ||
| 35 | change. | ||
| 36 | (calendar-setup): Make defcustom rather than defvar. | ||
| 37 | (mark-visible-calendar-date): Initialize temp-face and faceinfo | ||
| 38 | in let binding so local to function. | ||
| 39 | |||
| 40 | * calendar/diary-lib.el: Update copyright. | ||
| 41 | (diary, diary-entry-time): Doc change. | ||
| 42 | (list-diary-entries): Doc change. Trivial logic change. | ||
| 43 | (fancy-diary-display): Restore make-face command mistakenly | ||
| 44 | deleted 2003-05-08. | ||
| 45 | (show-all-diary-entries): Allow to pop-up frame if needed. | ||
| 46 | |||
| 1 | 2004-01-09 John Paul Wallington <jpw@gnu.org> | 47 | 2004-01-09 John Paul Wallington <jpw@gnu.org> |
| 2 | 48 | ||
| 3 | * bindings.el (mode-line-change-eol): Add EVENT parameter. | 49 | * bindings.el (mode-line-change-eol): Add EVENT parameter. |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 8c1562385c9..825bd936475 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; appt.el --- appointment notification functions | 1 | ;;; appt.el --- appointment notification functions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1990, 1994, 1998 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 1990, 1994, 1998, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Neil Mager <neilm@juliet.ll.mit.edu> | 5 | ;; Author: Neil Mager <neilm@juliet.ll.mit.edu> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | ;; | 28 | ;; |
| 29 | ;; appt.el - visible and/or audible notification of | 29 | ;; appt.el - visible and/or audible notification of |
| 30 | ;; appointments from ~/diary file. | 30 | ;; appointments from diary file. |
| 31 | ;; | 31 | ;; |
| 32 | ;;; | 32 | ;;; |
| 33 | ;;; Thanks to Edward M. Reingold for much help and many suggestions, | 33 | ;;; Thanks to Edward M. Reingold for much help and many suggestions, |
| @@ -35,62 +35,41 @@ | |||
| 35 | ;;; | 35 | ;;; |
| 36 | ;;; | 36 | ;;; |
| 37 | ;;; This functions in this file will alert the user of a | 37 | ;;; This functions in this file will alert the user of a |
| 38 | ;;; pending appointment based on their diary file. | 38 | ;;; pending appointment based on his/her diary file. This package |
| 39 | ;;; is documented in the Emacs manual. | ||
| 39 | ;;; | 40 | ;;; |
| 40 | ;;; A message will be displayed in the mode line of the Emacs buffer | 41 | ;;; To activate this package, simply use (appt-activate 1). |
| 41 | ;;; and (if you request) the terminal will beep and display a message | 42 | ;;; A `diary-file' with appointments of the format described in the |
| 42 | ;;; from the diary in the mini-buffer, or you can choose to | 43 | ;;; documentation of the function `appt-check' is required. |
| 43 | ;;; have a message displayed in a new buffer. | 44 | ;;; Relevant customizable variables are also listed in the |
| 45 | ;;; documentation of that function. | ||
| 46 | ;;; | ||
| 47 | ;;; Today's appointment list is initialized from the diary when this | ||
| 48 | ;;; package is activated. Additionally, the appointments list is | ||
| 49 | ;;; recreated automatically at 12:01am for those who do not logout | ||
| 50 | ;;; every day or are programming late. It is also updated when the | ||
| 51 | ;;; `diary-file' is saved. Calling `appt-check' with an argument forces | ||
| 52 | ;;; a re-initialization at any time. | ||
| 44 | ;;; | 53 | ;;; |
| 45 | ;;; The variable `appt-message-warning-time' allows the | 54 | ;;; In order to add or delete items from today's list, without |
| 46 | ;;; user to specify how much notice they want before the appointment. The | 55 | ;;; changing the diary file, use `appt-add' and `appt-delete'. |
| 47 | ;;; variable `appt-issue-message' specifies whether the user wants | ||
| 48 | ;;; to be notified of a pending appointment. | ||
| 49 | ;;; | ||
| 50 | ;;; In order to use the appt package, you only need | ||
| 51 | ;;; to load it---provided you have appointments. | ||
| 52 | ;;; | ||
| 53 | ;;; Before that, you can also set some options if you want | ||
| 54 | ;;; (setq view-diary-entries-initially t) | ||
| 55 | ;;; (setq appt-issue-message t) | ||
| 56 | ;;; | ||
| 57 | ;;; This is an example of what can be in your diary file: | ||
| 58 | ;;; Monday | ||
| 59 | ;;; 9:30am Coffee break | ||
| 60 | ;;; 12:00pm Lunch | ||
| 61 | ;;; | ||
| 62 | ;;; Based upon the above lines in your .emacs and diary files, | ||
| 63 | ;;; the calendar and diary will be displayed when you enter | ||
| 64 | ;;; Emacs and your appointments list will automatically be created. | ||
| 65 | ;;; You will then be reminded at 9:20am about your coffee break | ||
| 66 | ;;; and at 11:50am to go to lunch. | ||
| 67 | ;;; | ||
| 68 | ;;; Use describe-function on appt-check for a description of other variables | ||
| 69 | ;;; that can be used to personalize the notification system. | ||
| 70 | ;;; | ||
| 71 | ;;; In order to add or delete items from todays list, use appt-add | ||
| 72 | ;;; and appt-delete. | ||
| 73 | ;;; | ||
| 74 | ;;; Additionally, the appointments list is recreated automatically | ||
| 75 | ;;; at 12:01am for those who do not logout every day or are programming | ||
| 76 | ;;; late. | ||
| 77 | ;;; | 56 | ;;; |
| 57 | |||
| 78 | ;;; Brief internal description - Skip this if you are not interested! | 58 | ;;; Brief internal description - Skip this if you are not interested! |
| 79 | ;;; | 59 | ;;; |
| 80 | ;;; The function appt-make-list creates the appointments list which appt-check | 60 | ;;; The function `appt-make-list' creates the appointments list which |
| 81 | ;;; reads. This is all done automatically. | 61 | ;;; `appt-check' reads. |
| 82 | ;;; It is invoked from the function list-diary-entries. | ||
| 83 | ;;; | 62 | ;;; |
| 84 | ;;; You can change the way the appointment window is created/deleted by | 63 | ;;; You can change the way the appointment window is created/deleted by |
| 85 | ;;; setting the variables | 64 | ;;; setting the variables |
| 86 | ;;; | 65 | ;;; |
| 87 | ;;; appt-disp-window-function | 66 | ;;; appt-disp-window-function |
| 88 | ;;; and | 67 | ;;; and |
| 89 | ;;; appt-delete-window-function | 68 | ;;; appt-delete-window-function |
| 90 | ;;; | 69 | ;;; |
| 91 | ;;; For instance, these variables can be set to functions that display | 70 | ;;; For instance, these variables could be set to functions that display |
| 92 | ;;; appointments in pop-up frames, which are lowered or iconified after | 71 | ;;; appointments in pop-up frames, which are lowered or iconified after |
| 93 | ;;; appt-display-interval minutes. | 72 | ;;; `appt-display-interval' minutes. |
| 94 | ;;; | 73 | ;;; |
| 95 | 74 | ||
| 96 | ;;; Code: | 75 | ;;; Code: |
| @@ -98,15 +77,6 @@ | |||
| 98 | ;; Make sure calendar is loaded when we compile this. | 77 | ;; Make sure calendar is loaded when we compile this. |
| 99 | (require 'calendar) | 78 | (require 'calendar) |
| 100 | 79 | ||
| 101 | (provide 'appt) | ||
| 102 | |||
| 103 | ;;;###autoload | ||
| 104 | (defcustom appt-issue-message t | ||
| 105 | "*Non-nil means check for appointments in the diary buffer. | ||
| 106 | To be detected, the diary entry must have the time | ||
| 107 | as the first thing on a line." | ||
| 108 | :type 'boolean | ||
| 109 | :group 'appt) | ||
| 110 | 80 | ||
| 111 | ;;;###autoload | 81 | ;;;###autoload |
| 112 | (defcustom appt-message-warning-time 12 | 82 | (defcustom appt-message-warning-time 12 |
| @@ -122,80 +92,149 @@ as the first thing on a line." | |||
| 122 | 92 | ||
| 123 | ;;;###autoload | 93 | ;;;###autoload |
| 124 | (defcustom appt-visible t | 94 | (defcustom appt-visible t |
| 125 | "*Non-nil means display appointment message in echo area." | 95 | "*Non-nil means display appointment message in echo area. |
| 96 | This variable is only relevant if `appt-msg-window' is nil." | ||
| 126 | :type 'boolean | 97 | :type 'boolean |
| 127 | :group 'appt) | 98 | :group 'appt) |
| 128 | 99 | ||
| 100 | (make-obsolete-variable 'appt-visible 'appt-display-format "21.4") | ||
| 101 | |||
| 129 | ;;;###autoload | 102 | ;;;###autoload |
| 130 | (defcustom appt-display-mode-line t | 103 | (defcustom appt-msg-window t |
| 131 | "*Non-nil means display minutes to appointment and time on the mode line." | 104 | "*Non-nil means display appointment message in another window. |
| 105 | If non-nil, this variable overrides `appt-visible'." | ||
| 132 | :type 'boolean | 106 | :type 'boolean |
| 133 | :group 'appt) | 107 | :group 'appt) |
| 134 | 108 | ||
| 109 | (make-obsolete-variable 'appt-msg-window 'appt-display-format "21.4") | ||
| 110 | |||
| 111 | ;; TODO - add popup. | ||
| 112 | (defcustom appt-display-format (cond (appt-msg-window 'window) | ||
| 113 | (appt-visible 'echo) | ||
| 114 | (t nil)) | ||
| 115 | "How appointment reminders should be displayed. | ||
| 116 | The options are: | ||
| 117 | window - use a separate window | ||
| 118 | echo - use the echo area | ||
| 119 | nil - no visible reminder. | ||
| 120 | See also `appt-audible' and `appt-display-mode-line'." | ||
| 121 | :type '(choice | ||
| 122 | (const :tag "Separate window" window) | ||
| 123 | (const :tag "Echo-area" echo) | ||
| 124 | (const :tag "No visible display" nil)) | ||
| 125 | :group 'appt | ||
| 126 | :version "21.4") | ||
| 127 | |||
| 135 | ;;;###autoload | 128 | ;;;###autoload |
| 136 | (defcustom appt-msg-window t | 129 | (defcustom appt-display-mode-line t |
| 137 | "*Non-nil means display appointment message in another window." | 130 | "*Non-nil means display minutes to appointment and time on the mode line. |
| 131 | This is in addition to any other display of appointment messages." | ||
| 138 | :type 'boolean | 132 | :type 'boolean |
| 139 | :group 'appt) | 133 | :group 'appt) |
| 140 | 134 | ||
| 141 | ;;;###autoload | 135 | ;;;###autoload |
| 142 | (defcustom appt-display-duration 10 | 136 | (defcustom appt-display-duration 10 |
| 143 | "*The number of seconds an appointment message is displayed." | 137 | "*The number of seconds an appointment message is displayed. |
| 138 | Only relevant if reminders are to be displayed in their own window." | ||
| 144 | :type 'integer | 139 | :type 'integer |
| 145 | :group 'appt) | 140 | :group 'appt) |
| 146 | 141 | ||
| 147 | ;;;###autoload | 142 | ;;;###autoload |
| 148 | (defcustom appt-display-diary t | 143 | (defcustom appt-display-diary t |
| 149 | "*Non-nil means to display the next days diary on the screen. | 144 | "*Non-nil displays the diary when the appointment list is first initialized. |
| 150 | This will occur at midnight when the appointment list is updated." | 145 | This will occur at midnight when the appointment list is updated." |
| 151 | :type 'boolean | 146 | :type 'boolean |
| 152 | :group 'appt) | 147 | :group 'appt) |
| 153 | 148 | ||
| 154 | (defvar appt-time-msg-list nil | ||
| 155 | "The list of appointments for today. | ||
| 156 | Use `appt-add' and `appt-delete' to add and delete appointments from list. | ||
| 157 | The original list is generated from the today's `diary-entries-list'. | ||
| 158 | The number before each time/message is the time in minutes from midnight.") | ||
| 159 | |||
| 160 | (defconst appt-max-time 1439 | ||
| 161 | "11:59pm in minutes - number of minutes in a day minus 1.") | ||
| 162 | |||
| 163 | (defcustom appt-display-interval 3 | 149 | (defcustom appt-display-interval 3 |
| 164 | "*Number of minutes to wait between checking the appointment list." | 150 | "*Number of minutes to wait between checking the appointment list." |
| 165 | :type 'integer | 151 | :type 'integer |
| 166 | :group 'appt) | 152 | :group 'appt) |
| 167 | 153 | ||
| 154 | (defcustom appt-disp-window-function 'appt-disp-window | ||
| 155 | "Function called to display appointment window. | ||
| 156 | Only relevant if reminders are being displayed in a window." | ||
| 157 | :type '(choice (const appt-disp-window) | ||
| 158 | function) | ||
| 159 | :group 'appt) | ||
| 160 | |||
| 161 | (defcustom appt-delete-window-function 'appt-delete-window | ||
| 162 | "Function called to remove appointment window and buffer. | ||
| 163 | Only relevant if reminders are being displayed in a window." | ||
| 164 | :type '(choice (const appt-delete-window) | ||
| 165 | function) | ||
| 166 | :group 'appt) | ||
| 167 | |||
| 168 | |||
| 169 | ;;; Internal variables below this point. | ||
| 170 | |||
| 168 | (defvar appt-buffer-name " *appt-buf*" | 171 | (defvar appt-buffer-name " *appt-buf*" |
| 169 | "Name of the appointments buffer.") | 172 | "Name of the appointments buffer.") |
| 170 | 173 | ||
| 171 | (defvar appt-disp-window-function 'appt-disp-window | 174 | (defvar appt-time-msg-list nil |
| 172 | "Function called to display appointment window.") | 175 | "The list of appointments for today. |
| 176 | Use `appt-add' and `appt-delete' to add and delete appointments. | ||
| 177 | The original list is generated from today's `diary-entries-list', and | ||
| 178 | can be regenerated using the function `appt-check'. | ||
| 179 | Each element of the generated list has the form (MINUTES) STRING; where | ||
| 180 | MINUTES is the time in minutes of the appointment after midnight, and | ||
| 181 | STRING is the description of the appointment.") | ||
| 173 | 182 | ||
| 174 | (defvar appt-delete-window-function 'appt-delete-window | 183 | (defconst appt-max-time 1439 |
| 175 | "Function called to remove appointment window and buffer.") | 184 | "11:59pm in minutes - number of minutes in a day minus 1.") |
| 176 | 185 | ||
| 177 | (defvar appt-mode-string nil | 186 | (defvar appt-mode-string nil |
| 178 | "String being displayed in the mode line saying you have an appointment. | 187 | "String being displayed in the mode line saying you have an appointment. |
| 179 | The actual string includes the amount of time till the appointment.") | 188 | The actual string includes the amount of time till the appointment. |
| 189 | Only used if `appt-display-mode-line' is non-nil.") | ||
| 180 | 190 | ||
| 181 | (defvar appt-prev-comp-time nil | 191 | (defvar appt-prev-comp-time nil |
| 182 | "Time of day (mins since midnight) at which we last checked appointments.") | 192 | "Time of day (mins since midnight) at which we last checked appointments. |
| 193 | A nil value forces the diary file to be (re-)checked for appointments.") | ||
| 183 | 194 | ||
| 184 | (defvar appt-now-displayed nil | 195 | (defvar appt-now-displayed nil |
| 185 | "Non-nil when we have started notifying about a appointment that is near.") | 196 | "Non-nil when we have started notifying about a appointment that is near.") |
| 186 | 197 | ||
| 187 | (defvar appt-display-count nil) | 198 | (defvar appt-display-count nil |
| 199 | "Internal variable used to count number of consecutive reminders.") | ||
| 188 | 200 | ||
| 189 | (defun appt-check () | 201 | (defvar appt-timer nil |
| 190 | "Check for an appointment and update the mode line. | 202 | "Timer used for diary appointment notifications (`appt-check'). |
| 191 | Note: the time must be the first thing in the line in the diary | 203 | If this is non-nil, appointment checking is active.") |
| 192 | for a warning to be issued. | 204 | |
| 205 | |||
| 206 | ;;; Functions. | ||
| 207 | |||
| 208 | (defun appt-display-message (string mins) | ||
| 209 | "Display a reminder about an appointment. | ||
| 210 | The string STRING describes the appointment, due in integer MINS minutes. | ||
| 211 | The format of the visible reminder is controlled by `appt-display-format'. | ||
| 212 | The variable `appt-audible' controls the audible reminder." | ||
| 213 | (cond ((eq appt-display-format 'window) | ||
| 214 | (funcall appt-disp-window-function | ||
| 215 | (number-to-string mins) | ||
| 216 | (format-time-string "%a %b %e " (current-time)) | ||
| 217 | string) | ||
| 218 | (run-at-time (format "%d sec" appt-display-duration) | ||
| 219 | nil | ||
| 220 | appt-delete-window-function)) | ||
| 221 | ((eq appt-display-format 'echo) | ||
| 222 | (message "%s" string))) | ||
| 223 | (if appt-audible (beep 1))) | ||
| 224 | |||
| 225 | |||
| 226 | (defun appt-check (&optional force) | ||
| 227 | "Check for an appointment and update any reminder display. | ||
| 228 | If optional argument FORCE is non-nil, reparse the diary file for | ||
| 229 | appointments. Otherwise the diary file is only parsed once per day, | ||
| 230 | and when saved. | ||
| 193 | 231 | ||
| 194 | The format of the time can be either 24 hour or am/pm. | 232 | Note: the time must be the first thing in the line in the diary |
| 195 | Example: | 233 | for a warning to be issued. The format of the time can be either |
| 234 | 24 hour or am/pm. For example: | ||
| 196 | 235 | ||
| 197 | 02/23/89 | 236 | 02/23/89 |
| 198 | 18:00 Dinner | 237 | 18:00 Dinner |
| 199 | 238 | ||
| 200 | Thursday | 239 | Thursday |
| 201 | 11:45am Lunch meeting. | 240 | 11:45am Lunch meeting. |
| @@ -203,42 +242,41 @@ Example: | |||
| 203 | Appointments are checked every `appt-display-interval' minutes. | 242 | Appointments are checked every `appt-display-interval' minutes. |
| 204 | The following variables control appointment notification: | 243 | The following variables control appointment notification: |
| 205 | 244 | ||
| 206 | `appt-issue-message' | 245 | `appt-display-format' |
| 207 | If t, the diary buffer is checked for appointments. | 246 | Controls the format in which reminders are displayed. |
| 208 | |||
| 209 | `appt-message-warning-time' | ||
| 210 | Variable used to determine if appointment message | ||
| 211 | should be displayed. | ||
| 212 | 247 | ||
| 213 | `appt-audible' | 248 | `appt-audible' |
| 214 | Variable used to determine if appointment is audible. | 249 | Variable used to determine if reminder is audible. |
| 215 | Default is t. | 250 | Default is t. |
| 216 | 251 | ||
| 217 | `appt-visible' | 252 | `appt-message-warning-time' |
| 218 | Variable used to determine if appointment message should be | 253 | Variable used to determine when appointment message |
| 219 | displayed in the mini-buffer. Default is t. | 254 | should first be displayed. |
| 255 | |||
| 256 | `appt-display-mode-line' | ||
| 257 | If non-nil, a generic message giving the time remaining | ||
| 258 | is shown in the mode-line when an appointment is due. | ||
| 259 | |||
| 260 | `appt-display-interval' | ||
| 261 | Interval in minutes at which to check for pending appointments. | ||
| 220 | 262 | ||
| 221 | `appt-msg-window' | 263 | `appt-display-diary' |
| 222 | Variable used to determine if appointment message | 264 | Display the diary buffer when the appointment list is |
| 223 | should temporarily appear in another window. Mutually exclusive | 265 | initialized for the first time in a day. |
| 224 | to `appt-visible'. | 266 | |
| 267 | The following variables are only relevant if reminders are being | ||
| 268 | displayed in a window: | ||
| 225 | 269 | ||
| 226 | `appt-display-duration' | 270 | `appt-display-duration' |
| 227 | The number of seconds an appointment message | 271 | The number of seconds an appointment message is displayed. |
| 228 | is displayed in another window. | ||
| 229 | 272 | ||
| 230 | `appt-disp-window-function' | 273 | `appt-disp-window-function' |
| 231 | Function called to display appointment window. You can customize | 274 | Function called to display appointment window. |
| 232 | appt.el by setting this variable to a function different from the | ||
| 233 | one provided with this package. | ||
| 234 | 275 | ||
| 235 | `appt-delete-window-function' | 276 | `appt-delete-window-function' |
| 236 | Function called to remove appointment window and buffer. You can | 277 | Function called to remove appointment window and buffer." |
| 237 | customize appt.el by setting this variable to a function different | ||
| 238 | from the one provided with this package." | ||
| 239 | 278 | ||
| 240 | (let* ((min-to-app -1) | 279 | (let* ((min-to-app -1) |
| 241 | (new-time "") | ||
| 242 | (prev-appt-mode-string appt-mode-string) | 280 | (prev-appt-mode-string appt-mode-string) |
| 243 | (prev-appt-display-count (or appt-display-count 0)) | 281 | (prev-appt-display-count (or appt-display-count 0)) |
| 244 | ;; Non-nil means do a full check for pending appointments | 282 | ;; Non-nil means do a full check for pending appointments |
| @@ -248,7 +286,7 @@ The following variables control appointment notification: | |||
| 248 | (full-check | 286 | (full-check |
| 249 | (or (not appt-now-displayed) | 287 | (or (not appt-now-displayed) |
| 250 | ;; This is true every appt-display-interval minutes. | 288 | ;; This is true every appt-display-interval minutes. |
| 251 | (= 0 (mod prev-appt-display-count appt-display-interval)))) | 289 | (zerop (mod prev-appt-display-count appt-display-interval)))) |
| 252 | ;; Non-nil means only update the interval displayed in the mode line. | 290 | ;; Non-nil means only update the interval displayed in the mode line. |
| 253 | (mode-line-only | 291 | (mode-line-only |
| 254 | (and (not full-check) appt-now-displayed))) | 292 | (and (not full-check) appt-now-displayed))) |
| @@ -267,26 +305,31 @@ The following variables control appointment notification: | |||
| 267 | ;; At the first check in any given day, update our | 305 | ;; At the first check in any given day, update our |
| 268 | ;; appointments to today's list. | 306 | ;; appointments to today's list. |
| 269 | 307 | ||
| 270 | (if (or (null appt-prev-comp-time) | 308 | (if (or force |
| 271 | (< cur-comp-time appt-prev-comp-time)) | 309 | (null appt-prev-comp-time) ; first check |
| 310 | (< cur-comp-time appt-prev-comp-time)) ; new day | ||
| 272 | (condition-case nil | 311 | (condition-case nil |
| 273 | (progn | 312 | (progn |
| 274 | (if (and view-diary-entries-initially appt-display-diary) | 313 | (if appt-display-diary |
| 275 | (diary) | 314 | (let ((diary-hook |
| 315 | (if (assoc 'appt-make-list diary-hook) | ||
| 316 | diary-hook | ||
| 317 | (cons 'appt-make-list diary-hook)))) | ||
| 318 | (diary)) | ||
| 276 | (let ((diary-display-hook 'appt-make-list)) | 319 | (let ((diary-display-hook 'appt-make-list)) |
| 277 | (diary)))) | 320 | (diary)))) |
| 278 | (error nil))) | 321 | (error nil))) |
| 279 | (setq appt-prev-comp-time cur-comp-time) | ||
| 280 | 322 | ||
| 281 | (setq appt-mode-string nil) | 323 | (setq appt-prev-comp-time cur-comp-time |
| 282 | (setq appt-display-count nil) | 324 | appt-mode-string nil |
| 325 | appt-display-count nil) | ||
| 283 | 326 | ||
| 284 | ;; If there are entries in the list, and the | 327 | ;; If there are entries in the list, and the |
| 285 | ;; user wants a message issued, | 328 | ;; user wants a message issued, |
| 286 | ;; get the first time off of the list | 329 | ;; get the first time off of the list |
| 287 | ;; and calculate the number of minutes until the appointment. | 330 | ;; and calculate the number of minutes until the appointment. |
| 288 | 331 | ||
| 289 | (if (and appt-issue-message appt-time-msg-list) | 332 | (if appt-time-msg-list |
| 290 | (let ((appt-comp-time (car (car (car appt-time-msg-list))))) | 333 | (let ((appt-comp-time (car (car (car appt-time-msg-list))))) |
| 291 | (setq min-to-app (- appt-comp-time cur-comp-time)) | 334 | (setq min-to-app (- appt-comp-time cur-comp-time)) |
| 292 | 335 | ||
| @@ -317,45 +360,21 @@ The following variables control appointment notification: | |||
| 317 | 360 | ||
| 318 | (when (and (<= min-to-app appt-message-warning-time) | 361 | (when (and (<= min-to-app appt-message-warning-time) |
| 319 | (>= min-to-app 0)) | 362 | (>= min-to-app 0)) |
| 320 | (setq appt-now-displayed t) | 363 | (setq appt-now-displayed t |
| 321 | (setq appt-display-count | 364 | appt-display-count (1+ prev-appt-display-count)) |
| 322 | (1+ prev-appt-display-count)) | ||
| 323 | (unless mode-line-only | 365 | (unless mode-line-only |
| 324 | (if appt-msg-window | 366 | (appt-display-message (cadr (car appt-time-msg-list)) |
| 325 | (progn | 367 | min-to-app)) |
| 326 | (setq new-time (format-time-string "%a %b %e " | ||
| 327 | (current-time))) | ||
| 328 | (funcall | ||
| 329 | appt-disp-window-function | ||
| 330 | (number-to-string min-to-app) new-time | ||
| 331 | (car (cdr (car appt-time-msg-list)))) | ||
| 332 | |||
| 333 | (run-at-time | ||
| 334 | (format "%d sec" appt-display-duration) | ||
| 335 | nil | ||
| 336 | appt-delete-window-function)) | ||
| 337 | ;;; else | ||
| 338 | |||
| 339 | (if appt-visible | ||
| 340 | (message "%s" | ||
| 341 | (car (cdr (car appt-time-msg-list))))) | ||
| 342 | |||
| 343 | (if appt-audible | ||
| 344 | (beep 1)))) | ||
| 345 | |||
| 346 | (when appt-display-mode-line | 368 | (when appt-display-mode-line |
| 347 | (setq appt-mode-string | 369 | (setq appt-mode-string |
| 348 | (concat " App't in " | 370 | (format " App't in %s min." min-to-app))) |
| 349 | (number-to-string min-to-app) | ||
| 350 | " min. "))) | ||
| 351 | 371 | ||
| 352 | ;; When an appointment is reached, | 372 | ;; When an appointment is reached, |
| 353 | ;; delete it from the list. | 373 | ;; delete it from the list. |
| 354 | ;; Reset the count to 0 in case we display another | 374 | ;; Reset the count to 0 in case we display another |
| 355 | ;; appointment on the next cycle. | 375 | ;; appointment on the next cycle. |
| 356 | (if (= min-to-app 0) | 376 | (if (zerop min-to-app) |
| 357 | (setq appt-time-msg-list | 377 | (setq appt-time-msg-list (cdr appt-time-msg-list) |
| 358 | (cdr appt-time-msg-list) | ||
| 359 | appt-display-count nil))))) | 378 | appt-display-count nil))))) |
| 360 | 379 | ||
| 361 | ;; If we have changed the mode line string, | 380 | ;; If we have changed the mode line string, |
| @@ -372,7 +391,9 @@ The following variables control appointment notification: | |||
| 372 | 391 | ||
| 373 | 392 | ||
| 374 | (defun appt-disp-window (min-to-app new-time appt-msg) | 393 | (defun appt-disp-window (min-to-app new-time appt-msg) |
| 375 | "Display appointment message APPT-MSG in a separate buffer." | 394 | "Display appointment message APPT-MSG in a separate buffer. |
| 395 | The appointment is due in MIN-TO-APP (a string) minutes. | ||
| 396 | NEW-TIME is a string giving the date." | ||
| 376 | (require 'electric) | 397 | (require 'electric) |
| 377 | 398 | ||
| 378 | ;; Make sure we're not in the minibuffer | 399 | ;; Make sure we're not in the minibuffer |
| @@ -384,9 +405,8 @@ The following variables control appointment notification: | |||
| 384 | (if (display-multi-frame-p) | 405 | (if (display-multi-frame-p) |
| 385 | (select-frame (other-frame 1))))) | 406 | (select-frame (other-frame 1))))) |
| 386 | 407 | ||
| 387 | (let* ((this-buffer (current-buffer)) | 408 | (let ((this-window (selected-window)) |
| 388 | (this-window (selected-window)) | 409 | (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name)))) |
| 389 | (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name)))) | ||
| 390 | 410 | ||
| 391 | (if (cdr (assq 'unsplittable (frame-parameters))) | 411 | (if (cdr (assq 'unsplittable (frame-parameters))) |
| 392 | ;; In an unsplittable frame, use something somewhere else. | 412 | ;; In an unsplittable frame, use something somewhere else. |
| @@ -405,9 +425,7 @@ The following variables control appointment notification: | |||
| 405 | (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) | 425 | (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) |
| 406 | (set-buffer-modified-p nil) | 426 | (set-buffer-modified-p nil) |
| 407 | (raise-frame (selected-frame)) | 427 | (raise-frame (selected-frame)) |
| 408 | (select-window this-window) | 428 | (select-window this-window))) |
| 409 | (if appt-audible | ||
| 410 | (beep 1)))) | ||
| 411 | 429 | ||
| 412 | (defun appt-delete-window () | 430 | (defun appt-delete-window () |
| 413 | "Function called to undisplay appointment messages. | 431 | "Function called to undisplay appointment messages. |
| @@ -437,11 +455,9 @@ Usually just deletes the appointment buffer." | |||
| 437 | The time should be in either 24 hour format or am/pm format." | 455 | The time should be in either 24 hour format or am/pm format." |
| 438 | 456 | ||
| 439 | (interactive "sTime (hh:mm[am/pm]): \nsMessage: ") | 457 | (interactive "sTime (hh:mm[am/pm]): \nsMessage: ") |
| 440 | (if (string-match "[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?" | 458 | (unless (string-match "[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?" |
| 441 | new-appt-time) | 459 | new-appt-time) |
| 442 | nil | ||
| 443 | (error "Unacceptable time-string")) | 460 | (error "Unacceptable time-string")) |
| 444 | |||
| 445 | (let* ((appt-time-string (concat new-appt-time " " new-appt-msg)) | 461 | (let* ((appt-time-string (concat new-appt-time " " new-appt-msg)) |
| 446 | (appt-time (list (appt-convert-time new-appt-time))) | 462 | (appt-time (list (appt-convert-time new-appt-time))) |
| 447 | (time-msg (cons appt-time (list appt-time-string)))) | 463 | (time-msg (cons appt-time (list appt-time-string)))) |
| @@ -452,7 +468,7 @@ The time should be in either 24 hour format or am/pm format." | |||
| 452 | (defun appt-delete () | 468 | (defun appt-delete () |
| 453 | "Delete an appointment from the list of appointments." | 469 | "Delete an appointment from the list of appointments." |
| 454 | (interactive) | 470 | (interactive) |
| 455 | (let* ((tmp-msg-list appt-time-msg-list)) | 471 | (let ((tmp-msg-list appt-time-msg-list)) |
| 456 | (while tmp-msg-list | 472 | (while tmp-msg-list |
| 457 | (let* ((element (car tmp-msg-list)) | 473 | (let* ((element (car tmp-msg-list)) |
| 458 | (prompt-string (concat "Delete " | 474 | (prompt-string (concat "Delete " |
| @@ -476,15 +492,11 @@ The time should be in either 24 hour format or am/pm format." | |||
| 476 | (defvar diary-entries-list)) | 492 | (defvar diary-entries-list)) |
| 477 | ;;;###autoload | 493 | ;;;###autoload |
| 478 | (defun appt-make-list () | 494 | (defun appt-make-list () |
| 479 | "Create the appointments list from todays diary buffer. | 495 | "Create the appointments list from today's diary buffer. |
| 480 | The time must be at the beginning of a line for it to be | 496 | The time must be at the beginning of a line for it to be |
| 481 | put in the appointments list. | 497 | put in the appointments list (see examples in documentation of |
| 482 | 02/23/89 | 498 | the function `appt-check'). We assume that the variables DATE and |
| 483 | 12:00pm lunch | 499 | NUMBER hold the arguments that `list-diary-entries' received. |
| 484 | Wednesday | ||
| 485 | 10:00am group meeting | ||
| 486 | We assume that the variables DATE and NUMBER | ||
| 487 | hold the arguments that `list-diary-entries' received. | ||
| 488 | They specify the range of dates that the diary is being processed for." | 500 | They specify the range of dates that the diary is being processed for." |
| 489 | 501 | ||
| 490 | ;; We have something to do if the range of dates that the diary is | 502 | ;; We have something to do if the range of dates that the diary is |
| @@ -557,38 +569,24 @@ They specify the range of dates that the diary is being processed for." | |||
| 557 | (cur-hour (nth 2 now)) | 569 | (cur-hour (nth 2 now)) |
| 558 | (cur-min (nth 1 now)) | 570 | (cur-min (nth 1 now)) |
| 559 | (cur-comp-time (+ (* cur-hour 60) cur-min)) | 571 | (cur-comp-time (+ (* cur-hour 60) cur-min)) |
| 560 | (appt-comp-time (car (car (car appt-time-msg-list))))) | 572 | (appt-comp-time (car (caar appt-time-msg-list)))) |
| 561 | 573 | ||
| 562 | (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) | 574 | (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) |
| 563 | (setq appt-time-msg-list (cdr appt-time-msg-list)) | 575 | (setq appt-time-msg-list (cdr appt-time-msg-list)) |
| 564 | (if appt-time-msg-list | 576 | (if appt-time-msg-list |
| 565 | (setq appt-comp-time (car (car (car appt-time-msg-list)))))))))) | 577 | (setq appt-comp-time (car (caar appt-time-msg-list))))))))) |
| 566 | 578 | ||
| 567 | 579 | ||
| 568 | (defun appt-sort-list (appt-list) | 580 | (defun appt-sort-list (appt-list) |
| 569 | "Simple sort to put the appointments list APPT-LIST in order. | 581 | "Sort an appointment list, putting earlier items at the front. |
| 570 | Scan the list for the smallest element left in the list. | 582 | APPT-LIST is a list of the same format as `appt-time-msg-list'." |
| 571 | Append the smallest element left into the new list, and remove | 583 | (sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2))))) |
| 572 | it from the original list." | ||
| 573 | (let ((order-list nil)) | ||
| 574 | (while appt-list | ||
| 575 | (let* ((element (car appt-list)) | ||
| 576 | (element-time (car (car element))) | ||
| 577 | (tmp-list (cdr appt-list))) | ||
| 578 | (while tmp-list | ||
| 579 | (if (< element-time (car (car (car tmp-list)))) | ||
| 580 | nil | ||
| 581 | (setq element (car tmp-list)) | ||
| 582 | (setq element-time (car (car element)))) | ||
| 583 | (setq tmp-list (cdr tmp-list))) | ||
| 584 | (setq order-list (nconc order-list (list element))) | ||
| 585 | (setq appt-list (delq element appt-list)))) | ||
| 586 | order-list)) | ||
| 587 | 584 | ||
| 588 | 585 | ||
| 589 | (defun appt-convert-time (time2conv) | 586 | (defun appt-convert-time (time2conv) |
| 590 | "Convert hour:min[am/pm] format to minutes from midnight. | 587 | "Convert hour:min[am/pm] format to minutes from midnight. |
| 591 | Also try to accept the hour.min[am/pm] format." | 588 | A period (.) can be used instead of a colon (:) to separate the |
| 589 | hour and minute parts." | ||
| 592 | (let ((conv-time 0) | 590 | (let ((conv-time 0) |
| 593 | (hr 0) | 591 | (hr 0) |
| 594 | (min 0)) | 592 | (min 0)) |
| @@ -615,16 +613,41 @@ Also try to accept the hour.min[am/pm] format." | |||
| 615 | (setq conv-time (+ (* hr 60) min)) | 613 | (setq conv-time (+ (* hr 60) min)) |
| 616 | conv-time)) | 614 | conv-time)) |
| 617 | 615 | ||
| 618 | (defvar appt-timer nil | ||
| 619 | "Timer used for diary appointment notifications (`appt-check').") | ||
| 620 | 616 | ||
| 621 | (unless appt-timer | 617 | (defun appt-update-list () |
| 622 | (setq appt-timer (run-at-time t 60 'appt-check))) | 618 | "If the current buffer is visiting the diary, update appointments. |
| 619 | This function is intended for use with `write-file-functions'." | ||
| 620 | (and (equal buffer-file-name (expand-file-name diary-file)) | ||
| 621 | appt-timer | ||
| 622 | (let ((appt-display-diary nil)) | ||
| 623 | (appt-check t))) | ||
| 624 | nil) | ||
| 625 | |||
| 626 | |||
| 627 | ;;;###autoload | ||
| 628 | (defun appt-activate (&optional arg) | ||
| 629 | "Toggle checking of appointments. | ||
| 630 | With optional numeric argument ARG, turn appointment checking on if | ||
| 631 | ARG is positive, otherwise off." | ||
| 632 | (interactive "P") | ||
| 633 | (let ((appt-active appt-timer)) | ||
| 634 | (setq appt-active (if arg (> (prefix-numeric-value arg) 0) | ||
| 635 | (not appt-active))) | ||
| 636 | (remove-hook 'write-file-functions 'appt-update-list) | ||
| 637 | (or global-mode-string (setq global-mode-string '(""))) | ||
| 638 | (delq 'appt-mode-string global-mode-string) | ||
| 639 | (and appt-timer | ||
| 640 | (cancel-timer appt-timer) | ||
| 641 | (setq appt-timer nil)) | ||
| 642 | (when appt-active | ||
| 643 | (add-hook 'write-file-functions 'appt-update-list) | ||
| 644 | (setq appt-timer (run-at-time t 60 'appt-check) | ||
| 645 | global-mode-string | ||
| 646 | (append global-mode-string '(appt-mode-string))) | ||
| 647 | (appt-check t)))) | ||
| 648 | |||
| 623 | 649 | ||
| 624 | (or global-mode-string (setq global-mode-string '(""))) | 650 | (provide 'appt) |
| 625 | (or (memq 'appt-mode-string global-mode-string) | ||
| 626 | (setq global-mode-string | ||
| 627 | (append global-mode-string '(appt-mode-string)))) | ||
| 628 | 651 | ||
| 629 | ;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347 | 652 | ;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347 |
| 630 | ;;; appt.el ends here | 653 | ;;; appt.el ends here |
diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index 0e46e8d3cd8..97fbb72af61 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el | |||
| @@ -69,7 +69,9 @@ Location and color should be set in .Xdefaults.") | |||
| 69 | Can be used to change frame parameters, such as font, color, location, etc.") | 69 | Can be used to change frame parameters, such as font, color, location, etc.") |
| 70 | 70 | ||
| 71 | (defun calendar-one-frame-setup (&optional arg) | 71 | (defun calendar-one-frame-setup (&optional arg) |
| 72 | "Start calendar and display it in a dedicated frame together with the diary." | 72 | "Start calendar and display it in a dedicated frame together with the diary. |
| 73 | This function requires a display capable of multiple frames, else | ||
| 74 | `calendar-basic-setup' is used instead." | ||
| 73 | (if (not (display-multi-frame-p)) | 75 | (if (not (display-multi-frame-p)) |
| 74 | (calendar-basic-setup arg) | 76 | (calendar-basic-setup arg) |
| 75 | (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) | 77 | (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) |
| @@ -97,7 +99,9 @@ Can be used to change frame parameters, such as font, color, location, etc.") | |||
| 97 | 'diary)))))) | 99 | 'diary)))))) |
| 98 | 100 | ||
| 99 | (defun calendar-only-one-frame-setup (&optional arg) | 101 | (defun calendar-only-one-frame-setup (&optional arg) |
| 100 | "Start calendar and display it in a dedicated frame." | 102 | "Start calendar and display it in a dedicated frame. |
| 103 | This function requires a display capable of multiple frames, else | ||
| 104 | `calendar-basic-setup' is used instead." | ||
| 101 | (if (not (display-multi-frame-p)) | 105 | (if (not (display-multi-frame-p)) |
| 102 | (calendar-basic-setup arg) | 106 | (calendar-basic-setup arg) |
| 103 | (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) | 107 | (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) |
| @@ -116,7 +120,9 @@ Can be used to change frame parameters, such as font, color, location, etc.") | |||
| 116 | (set-window-dedicated-p (selected-window) 'calendar)))))) | 120 | (set-window-dedicated-p (selected-window) 'calendar)))))) |
| 117 | 121 | ||
| 118 | (defun calendar-two-frame-setup (&optional arg) | 122 | (defun calendar-two-frame-setup (&optional arg) |
| 119 | "Start calendar and diary in separate, dedicated frames." | 123 | "Start calendar and diary in separate, dedicated frames. |
| 124 | This function requires a display capable of multiple frames, else | ||
| 125 | `calendar-basic-setup' is used instead." | ||
| 120 | (if (not (display-multi-frame-p)) | 126 | (if (not (display-multi-frame-p)) |
| 121 | (calendar-basic-setup arg) | 127 | (calendar-basic-setup arg) |
| 122 | (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) | 128 | (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 8f5985ddaab..7440a5c7e02 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; calendar.el --- calendar functions | 1 | ;;; calendar.el --- calendar functions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, | 3 | ;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, |
| 4 | ;; 2000, 2001, 2003 Free Software Foundation, Inc. | 4 | ;; 2000, 2001, 2003, 2004 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | 6 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
| 7 | ;; Keywords: calendar | 7 | ;; Keywords: calendar |
| @@ -154,10 +154,11 @@ the screen." | |||
| 154 | 154 | ||
| 155 | ;;;###autoload | 155 | ;;;###autoload |
| 156 | (defcustom view-diary-entries-initially nil | 156 | (defcustom view-diary-entries-initially nil |
| 157 | "*Non-nil means display current date's diary entries on entry. | 157 | "*Non-nil means display current date's diary entries on entry to calendar. |
| 158 | The diary is displayed in another window when the calendar is first displayed, | 158 | The diary is displayed in another window when the calendar is first displayed, |
| 159 | if the current date is visible. The number of days of diary entries displayed | 159 | if the current date is visible. The number of days of diary entries displayed |
| 160 | is governed by the variable `number-of-diary-entries'." | 160 | is governed by the variable `number-of-diary-entries'. This variable can |
| 161 | be overridden by the value of `calendar-setup'." | ||
| 161 | :type 'boolean | 162 | :type 'boolean |
| 162 | :group 'diary) | 163 | :group 'diary) |
| 163 | 164 | ||
| @@ -573,7 +574,10 @@ are | |||
| 573 | 574 | ||
| 574 | Names can be capitalized or not, written in full (as specified by the | 575 | Names can be capitalized or not, written in full (as specified by the |
| 575 | variable `calendar-day-name-array'), or abbreviated (as specified by | 576 | variable `calendar-day-name-array'), or abbreviated (as specified by |
| 576 | `calendar-day-abbrev-array') with or without a period." | 577 | `calendar-day-abbrev-array') with or without a period. To take effect, |
| 578 | this variable should be set before the calendar package and its associates | ||
| 579 | are loaded. Otherwise, use one of the functions `european-calendar' or | ||
| 580 | `american-calendar' to force the appropriate update." | ||
| 577 | :type 'boolean | 581 | :type 'boolean |
| 578 | :group 'diary) | 582 | :group 'diary) |
| 579 | 583 | ||
| @@ -1445,12 +1449,19 @@ return negative results." | |||
| 1445 | "Start calendar and diary in separate, dedicated frames.") | 1449 | "Start calendar and diary in separate, dedicated frames.") |
| 1446 | 1450 | ||
| 1447 | ;;;###autoload | 1451 | ;;;###autoload |
| 1448 | (defvar calendar-setup nil | 1452 | (defcustom calendar-setup nil |
| 1449 | "The frame set up of the calendar. | 1453 | "The frame setup of the calendar. |
| 1450 | The choices are `one-frame' (calendar and diary together in one separate, | 1454 | The choices are: `one-frame' (calendar and diary together in one separate, |
| 1451 | dedicated frame), `two-frames' (calendar and diary in separate, dedicated | 1455 | dedicated frame); `two-frames' (calendar and diary in separate, dedicated |
| 1452 | frames), `calendar-only' (calendar in a separate, dedicated frame); with | 1456 | frames); `calendar-only' (calendar in a separate, dedicated frame); with |
| 1453 | any other value the current frame is used.") | 1457 | any other value the current frame is used. Using any of the first |
| 1458 | three options overrides the value of `view-diary-entries-initially'." | ||
| 1459 | :type '(choice | ||
| 1460 | (const :tag "calendar and diary in separate frame" one-frame) | ||
| 1461 | (const :tag "calendar and diary each in own frame" two-frames) | ||
| 1462 | (const :tag "calendar in separate frame" calendar-only) | ||
| 1463 | (const :tag "use current frame" nil)) | ||
| 1464 | :group 'calendar) | ||
| 1454 | 1465 | ||
| 1455 | ;;;###autoload | 1466 | ;;;###autoload |
| 1456 | (defun calendar (&optional arg) | 1467 | (defun calendar (&optional arg) |
| @@ -2746,16 +2757,16 @@ MARK defaults to `diary-entry-marker'." | |||
| 2746 | (delete-char 1) | 2757 | (delete-char 1) |
| 2747 | (insert mark) | 2758 | (insert mark) |
| 2748 | (forward-char -2)) | 2759 | (forward-char -2)) |
| 2749 | (progn ; attr list | 2760 | (let ; attr list |
| 2750 | (setq temp-face | 2761 | ((temp-face |
| 2751 | (make-symbol (apply 'concat "temp-face-" | 2762 | (make-symbol (apply 'concat "temp-face-" |
| 2752 | (mapcar '(lambda (sym) | 2763 | (mapcar '(lambda (sym) |
| 2753 | (cond ((symbolp sym) (symbol-name sym)) | 2764 | (cond ((symbolp sym) (symbol-name sym)) |
| 2754 | ((numberp sym) (int-to-string sym)) | 2765 | ((numberp sym) (int-to-string sym)) |
| 2755 | (t sym))) mark)))) | 2766 | (t sym))) mark)))) |
| 2767 | (faceinfo mark)) | ||
| 2756 | (make-face temp-face) | 2768 | (make-face temp-face) |
| 2757 | ;; Remove :face info from the mark, copy the face info into temp-face | 2769 | ;; Remove :face info from the mark, copy the face info into temp-face |
| 2758 | (setq faceinfo mark) | ||
| 2759 | (while (setq faceinfo (memq :face faceinfo)) | 2770 | (while (setq faceinfo (memq :face faceinfo)) |
| 2760 | (copy-face (read (nth 1 faceinfo)) temp-face) | 2771 | (copy-face (read (nth 1 faceinfo)) temp-face) |
| 2761 | (setcar faceinfo nil) | 2772 | (setcar faceinfo nil) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 7b5ed23da7e..28fcb50ef14 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; diary-lib.el --- diary functions | 1 | ;;; diary-lib.el --- diary functions |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003 | 3 | ;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003, 2004 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | 6 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
| @@ -52,8 +52,8 @@ If so, return the expanded file name, otherwise signal an error." | |||
| 52 | (defun diary (&optional arg) | 52 | (defun diary (&optional arg) |
| 53 | "Generate the diary window for ARG days starting with the current date. | 53 | "Generate the diary window for ARG days starting with the current date. |
| 54 | If no argument is provided, the number of days of diary entries is governed | 54 | If no argument is provided, the number of days of diary entries is governed |
| 55 | by the variable `number-of-diary-entries'. This function is suitable for | 55 | by the variable `number-of-diary-entries'. A value of ARG less than 1 |
| 56 | execution in a `.emacs' file." | 56 | does nothing. This function is suitable for execution in a `.emacs' file." |
| 57 | (interactive "P") | 57 | (interactive "P") |
| 58 | (diary-check-diary-file) | 58 | (diary-check-diary-file) |
| 59 | (let ((date (calendar-current-date))) | 59 | (let ((date (calendar-current-date))) |
| @@ -284,7 +284,7 @@ Only used if `diary-header-line-flag' is non-nil." | |||
| 284 | "Create and display a buffer containing the relevant lines in diary-file. | 284 | "Create and display a buffer containing the relevant lines in diary-file. |
| 285 | The arguments are DATE and NUMBER; the entries selected are those | 285 | The arguments are DATE and NUMBER; the entries selected are those |
| 286 | for NUMBER days starting with date DATE. The other entries are hidden | 286 | for NUMBER days starting with date DATE. The other entries are hidden |
| 287 | using selective display. | 287 | using selective display. If NUMBER is less than 1, this function does nothing. |
| 288 | 288 | ||
| 289 | Returns a list of all relevant diary entries found, if any, in order by date. | 289 | Returns a list of all relevant diary entries found, if any, in order by date. |
| 290 | The list entries have the form ((month day year) string specifier) where | 290 | The list entries have the form ((month day year) string specifier) where |
| @@ -314,29 +314,29 @@ These hooks have the following distinct roles: | |||
| 314 | `diary-hook' is run last. This can be used for an appointment | 314 | `diary-hook' is run last. This can be used for an appointment |
| 315 | notification function." | 315 | notification function." |
| 316 | 316 | ||
| 317 | (if (< 0 number) | 317 | (when (> number 0) |
| 318 | (let ((original-date date);; save for possible use in the hooks | 318 | (let ((original-date date);; save for possible use in the hooks |
| 319 | old-diary-syntax-table | 319 | old-diary-syntax-table |
| 320 | diary-entries-list | 320 | diary-entries-list |
| 321 | file-glob-attrs | 321 | file-glob-attrs |
| 322 | (date-string (calendar-date-string date)) | 322 | (date-string (calendar-date-string date)) |
| 323 | (d-file (substitute-in-file-name diary-file))) | 323 | (d-file (substitute-in-file-name diary-file))) |
| 324 | (message "Preparing diary...") | 324 | (message "Preparing diary...") |
| 325 | (save-excursion | 325 | (save-excursion |
| 326 | (let ((diary-buffer (find-buffer-visiting d-file))) | 326 | (let ((diary-buffer (find-buffer-visiting d-file))) |
| 327 | (if (not diary-buffer) | 327 | (if (not diary-buffer) |
| 328 | (set-buffer (find-file-noselect d-file t)) | 328 | (set-buffer (find-file-noselect d-file t)) |
| 329 | (set-buffer diary-buffer) | 329 | (set-buffer diary-buffer) |
| 330 | (or (verify-visited-file-modtime diary-buffer) | 330 | (or (verify-visited-file-modtime diary-buffer) |
| 331 | (revert-buffer t t)))) | 331 | (revert-buffer t t)))) |
| 332 | (setq file-glob-attrs (nth 1 (diary-pull-attrs nil ""))) | 332 | (setq file-glob-attrs (nth 1 (diary-pull-attrs nil ""))) |
| 333 | (setq selective-display t) | 333 | (setq selective-display t) |
| 334 | (setq selective-display-ellipses nil) | 334 | (setq selective-display-ellipses nil) |
| 335 | (if diary-header-line-flag | 335 | (if diary-header-line-flag |
| 336 | (setq header-line-format diary-header-line-format)) | 336 | (setq header-line-format diary-header-line-format)) |
| 337 | (setq old-diary-syntax-table (syntax-table)) | 337 | (setq old-diary-syntax-table (syntax-table)) |
| 338 | (set-syntax-table diary-syntax-table) | 338 | (set-syntax-table diary-syntax-table) |
| 339 | (unwind-protect | 339 | (unwind-protect |
| 340 | (let ((buffer-read-only nil) | 340 | (let ((buffer-read-only nil) |
| 341 | (diary-modified (buffer-modified-p)) | 341 | (diary-modified (buffer-modified-p)) |
| 342 | (mark (regexp-quote diary-nonmarking-symbol))) | 342 | (mark (regexp-quote diary-nonmarking-symbol))) |
| @@ -635,10 +635,10 @@ This function is provided for optional use as the `diary-display-hook'." | |||
| 635 | sym | 635 | sym |
| 636 | (symbol-name sym))) | 636 | (symbol-name sym))) |
| 637 | marks)))) | 637 | marks)))) |
| 638 | faceinfo) | 638 | (faceinfo marks)) |
| 639 | (make-face temp-face) | ||
| 639 | ;; Remove :face info from the marks, | 640 | ;; Remove :face info from the marks, |
| 640 | ;; copy the face info into temp-face | 641 | ;; copy the face info into temp-face |
| 641 | (setq faceinfo marks) | ||
| 642 | (while (setq faceinfo (memq :face faceinfo)) | 642 | (while (setq faceinfo (memq :face faceinfo)) |
| 643 | (copy-face (read (nth 1 faceinfo)) temp-face) | 643 | (copy-face (read (nth 1 faceinfo)) temp-face) |
| 644 | (setcar faceinfo nil) | 644 | (setcar faceinfo nil) |
| @@ -715,7 +715,8 @@ This function gets rid of the selective display of the diary file so that | |||
| 715 | all entries, not just some, are visible. If there is no diary buffer, one | 715 | all entries, not just some, are visible. If there is no diary buffer, one |
| 716 | is created." | 716 | is created." |
| 717 | (interactive) | 717 | (interactive) |
| 718 | (let ((d-file (diary-check-diary-file))) | 718 | (let ((d-file (diary-check-diary-file)) |
| 719 | (pop-up-frames (window-dedicated-p (selected-window)))) | ||
| 719 | (save-excursion | 720 | (save-excursion |
| 720 | (set-buffer (or (find-buffer-visiting d-file) | 721 | (set-buffer (or (find-buffer-visiting d-file) |
| 721 | (find-file-noselect d-file t))) | 722 | (find-file-noselect d-file t))) |
| @@ -1100,8 +1101,8 @@ For example, returns 1325 for 1:25pm. | |||
| 1100 | 1101 | ||
| 1101 | Returns `diary-unknown-time' (default value -9999) if no time is recognized. | 1102 | Returns `diary-unknown-time' (default value -9999) if no time is recognized. |
| 1102 | The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam, | 1103 | The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam, |
| 1103 | XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. We also try to | 1104 | XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. A period (.) can |
| 1104 | accept time in the form XX[.XX][am/pm/AM/PM]]." | 1105 | be used instead of a colon (:) to separate the hour and minute parts." |
| 1105 | (let ((case-fold-search nil)) | 1106 | (let ((case-fold-search nil)) |
| 1106 | (cond ((string-match ; Military time | 1107 | (cond ((string-match ; Military time |
| 1107 | "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" | 1108 | "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" |
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index 17b0affac92..6fac040c287 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el | |||
| @@ -618,10 +618,11 @@ Point must be located just after the node name. Point left before description. | |||
| 618 | Single argument, END-OF-MENU, is position limiting search." | 618 | Single argument, END-OF-MENU, is position limiting search." |
| 619 | (skip-chars-forward "[:.,\t\n ]+") | 619 | (skip-chars-forward "[:.,\t\n ]+") |
| 620 | ;; don't copy a carriage return at line beginning with asterisk! | 620 | ;; don't copy a carriage return at line beginning with asterisk! |
| 621 | ;; don't copy @detailmenu or @end menu as descriptions! | ||
| 621 | ;; do copy a description that begins with an `@'! | 622 | ;; do copy a description that begins with an `@'! |
| 622 | ;; !! Known bug: does not copy descriptions starting with ^|\{?* etc. | 623 | ;; !! Known bug: does not copy descriptions starting with ^|\{?* etc. |
| 623 | (if (and (looking-at "\\(\\w+\\|@\\)") | 624 | (if (and (looking-at "\\(\\w+\\|@\\)") |
| 624 | (not (looking-at "\\(^\\* \\|^@end menu\\)"))) | 625 | (not (looking-at "\\(^\\* \\|^@detailmenu\\|^@end menu\\)"))) |
| 625 | (buffer-substring | 626 | (buffer-substring |
| 626 | (point) | 627 | (point) |
| 627 | (save-excursion | 628 | (save-excursion |
| @@ -1782,7 +1783,13 @@ Requirements: | |||
| 1782 | * this node must be the first node in the included file, | 1783 | * this node must be the first node in the included file, |
| 1783 | * each highest hierarchical level node must be of the same type. | 1784 | * each highest hierarchical level node must be of the same type. |
| 1784 | 1785 | ||
| 1785 | Thus, normally, each included file contains one, and only one, chapter." | 1786 | Thus, normally, each included file contains one, and only one, chapter. |
| 1787 | |||
| 1788 | However, when an included file does not have any node lines in | ||
| 1789 | it, this command does not try to create a menu entry for it. | ||
| 1790 | Consequently, you can include any file, such as a version or an | ||
| 1791 | update file without node lines, not just files that are | ||
| 1792 | chapters." | ||
| 1786 | 1793 | ||
| 1787 | ;; The menu-list has the form: | 1794 | ;; The menu-list has the form: |
| 1788 | ;; | 1795 | ;; |
diff --git a/man/ChangeLog b/man/ChangeLog index e57e5fbb4fe..a4a4b3024d4 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-01-11 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 2 | |||
| 3 | * calendar.texi (Appointments): Update section. | ||
| 4 | |||
| 1 | 2003-12-29 Kevin Ryde <user42@zip.com.au> | 5 | 2003-12-29 Kevin Ryde <user42@zip.com.au> |
| 2 | 6 | ||
| 3 | * viper.texi (Vi Macros): Fix reference to the Emacs manual. | 7 | * viper.texi (Vi Macros): Fix reference to the Emacs manual. |
diff --git a/man/calendar.texi b/man/calendar.texi index fd287dec358..3d3f84b4ba3 100644 --- a/man/calendar.texi +++ b/man/calendar.texi | |||
| @@ -1325,36 +1325,22 @@ Reference Manual}. | |||
| 1325 | @section Appointments | 1325 | @section Appointments |
| 1326 | @cindex appointment notification | 1326 | @cindex appointment notification |
| 1327 | 1327 | ||
| 1328 | @vindex appt-display-format | ||
| 1329 | @vindex appt-audible | ||
| 1328 | If you have a diary entry for an appointment, and that diary entry | 1330 | If you have a diary entry for an appointment, and that diary entry |
| 1329 | begins with a recognizable time of day, Emacs can warn you several | 1331 | begins with a recognizable time of day, Emacs can warn you several |
| 1330 | minutes beforehand that that appointment is pending. Emacs alerts you | 1332 | minutes beforehand that that appointment is pending. Emacs alerts you |
| 1331 | to the appointment by displaying a message in the mode line. | 1333 | to the appointment by displaying a message in your chosen format, as |
| 1332 | 1334 | specified by the variable @code{appt-display-format}. If the value | |
| 1333 | @vindex diary-hook | 1335 | of @code{appt-audible} is non-nil, an audible reminder is also given. |
| 1334 | @findex appt-make-list | 1336 | |
| 1335 | To enable appointment notification, you must enable the time display | 1337 | @findex appt-activate |
| 1336 | feature of Emacs, @kbd{M-x display-time} (@pxref{Mode Line}). You must | 1338 | To enable appointment notification, call the function |
| 1337 | also add the function @code{appt-make-list} to the | 1339 | @code{appt-activate} with a positive argument. This sets up an |
| 1338 | @code{diary-hook}, like this: | 1340 | appointment list for today from the diary file, giving all diary entries |
| 1339 | 1341 | found with recognizable times of day, and reminds you just before each | |
| 1340 | @example | 1342 | of them. Calling @code{appt-activate} with a negative argument disables |
| 1341 | (add-hook 'diary-hook 'appt-make-list) | 1343 | the appointment package. |
| 1342 | @end example | ||
| 1343 | |||
| 1344 | @noindent | ||
| 1345 | Adding this text to your @file{.emacs} file does the whole job: | ||
| 1346 | |||
| 1347 | @example | ||
| 1348 | (display-time) | ||
| 1349 | (add-hook 'diary-hook 'appt-make-list) | ||
| 1350 | (diary 0) | ||
| 1351 | @end example | ||
| 1352 | |||
| 1353 | With these preparations done, when you display the diary (either with | ||
| 1354 | the @kbd{d} command in the calendar window or with the @kbd{M-x diary} | ||
| 1355 | command), it sets up an appointment list of all the diary entries found | ||
| 1356 | with recognizable times of day, and reminds you just before each of | ||
| 1357 | them. | ||
| 1358 | 1344 | ||
| 1359 | For example, suppose the diary file contains these lines: | 1345 | For example, suppose the diary file contains these lines: |
| 1360 | 1346 | ||
| @@ -1364,19 +1350,26 @@ Monday | |||
| 1364 | 12:00pm Lunch | 1350 | 12:00pm Lunch |
| 1365 | @end example | 1351 | @end example |
| 1366 | 1352 | ||
| 1353 | @vindex appt-message-warning-time | ||
| 1367 | @noindent | 1354 | @noindent |
| 1368 | Then on Mondays, after you have displayed the diary, you will be | 1355 | Then on Mondays, you will be reminded at around 9:20am about your coffee |
| 1369 | reminded at 9:20am about your coffee break and at 11:50am about lunch. | 1356 | break and at around 11:50am about lunch. How many minutes in advance you |
| 1357 | are first warned is determined by the value of | ||
| 1358 | @code{appt-message-warning-time}. | ||
| 1370 | 1359 | ||
| 1371 | You can write times in am/pm style (with @samp{12:00am} standing | 1360 | You can write times in am/pm style (with @samp{12:00am} standing |
| 1372 | for midnight and @samp{12:00pm} standing for noon), or 24-hour | 1361 | for midnight and @samp{12:00pm} standing for noon), or 24-hour |
| 1373 | European/military style. You need not be consistent; your diary file | 1362 | European/military style. You need not be consistent; your diary file |
| 1374 | can have a mixture of the two styles. | 1363 | can have a mixture of the two styles. Times must be at the beginning |
| 1364 | of lines if they are to be recognized. | ||
| 1375 | 1365 | ||
| 1376 | @vindex appt-display-diary | 1366 | @vindex appt-display-diary |
| 1377 | Emacs updates the appointments list automatically just after | 1367 | Emacs updates the appointments list from the diary file automatically |
| 1378 | midnight. This also displays the next day's diary entries in the diary | 1368 | just after midnight. An update can be forced at any time by |
| 1379 | buffer, unless you set @code{appt-display-diary} to @code{nil}. | 1369 | re-activating the appointment package. Both these actions also display |
| 1370 | the day's diary buffer, unless you set @code{appt-display-diary} to | ||
| 1371 | @code{nil}. The appointments list is also updated whenever the | ||
| 1372 | diary file is saved. | ||
| 1380 | 1373 | ||
| 1381 | @findex appt-add | 1374 | @findex appt-add |
| 1382 | @findex appt-delete | 1375 | @findex appt-delete |
| @@ -1386,10 +1379,6 @@ clock. The command @kbd{M-x appt-add} adds entries to the appointment | |||
| 1386 | list without affecting your diary file. You delete entries from the | 1379 | list without affecting your diary file. You delete entries from the |
| 1387 | appointment list with @kbd{M-x appt-delete}. | 1380 | appointment list with @kbd{M-x appt-delete}. |
| 1388 | 1381 | ||
| 1389 | @vindex appt-issue-message | ||
| 1390 | You can turn off the appointment notification feature at any time by | ||
| 1391 | setting @code{appt-issue-message} to @code{nil}. | ||
| 1392 | |||
| 1393 | @node Daylight Savings | 1382 | @node Daylight Savings |
| 1394 | @section Daylight Savings Time | 1383 | @section Daylight Savings Time |
| 1395 | @cindex daylight savings time | 1384 | @cindex daylight savings time |
diff --git a/src/ChangeLog b/src/ChangeLog index 27c76179e57..8b6160fb5eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-01-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * alloc.c (allocate_vectorlike): Surround calls to mallopt with | ||
| 4 | BLOCK/UNBLOCK_INPUT. | ||
| 5 | |||
| 1 | 2004-01-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 6 | 2004-01-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are | 8 | * xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are |
diff --git a/src/alloc.c b/src/alloc.c index 700845ab6c5..616e264fbf1 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2499,7 +2499,9 @@ allocate_vectorlike (len, type) | |||
| 2499 | /* Prevent mmap'ing the chunk. Lisp data may not be mmap'ed | 2499 | /* Prevent mmap'ing the chunk. Lisp data may not be mmap'ed |
| 2500 | because mapped region contents are not preserved in | 2500 | because mapped region contents are not preserved in |
| 2501 | a dumped Emacs. */ | 2501 | a dumped Emacs. */ |
| 2502 | BLOCK_INPUT; | ||
| 2502 | mallopt (M_MMAP_MAX, 0); | 2503 | mallopt (M_MMAP_MAX, 0); |
| 2504 | UNBLOCK_INPUT; | ||
| 2503 | #endif | 2505 | #endif |
| 2504 | 2506 | ||
| 2505 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; | 2507 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; |
| @@ -2507,7 +2509,9 @@ allocate_vectorlike (len, type) | |||
| 2507 | 2509 | ||
| 2508 | #ifdef DOUG_LEA_MALLOC | 2510 | #ifdef DOUG_LEA_MALLOC |
| 2509 | /* Back to a reasonable maximum of mmap'ed areas. */ | 2511 | /* Back to a reasonable maximum of mmap'ed areas. */ |
| 2512 | BLOCK_INPUT; | ||
| 2510 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); | 2513 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); |
| 2514 | UNBLOCK_INPUT; | ||
| 2511 | #endif | 2515 | #endif |
| 2512 | 2516 | ||
| 2513 | consing_since_gc += nbytes; | 2517 | consing_since_gc += nbytes; |