From e14221412b6fa1f1144f21e6e99a5d54a761b33d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 26 Mar 2008 03:42:57 +0000 Subject: [PATCH] (appt-buffer-name): Don't use a leading space for buffers shown to the user. (appt-disp-window): Disable undo explicitly now that the leading space is gone. --- lisp/ChangeLog | 5 +++ lisp/calendar/appt.el | 87 ++++++++++++++++++++++--------------------- 2 files changed, 49 insertions(+), 43 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0f5c870a00f..d9ec558f302 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2008-03-26 Stefan Monnier + * calendar/appt.el (appt-buffer-name): Don't use a leading space for + buffers shown to the user. + (appt-disp-window): Disable undo explicitly now that the leading space + is gone. + * simple.el (activate-mark): New function. (set-mark-command): Use it with region-active-p to clean up the code. (exchange-point-and-mark): Invert the meaning of C-u when diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 5d1a951b9b0..4cf67d084b0 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -30,48 +30,48 @@ ;; appt.el - visible and/or audible notification of ;; appointments from diary file. ;; -;;; -;;; Thanks to Edward M. Reingold for much help and many suggestions, -;;; And to many others for bug fixes and suggestions. -;;; -;;; -;;; This functions in this file will alert the user of a -;;; pending appointment based on his/her diary file. This package -;;; is documented in the Emacs manual. -;;; -;;; To activate this package, simply use (appt-activate 1). -;;; A `diary-file' with appointments of the format described in the -;;; documentation of the function `appt-check' is required. -;;; Relevant customizable variables are also listed in the -;;; documentation of that function. -;;; -;;; Today's appointment list is initialized from the diary when this -;;; package is activated. Additionally, the appointments list is -;;; recreated automatically at 12:01am for those who do not logout -;;; every day or are programming late. It is also updated when the -;;; `diary-file' is saved. Calling `appt-check' with an argument forces -;;; a re-initialization at any time. -;;; -;;; In order to add or delete items from today's list, without -;;; changing the diary file, use `appt-add' and `appt-delete'. -;;; - -;;; Brief internal description - Skip this if you are not interested! -;;; -;;; The function `appt-make-list' creates the appointments list which -;;; `appt-check' reads. -;;; -;;; You can change the way the appointment window is created/deleted by -;;; setting the variables -;;; -;;; appt-disp-window-function -;;; and -;;; appt-delete-window-function -;;; -;;; For instance, these variables could be set to functions that display -;;; appointments in pop-up frames, which are lowered or iconified after -;;; `appt-display-interval' minutes. -;;; +;; +;; Thanks to Edward M. Reingold for much help and many suggestions, +;; And to many others for bug fixes and suggestions. +;; +;; +;; This functions in this file will alert the user of a +;; pending appointment based on his/her diary file. This package +;; is documented in the Emacs manual. +;; +;; To activate this package, simply use (appt-activate 1). +;; A `diary-file' with appointments of the format described in the +;; documentation of the function `appt-check' is required. +;; Relevant customizable variables are also listed in the +;; documentation of that function. +;; +;; Today's appointment list is initialized from the diary when this +;; package is activated. Additionally, the appointments list is +;; recreated automatically at 12:01am for those who do not logout +;; every day or are programming late. It is also updated when the +;; `diary-file' is saved. Calling `appt-check' with an argument forces +;; a re-initialization at any time. +;; +;; In order to add or delete items from today's list, without +;; changing the diary file, use `appt-add' and `appt-delete'. +;; + +;; Brief internal description - Skip this if you are not interested! +;; +;; The function `appt-make-list' creates the appointments list which +;; `appt-check' reads. +;; +;; You can change the way the appointment window is created/deleted by +;; setting the variables +;; +;; appt-disp-window-function +;; and +;; appt-delete-window-function +;; +;; For instance, these variables could be set to functions that display +;; appointments in pop-up frames, which are lowered or iconified after +;; `appt-display-interval' minutes. +;; ;;; Code: @@ -180,7 +180,7 @@ Only relevant if reminders are being displayed in a window." ;;; Internal variables below this point. -(defconst appt-buffer-name " *appt-buf*" +(defconst appt-buffer-name "*appt-buf*" "Name of the appointments buffer.") (defvar appt-time-msg-list nil @@ -436,6 +436,7 @@ message APPT-MSG in a separate buffer." (switch-to-buffer appt-disp-buf)) (calendar-set-mode-line (format " Appointment in %s minutes. %s " min-to-app new-time)) + (buffer-disable-undo) (erase-buffer) (insert appt-msg) (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) -- 2.39.5