diff options
| author | Protesilaos Stavrou | 2023-02-20 21:03:08 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2023-09-04 22:50:15 +0200 |
| commit | 367c3f25a16c8e013a8dbf2bc8c2c20f233e54d2 (patch) | |
| tree | fcc31f519b7e2fa707463e09eac00e603480386c | |
| parent | 9e05453a8c23f882d2849b21a27e752607cfcf3b (diff) | |
| download | emacs-367c3f25a16c8e013a8dbf2bc8c2c20f233e54d2.tar.gz emacs-367c3f25a16c8e013a8dbf2bc8c2c20f233e54d2.zip | |
Add 'appt-notification' face (Bug#61661)
* lisp/calendar/appt.el (appt-notification): Declare the new face.
(appt-check): Implement the new face.
* etc/NEWS: Announce the new face.
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | lisp/calendar/appt.el | 8 |
2 files changed, 14 insertions, 1 deletions
| @@ -152,6 +152,13 @@ right-aligned to is controlled by the new user option | |||
| 152 | It can be used to add, remove and reorder functions that change | 152 | It can be used to add, remove and reorder functions that change |
| 153 | the appearance of every tab on the tab bar. | 153 | the appearance of every tab on the tab bar. |
| 154 | 154 | ||
| 155 | ** Miscellaneous | ||
| 156 | |||
| 157 | --- | ||
| 158 | *** New face 'appt-notification' for 'appt-display-mode-line'. | ||
| 159 | It can be used to customize the look of the appointment notification | ||
| 160 | displayed on the mode line when 'appt-display-mode-line' is non-nil. | ||
| 161 | |||
| 155 | 162 | ||
| 156 | * Editing Changes in Emacs 30.1 | 163 | * Editing Changes in Emacs 30.1 |
| 157 | 164 | ||
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 469b3f4023c..c761bb6a89d 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -165,6 +165,12 @@ Only relevant if reminders are being displayed in a window." | |||
| 165 | :type 'function | 165 | :type 'function |
| 166 | :group 'appt) | 166 | :group 'appt) |
| 167 | 167 | ||
| 168 | (defface appt-notification | ||
| 169 | '((t :inherit mode-line-emphasis)) | ||
| 170 | "Face for appointment notification on the modeline. | ||
| 171 | Shown when `appt-display-mode-line' is non-nil." | ||
| 172 | :group 'mode-line-faces | ||
| 173 | :version "30.1") | ||
| 168 | 174 | ||
| 169 | ;;; Internal variables below this point. | 175 | ;;; Internal variables below this point. |
| 170 | 176 | ||
| @@ -406,7 +412,7 @@ displayed in a window: | |||
| 406 | (appt-mode-line (mapcar #'number-to-string | 412 | (appt-mode-line (mapcar #'number-to-string |
| 407 | min-list) | 413 | min-list) |
| 408 | t) | 414 | t) |
| 409 | 'face 'mode-line-emphasis) | 415 | 'face 'appt-notification) |
| 410 | " "))) | 416 | " "))) |
| 411 | ;; Reset count to 0 in case we display another appt on the next cycle. | 417 | ;; Reset count to 0 in case we display another appt on the next cycle. |
| 412 | (setq appt-display-count (if (equal '(0) min-list) 0 | 418 | (setq appt-display-count (if (equal '(0) min-list) 0 |