diff options
| author | Po Lu | 2023-02-17 19:09:58 +0800 |
|---|---|---|
| committer | Po Lu | 2023-02-17 19:09:58 +0800 |
| commit | 2341d1d52ac500a3d4b4326181d33ee0d7ba032e (patch) | |
| tree | c19c3735604c0183da99cb7c995e1c7f3f7b229f | |
| parent | ecb48e8d636b043f485d3e5d75841b9c4818d4a1 (diff) | |
| parent | 7ab6c6ac8334f80a2effcb9d66d2c57810c9a73e (diff) | |
| download | emacs-2341d1d52ac500a3d4b4326181d33ee0d7ba032e.tar.gz emacs-2341d1d52ac500a3d4b4326181d33ee0d7ba032e.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package-vc.el | 19 | ||||
| -rw-r--r-- | lisp/progmodes/c-ts-mode.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 44 | ||||
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 59 | ||||
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 11 | ||||
| -rw-r--r-- | lisp/textmodes/emacs-news-mode.el | 23 | ||||
| -rw-r--r-- | lisp/time.el | 6 | ||||
| -rw-r--r-- | test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts (renamed from test/lisp/textmodes/emacs-news-mode-resources/toggle-tag.erts) | 0 | ||||
| -rw-r--r-- | test/lisp/textmodes/emacs-news-mode-tests.el | 6 |
10 files changed, 153 insertions, 23 deletions
| @@ -62,6 +62,11 @@ This allows the user to customize the prompt that is appended by | |||
| 62 | 'yes-or-no-p' when asking questions. The default value is | 62 | 'yes-or-no-p' when asking questions. The default value is |
| 63 | "(yes or no) ". | 63 | "(yes or no) ". |
| 64 | 64 | ||
| 65 | --- | ||
| 66 | ** New face 'display-time-time-and-date-indicator'. | ||
| 67 | This is used for displaying the time and date components of | ||
| 68 | 'display-time-mode'. | ||
| 69 | |||
| 65 | 70 | ||
| 66 | * Editing Changes in Emacs 30.1 | 71 | * Editing Changes in Emacs 30.1 |
| 67 | 72 | ||
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index bad59aa6c0f..b753adcb8a0 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el | |||
| @@ -440,7 +440,7 @@ version of that package." | |||
| 440 | (package-desc-version a))) | 440 | (package-desc-version a))) |
| 441 | (duplicate-p (a b) | 441 | (duplicate-p (a b) |
| 442 | "Are A and B the same package?" | 442 | "Are A and B the same package?" |
| 443 | (equal a (car b))) | 443 | (eq (package-desc-name a) (package-desc-name b))) |
| 444 | (depends-on-p (target package) | 444 | (depends-on-p (target package) |
| 445 | "Does PACKAGE depend on TARGET?" | 445 | "Does PACKAGE depend on TARGET?" |
| 446 | (or (eq target package) | 446 | (or (eq target package) |
| @@ -457,7 +457,7 @@ version of that package." | |||
| 457 | (depends-on-p desc-a desc-b))))) | 457 | (depends-on-p desc-a desc-b))))) |
| 458 | (mapc #'search requirements) | 458 | (mapc #'search requirements) |
| 459 | (cl-callf sort to-install #'version-order) | 459 | (cl-callf sort to-install #'version-order) |
| 460 | (cl-callf seq-uniq to-install) | 460 | (cl-callf seq-uniq to-install #'duplicate-p) |
| 461 | (cl-callf sort to-install #'dependent-order)) | 461 | (cl-callf sort to-install #'dependent-order)) |
| 462 | (mapc #'package-install-from-archive to-install) | 462 | (mapc #'package-install-from-archive to-install) |
| 463 | missing)) | 463 | missing)) |
| @@ -602,6 +602,13 @@ attribute in PKG-SPEC." | |||
| 602 | (vc-retrieve-tag dir release-rev) | 602 | (vc-retrieve-tag dir release-rev) |
| 603 | (message "No release revision was found, continuing..."))))) | 603 | (message "No release revision was found, continuing..."))))) |
| 604 | 604 | ||
| 605 | (defvar package-vc-non-code-file-names | ||
| 606 | '(".dir-locals.el" ".dir-locals-2.el") | ||
| 607 | "List of file names that do not contain Emacs Lisp code. | ||
| 608 | This list is used by `package-vc--unpack' to better check if the | ||
| 609 | user is fetching code from a repository that does not contain any | ||
| 610 | Emacs Lisp files.") | ||
| 611 | |||
| 605 | (defun package-vc--unpack (pkg-desc pkg-spec &optional rev) | 612 | (defun package-vc--unpack (pkg-desc pkg-spec &optional rev) |
| 606 | "Install the package described by PKG-DESC. | 613 | "Install the package described by PKG-DESC. |
| 607 | PKG-SPEC is a package specification, a property list describing | 614 | PKG-SPEC is a package specification, a property list describing |
| @@ -623,6 +630,14 @@ checkout. This overrides the `:branch' attribute in PKG-SPEC." | |||
| 623 | (when (directory-empty-p pkg-dir) | 630 | (when (directory-empty-p pkg-dir) |
| 624 | (delete-directory pkg-dir) | 631 | (delete-directory pkg-dir) |
| 625 | (error "Empty checkout for %s" name)) | 632 | (error "Empty checkout for %s" name)) |
| 633 | (unless (seq-remove | ||
| 634 | (lambda (file) | ||
| 635 | (member (file-name-nondirectory file) package-vc-non-code-file-names)) | ||
| 636 | (directory-files-recursively pkg-dir "\\.el\\'" nil)) | ||
| 637 | (when (yes-or-no-p (format "No Emacs Lisp files found when fetching \"%s\", \ | ||
| 638 | abort installation?" name)) | ||
| 639 | (delete-directory pkg-dir t) | ||
| 640 | (user-error "Installation aborted"))) | ||
| 626 | 641 | ||
| 627 | ;; When nothing is specified about a `lisp-dir', then should | 642 | ;; When nothing is specified about a `lisp-dir', then should |
| 628 | ;; heuristically check if there is a sub-directory with lisp | 643 | ;; heuristically check if there is a sub-directory with lisp |
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 38aaea139f1..8a4cc2fac18 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el | |||
| @@ -219,6 +219,7 @@ delimiters < and >'s." | |||
| 219 | MODE is either `c' or `cpp'." | 219 | MODE is either `c' or `cpp'." |
| 220 | (let ((common | 220 | (let ((common |
| 221 | `(((parent-is "translation_unit") point-min 0) | 221 | `(((parent-is "translation_unit") point-min 0) |
| 222 | ((query "(ERROR (ERROR)) @indent") point-min 0) | ||
| 222 | ((node-is ")") parent 1) | 223 | ((node-is ")") parent 1) |
| 223 | ((node-is "]") parent-bol 0) | 224 | ((node-is "]") parent-bol 0) |
| 224 | ((node-is "else") parent-bol 0) | 225 | ((node-is "else") parent-bol 0) |
| @@ -816,7 +817,7 @@ the semicolon. This function skips the semicolon." | |||
| 816 | 817 | ||
| 817 | ;; Electric | 818 | ;; Electric |
| 818 | (setq-local electric-indent-chars | 819 | (setq-local electric-indent-chars |
| 819 | (append "{}():;," electric-indent-chars)) | 820 | (append "{}():;,#" electric-indent-chars)) |
| 820 | 821 | ||
| 821 | ;; Imenu. | 822 | ;; Imenu. |
| 822 | (setq-local treesit-simple-imenu-settings | 823 | (setq-local treesit-simple-imenu-settings |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 1899b522ab0..f8ae49c42dd 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -14911,7 +14911,49 @@ comment at the start of cc-engine.el for more info." | |||
| 14911 | (c-add-syntax 'topmost-intro-cont (c-point 'boi))) | 14911 | (c-add-syntax 'topmost-intro-cont (c-point 'boi))) |
| 14912 | )) | 14912 | )) |
| 14913 | 14913 | ||
| 14914 | ;; (CASE 6 has been removed.) | 14914 | ;; ((Old) CASE 6 has been removed.) |
| 14915 | ;; CASE 6: line is within a C11 _Generic expression. | ||
| 14916 | ((and c-generic-key | ||
| 14917 | (eq (char-after containing-sexp) ?\() | ||
| 14918 | (progn (setq tmp-pos (c-safe-scan-lists | ||
| 14919 | containing-sexp 1 0 | ||
| 14920 | (min (+ (point) 2000) (point-max)))) | ||
| 14921 | t) | ||
| 14922 | (save-excursion | ||
| 14923 | (and | ||
| 14924 | (progn (goto-char containing-sexp) | ||
| 14925 | (zerop (c-backward-token-2))) | ||
| 14926 | (looking-at c-generic-key) | ||
| 14927 | (progn (goto-char (1+ containing-sexp)) | ||
| 14928 | (c-syntactic-re-search-forward | ||
| 14929 | "," indent-point 'bound t t)) | ||
| 14930 | (setq placeholder (point))))) | ||
| 14931 | (let ((res (c-syntactic-re-search-forward | ||
| 14932 | "[,:)]" | ||
| 14933 | (or tmp-pos (min (+ (point) 2000) (point-max))) | ||
| 14934 | 'bound t t))) | ||
| 14935 | (cond | ||
| 14936 | ((and res | ||
| 14937 | (eq (char-before) ?\)) | ||
| 14938 | (save-excursion | ||
| 14939 | (backward-char) | ||
| 14940 | (c-backward-syntactic-ws indent-point) | ||
| 14941 | (eq (point) indent-point))) | ||
| 14942 | (c-add-stmt-syntax | ||
| 14943 | 'arglist-close (list containing-sexp) t | ||
| 14944 | (c-most-enclosing-brace paren-state indent-point) paren-state)) | ||
| 14945 | ((or (not res) | ||
| 14946 | (eq (char-before) ?\))) | ||
| 14947 | (backward-char) | ||
| 14948 | (c-syntactic-skip-backward "^,:" containing-sexp t) | ||
| 14949 | (c-add-syntax (if (eq (char-before) ?:) | ||
| 14950 | 'statement-case-intro | ||
| 14951 | 'case-label) | ||
| 14952 | (1+ containing-sexp))) | ||
| 14953 | (t (c-add-syntax (if (eq (char-before) ?:) | ||
| 14954 | 'case-label | ||
| 14955 | 'statement-case-intro) | ||
| 14956 | (1+ containing-sexp)))))) | ||
| 14915 | 14957 | ||
| 14916 | ;; CASE 7: line is an expression, not a statement. Most | 14958 | ;; CASE 7: line is an expression, not a statement. Most |
| 14917 | ;; likely we are either in a function prototype or a function | 14959 | ;; likely we are either in a function prototype or a function |
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index c220d8d8789..4ec21af1b25 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -259,14 +259,14 @@ | |||
| 259 | 259 | ||
| 260 | (defmacro c-fontify-types-and-refs (varlist &rest body) | 260 | (defmacro c-fontify-types-and-refs (varlist &rest body) |
| 261 | (declare (indent 1) (debug let*)) | 261 | (declare (indent 1) (debug let*)) |
| 262 | ;; Like `let', but additionally activates `c-record-type-identifiers' | 262 | ;; Like `let*', but additionally activates `c-record-type-identifiers' |
| 263 | ;; and `c-record-ref-identifiers', and fontifies the recorded ranges | 263 | ;; and `c-record-ref-identifiers', and fontifies the recorded ranges |
| 264 | ;; accordingly on exit. | 264 | ;; accordingly on exit. |
| 265 | ;; | 265 | ;; |
| 266 | ;; This function does hidden buffer changes. | 266 | ;; This function does hidden buffer changes. |
| 267 | `(let ((c-record-type-identifiers t) | 267 | `(let* ((c-record-type-identifiers t) |
| 268 | c-record-ref-identifiers | 268 | c-record-ref-identifiers |
| 269 | ,@varlist) | 269 | ,@varlist) |
| 270 | (prog1 (progn ,@body) | 270 | (prog1 (progn ,@body) |
| 271 | (c-fontify-recorded-types-and-refs)))) | 271 | (c-fontify-recorded-types-and-refs)))) |
| 272 | 272 | ||
| @@ -1219,6 +1219,7 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1219 | ;; inside a function declaration arglist). | 1219 | ;; inside a function declaration arglist). |
| 1220 | ;; '<> In an angle bracket arglist. | 1220 | ;; '<> In an angle bracket arglist. |
| 1221 | ;; 'arglist Some other type of arglist. | 1221 | ;; 'arglist Some other type of arglist. |
| 1222 | ;; 'generic In a C11 _Generic construct. | ||
| 1222 | ;; 'top Some other context and point is at the top-level (either | 1223 | ;; 'top Some other context and point is at the top-level (either |
| 1223 | ;; outside any braces or directly inside a class or namespace, | 1224 | ;; outside any braces or directly inside a class or namespace, |
| 1224 | ;; etc.) | 1225 | ;; etc.) |
| @@ -1345,6 +1346,15 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1345 | (c-back-over-member-initializers))) | 1346 | (c-back-over-member-initializers))) |
| 1346 | (c-put-char-property (1- match-pos) 'c-type 'c-not-decl) | 1347 | (c-put-char-property (1- match-pos) 'c-type 'c-not-decl) |
| 1347 | (cons 'not-decl nil)) | 1348 | (cons 'not-decl nil)) |
| 1349 | ;; In a C11 _Generic construct. | ||
| 1350 | ((and c-generic-key | ||
| 1351 | (eq (char-before match-pos) ?,) | ||
| 1352 | (save-excursion | ||
| 1353 | (and (c-go-up-list-backward match-pos | ||
| 1354 | (max (- (point) 2000) (point-min))) | ||
| 1355 | (zerop (c-backward-token-2)) | ||
| 1356 | (looking-at c-generic-key)))) | ||
| 1357 | (cons 'generic nil)) | ||
| 1348 | ;; At start of a declaration inside a declaration paren. | 1358 | ;; At start of a declaration inside a declaration paren. |
| 1349 | ((save-excursion | 1359 | ((save-excursion |
| 1350 | (goto-char match-pos) | 1360 | (goto-char match-pos) |
| @@ -1616,13 +1626,16 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1616 | (c-forward-syntactic-ws)) | 1626 | (c-forward-syntactic-ws)) |
| 1617 | 1627 | ||
| 1618 | ;; Now analyze the construct. | 1628 | ;; Now analyze the construct. |
| 1619 | (if (eq context 'not-decl) | 1629 | (cond |
| 1620 | (progn | 1630 | ((eq context 'not-decl) |
| 1621 | (setq decl-or-cast nil) | 1631 | (setq decl-or-cast nil) |
| 1622 | (if (c-syntactic-re-search-forward | 1632 | (if (c-syntactic-re-search-forward |
| 1623 | "," (min limit (point-max)) 'at-limit t) | 1633 | "," (min limit (point-max)) 'at-limit t) |
| 1624 | (c-put-char-property (1- (point)) 'c-type 'c-not-decl)) | 1634 | (c-put-char-property (1- (point)) 'c-type 'c-not-decl)) |
| 1625 | nil) | 1635 | nil) |
| 1636 | ((eq context 'generic) | ||
| 1637 | (c-font-lock-c11-generic-clause)) | ||
| 1638 | (t | ||
| 1626 | (setq decl-or-cast | 1639 | (setq decl-or-cast |
| 1627 | (c-forward-decl-or-cast-1 | 1640 | (c-forward-decl-or-cast-1 |
| 1628 | match-pos context last-cast-end inside-macro)) | 1641 | match-pos context last-cast-end inside-macro)) |
| @@ -1683,7 +1696,7 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1683 | context | 1696 | context |
| 1684 | (or toplev (nth 4 decl-or-cast)))) | 1697 | (or toplev (nth 4 decl-or-cast)))) |
| 1685 | 1698 | ||
| 1686 | (t t)))) | 1699 | (t t))))) |
| 1687 | 1700 | ||
| 1688 | ;; It was a false alarm. Check if we're in a label (or other | 1701 | ;; It was a false alarm. Check if we're in a label (or other |
| 1689 | ;; construct with `:' except bitfield) instead. | 1702 | ;; construct with `:' except bitfield) instead. |
| @@ -1713,6 +1726,28 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 1713 | 1726 | ||
| 1714 | nil)))) | 1727 | nil)))) |
| 1715 | 1728 | ||
| 1729 | (defun c-font-lock-c11-generic-clause () | ||
| 1730 | ;; Fontify a type inside the C11 _Generic clause. Point will be at the | ||
| 1731 | ;; type and will be left at the next comma of the clause (if any) or the | ||
| 1732 | ;; closing parenthesis, if any, or at the end of the type, otherwise. | ||
| 1733 | ;; The return value is always nil. | ||
| 1734 | (c-fontify-types-and-refs | ||
| 1735 | ((here (point)) | ||
| 1736 | (type-type (c-forward-type t)) | ||
| 1737 | (c-promote-possible-types (if (eq type-type 'maybe) 'just-one t)) | ||
| 1738 | (pos (point)) pos1) | ||
| 1739 | (when (and type-type (eq (char-after) ?:)) | ||
| 1740 | (goto-char here) | ||
| 1741 | (c-forward-type t)) ; Fontify the type. | ||
| 1742 | (cond | ||
| 1743 | ((c-syntactic-re-search-forward "," nil t t t) | ||
| 1744 | (backward-char)) | ||
| 1745 | ((and (setq pos1 (c-up-list-forward)) | ||
| 1746 | (eq (char-before pos1) ?\))) | ||
| 1747 | (goto-char (1- pos1))) | ||
| 1748 | (t (goto-char pos)))) | ||
| 1749 | nil) | ||
| 1750 | |||
| 1716 | (defun c-font-lock-enum-body (limit) | 1751 | (defun c-font-lock-enum-body (limit) |
| 1717 | ;; Fontify the identifiers of each enum we find by searching forward. | 1752 | ;; Fontify the identifiers of each enum we find by searching forward. |
| 1718 | ;; | 1753 | ;; |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index daa23bd14fa..61f81f09b3e 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -3085,6 +3085,17 @@ Keywords here should also be in `c-block-stmt-1-kwds'." | |||
| 3085 | t (c-make-keywords-re t (c-lang-const c-block-stmt-2-kwds))) | 3085 | t (c-make-keywords-re t (c-lang-const c-block-stmt-2-kwds))) |
| 3086 | (c-lang-defvar c-block-stmt-2-key (c-lang-const c-block-stmt-2-key)) | 3086 | (c-lang-defvar c-block-stmt-2-key (c-lang-const c-block-stmt-2-key)) |
| 3087 | 3087 | ||
| 3088 | (c-lang-defconst c-generic-kwds | ||
| 3089 | "The keyword \"_Generic\" which introduces a C11 generic statement." | ||
| 3090 | t nil | ||
| 3091 | c '("_Generic")) | ||
| 3092 | |||
| 3093 | (c-lang-defconst c-generic-key | ||
| 3094 | ;; Regexp matching the keyword(s) in `c-generic-kwds'. | ||
| 3095 | t (if (c-lang-const c-generic-kwds) | ||
| 3096 | (c-make-keywords-re t (c-lang-const c-generic-kwds)))) | ||
| 3097 | (c-lang-defvar c-generic-key (c-lang-const c-generic-key)) | ||
| 3098 | |||
| 3088 | (c-lang-defconst c-block-stmt-kwds | 3099 | (c-lang-defconst c-block-stmt-kwds |
| 3089 | ;; Union of `c-block-stmt-1-kwds' and `c-block-stmt-2-kwds'. | 3100 | ;; Union of `c-block-stmt-1-kwds' and `c-block-stmt-2-kwds'. |
| 3090 | t (c--delete-duplicates (append (c-lang-const c-block-stmt-1-kwds) | 3101 | t (c--delete-duplicates (append (c-lang-const c-block-stmt-1-kwds) |
diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index b844955e1be..c5e7b8f4bc6 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el | |||
| @@ -53,13 +53,28 @@ | |||
| 53 | :parent emacs-news-common-map | 53 | :parent emacs-news-common-map |
| 54 | "C-c C-s" #'emacs-news-next-untagged-entry | 54 | "C-c C-s" #'emacs-news-next-untagged-entry |
| 55 | "C-c C-r" #'emacs-news-previous-untagged-entry | 55 | "C-c C-r" #'emacs-news-previous-untagged-entry |
| 56 | "C-c C-t" #'emacs-news-toggle-tag | 56 | "C-c C-t" #'emacs-news-cycle-tag |
| 57 | "C-c C-d" #'emacs-news-delete-temporary-markers | ||
| 57 | "C-c C-g" #'emacs-news-goto-section | 58 | "C-c C-g" #'emacs-news-goto-section |
| 58 | "C-c C-j" #'emacs-news-find-heading | 59 | "C-c C-j" #'emacs-news-find-heading |
| 59 | "C-c C-e" #'emacs-news-count-untagged-entries | 60 | "C-c C-e" #'emacs-news-count-untagged-entries |
| 60 | "C-x C-q" #'emacs-news-view-mode | 61 | "C-x C-q" #'emacs-news-view-mode |
| 61 | "<remap> <open-line>" #'emacs-news-open-line) | 62 | "<remap> <open-line>" #'emacs-news-open-line) |
| 62 | 63 | ||
| 64 | (easy-menu-define emacs-news-mode-menu emacs-news-mode-map | ||
| 65 | "Menu for `emacs-news-mode'." | ||
| 66 | '("News" | ||
| 67 | ["Next Untagged" emacs-news-next-untagged-entry :help "Go to next untagged entry"] | ||
| 68 | ["Previous Untagged" emacs-news-previous-untagged-entry :help "Go to previous untagged entry"] | ||
| 69 | ["Count Untagged" emacs-news-count-untagged-entries :help "Count the number of untagged entries"] | ||
| 70 | ["Cycle Tag" emacs-news-cycle-tag :help "Cycle documentation tag of current entry"] | ||
| 71 | ["Delete Tags" emacs-news-delete-temporary-markers :help "Delete all documentation tags in buffer"] | ||
| 72 | "--" | ||
| 73 | ["Goto Section" emacs-news-goto-section :help "Prompt for section and go to it"] | ||
| 74 | ["Goto Heading" emacs-news-find-heading :help "Prompt for heading and go to it"] | ||
| 75 | "--" | ||
| 76 | ["Enter View Mode" emacs-news-view-mode :help "Enter view-only mode"])) | ||
| 77 | |||
| 63 | (defvar emacs-news-view-mode-map | 78 | (defvar emacs-news-view-mode-map |
| 64 | ;; This is defined this way instead of inheriting because we're | 79 | ;; This is defined this way instead of inheriting because we're |
| 65 | ;; deriving the mode from `special-mode' and want the keys from there. | 80 | ;; deriving the mode from `special-mode' and want the keys from there. |
| @@ -173,8 +188,8 @@ untagged NEWS entry." | |||
| 173 | (interactive nil emacs-news-mode) | 188 | (interactive nil emacs-news-mode) |
| 174 | (emacs-news-next-untagged-entry t)) | 189 | (emacs-news-next-untagged-entry t)) |
| 175 | 190 | ||
| 176 | (defun emacs-news-toggle-tag () | 191 | (defun emacs-news-cycle-tag () |
| 177 | "Toggle documentation tag of current headline in the Emacs NEWS file." | 192 | "Cycle documentation tag of current headline in the Emacs NEWS file." |
| 178 | (interactive nil emacs-news-mode) | 193 | (interactive nil emacs-news-mode) |
| 179 | (save-excursion | 194 | (save-excursion |
| 180 | (goto-char (line-beginning-position)) | 195 | (goto-char (line-beginning-position)) |
| @@ -191,7 +206,7 @@ untagged NEWS entry." | |||
| 191 | (insert "+++")) | 206 | (insert "+++")) |
| 192 | ((looking-at (rx bol "+++" eol)) | 207 | ((looking-at (rx bol "+++" eol)) |
| 193 | (delete-char 4)) | 208 | (delete-char 4)) |
| 194 | (t (user-error "Invalid headline tag; can't toggle"))))) | 209 | (t (user-error "Invalid headline tag; can't cycle"))))) |
| 195 | 210 | ||
| 196 | (defun emacs-news-count-untagged-entries () | 211 | (defun emacs-news-count-untagged-entries () |
| 197 | "Say how many untagged entries there are in the current NEWS buffer." | 212 | "Say how many untagged entries there are in the current NEWS buffer." |
diff --git a/lisp/time.el b/lisp/time.el index f04a22dfd28..030aef9d49b 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -139,6 +139,11 @@ make the mail indicator stand out on a color display." | |||
| 139 | :version "22.1" | 139 | :version "22.1" |
| 140 | :type '(choice (const :tag "None" nil) face)) | 140 | :type '(choice (const :tag "None" nil) face)) |
| 141 | 141 | ||
| 142 | (defface display-time-time-and-date-indicator nil | ||
| 143 | "Face for `display-time-format'." | ||
| 144 | :group 'mode-line-faces | ||
| 145 | :version "30.1") | ||
| 146 | |||
| 142 | (defvar display-time-mail-icon | 147 | (defvar display-time-mail-icon |
| 143 | (find-image '((:type xpm :file "letter.xpm" :ascent center) | 148 | (find-image '((:type xpm :file "letter.xpm" :ascent center) |
| 144 | (:type pbm :file "letter.pbm" :ascent center))) | 149 | (:type pbm :file "letter.pbm" :ascent center))) |
| @@ -179,6 +184,7 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'." | |||
| 179 | (format-time-string (or display-time-format | 184 | (format-time-string (or display-time-format |
| 180 | (if display-time-24hr-format "%H:%M" "%-I:%M%p")) | 185 | (if display-time-24hr-format "%H:%M" "%-I:%M%p")) |
| 181 | now) | 186 | now) |
| 187 | 'face 'display-time-time-and-date-indicator | ||
| 182 | 'help-echo (format-time-string "%a %b %e, %Y" now)) | 188 | 'help-echo (format-time-string "%a %b %e, %Y" now)) |
| 183 | load | 189 | load |
| 184 | (if mail | 190 | (if mail |
diff --git a/test/lisp/textmodes/emacs-news-mode-resources/toggle-tag.erts b/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts index 63c3b1b7d8a..63c3b1b7d8a 100644 --- a/test/lisp/textmodes/emacs-news-mode-resources/toggle-tag.erts +++ b/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts | |||
diff --git a/test/lisp/textmodes/emacs-news-mode-tests.el b/test/lisp/textmodes/emacs-news-mode-tests.el index e1152265a45..676a3270da6 100644 --- a/test/lisp/textmodes/emacs-news-mode-tests.el +++ b/test/lisp/textmodes/emacs-news-mode-tests.el | |||
| @@ -23,10 +23,10 @@ | |||
| 23 | (require 'ert-x) | 23 | (require 'ert-x) |
| 24 | (require 'emacs-news-mode) | 24 | (require 'emacs-news-mode) |
| 25 | 25 | ||
| 26 | (ert-deftest emacs-news-toggle-tag () | 26 | (ert-deftest emacs-news-cycle-tag () |
| 27 | (ert-test-erts-file (ert-resource-file "toggle-tag.erts") | 27 | (ert-test-erts-file (ert-resource-file "cycle-tag.erts") |
| 28 | (lambda () | 28 | (lambda () |
| 29 | (emacs-news-mode) | 29 | (emacs-news-mode) |
| 30 | (emacs-news-toggle-tag)))) | 30 | (emacs-news-cycle-tag)))) |
| 31 | 31 | ||
| 32 | ;;; emacs-news-mode-tests.el ends here | 32 | ;;; emacs-news-mode-tests.el ends here |