]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename 'emacs-news-toggle-tag' to 'emacs-news-cycle-tag'
authorRobert Pluim <rpluim@gmail.com>
Thu, 16 Feb 2023 12:04:53 +0000 (13:04 +0100)
committerRobert Pluim <rpluim@gmail.com>
Thu, 16 Feb 2023 12:07:48 +0000 (13:07 +0100)
* lisp/textmodes/emacs-news-mode.el (emacs-news-cycle-tag): Renamed
from 'emacs-news-toggle-tag'.
(emacs-news-mode-map, emacs-news-mode-menu): Use new name.
* test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts:
Renamed from "toggle-tag.erts".
* test/lisp/textmodes/emacs-news-mode-tests.el (emacs-news-cycle-tag):
Rename test from 'emacs-news-toggle-tag', and call
'emacs-news-cycle-tag' with new resource file name.

lisp/textmodes/emacs-news-mode.el
test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts [new file with mode: 0644]
test/lisp/textmodes/emacs-news-mode-resources/toggle-tag.erts [deleted file]
test/lisp/textmodes/emacs-news-mode-tests.el

index c6efb4fe7cab956036a00ee04505c40093d32282..c5e7b8f4bc6ed17a7e443d7c49936b4b742f15fe 100644 (file)
@@ -53,7 +53,7 @@
   :parent emacs-news-common-map
   "C-c C-s" #'emacs-news-next-untagged-entry
   "C-c C-r" #'emacs-news-previous-untagged-entry
-  "C-c C-t" #'emacs-news-toggle-tag
+  "C-c C-t" #'emacs-news-cycle-tag
   "C-c C-d" #'emacs-news-delete-temporary-markers
   "C-c C-g" #'emacs-news-goto-section
   "C-c C-j" #'emacs-news-find-heading
@@ -67,7 +67,7 @@
     ["Next Untagged" emacs-news-next-untagged-entry :help "Go to next untagged entry"]
     ["Previous Untagged" emacs-news-previous-untagged-entry :help "Go to previous untagged entry"]
     ["Count Untagged" emacs-news-count-untagged-entries :help "Count the number of untagged entries"]
-    ["Toggle Tag" emacs-news-toggle-tag :help "Toggle documentation tag of current entry"]
+    ["Cycle Tag" emacs-news-cycle-tag :help "Cycle documentation tag of current entry"]
     ["Delete Tags" emacs-news-delete-temporary-markers :help "Delete all documentation tags in buffer"]
     "--"
     ["Goto Section" emacs-news-goto-section :help "Prompt for section and go to it"]
@@ -188,8 +188,8 @@ untagged NEWS entry."
   (interactive nil emacs-news-mode)
   (emacs-news-next-untagged-entry t))
 
-(defun emacs-news-toggle-tag ()
-  "Toggle documentation tag of current headline in the Emacs NEWS file."
+(defun emacs-news-cycle-tag ()
+  "Cycle documentation tag of current headline in the Emacs NEWS file."
   (interactive nil emacs-news-mode)
   (save-excursion
     (goto-char (line-beginning-position))
@@ -206,7 +206,7 @@ untagged NEWS entry."
            (insert "+++"))
           ((looking-at (rx bol "+++" eol))
            (delete-char 4))
-          (t (user-error "Invalid headline tag; can't toggle")))))
+          (t (user-error "Invalid headline tag; can't cycle")))))
 
 (defun emacs-news-count-untagged-entries ()
   "Say how many untagged entries there are in the current NEWS buffer."
diff --git a/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts b/test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts
new file mode 100644 (file)
index 0000000..63c3b1b
--- /dev/null
@@ -0,0 +1,131 @@
+Name: tag1
+Point-Char: |
+
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+|Before, that binding was only available with 'dired-x'.
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+---
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+|Before, that binding was only available with 'dired-x'.
+=-=-=
+
+Name: tag2
+Point-Char: |
+
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+---
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+|Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
++++
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+|Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=-=
+
+Name: tag3
+Point-Char: |
+
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
++++
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+|Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+|Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=-=
+
+Name: tag4-point-at-headline
+Point-Char: |
+
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+|*** 'M-G' is now bound to 'dired-goto-subdir'.
+Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+---
+|*** 'M-G' is now bound to 'dired-goto-subdir'.
+Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=-=
+
+Name: tag5-point-at-tag
+Point-Char: |
+
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+|---
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+|+++
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=-=
+
+Name: tag6-point-at-tag
+Point-Char: |
+
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+|+++
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=
++++
+*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
+The corresponding key "% Y" is now bound by default in Dired.
+
+|*** 'M-G' is now bound to 'dired-goto-subdir'.
+Before, that binding was only available if the 'dired-x' package was
+loaded.
+=-=-=
diff --git a/test/lisp/textmodes/emacs-news-mode-resources/toggle-tag.erts b/test/lisp/textmodes/emacs-news-mode-resources/toggle-tag.erts
deleted file mode 100644 (file)
index 63c3b1b..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-Name: tag1
-Point-Char: |
-
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-|Before, that binding was only available with 'dired-x'.
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
----
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-|Before, that binding was only available with 'dired-x'.
-=-=-=
-
-Name: tag2
-Point-Char: |
-
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
----
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-|Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-+++
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-|Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=-=
-
-Name: tag3
-Point-Char: |
-
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-+++
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-|Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-|Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=-=
-
-Name: tag4-point-at-headline
-Point-Char: |
-
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-|*** 'M-G' is now bound to 'dired-goto-subdir'.
-Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
----
-|*** 'M-G' is now bound to 'dired-goto-subdir'.
-Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=-=
-
-Name: tag5-point-at-tag
-Point-Char: |
-
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-|---
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-|+++
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=-=
-
-Name: tag6-point-at-tag
-Point-Char: |
-
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-|+++
-*** 'M-G' is now bound to 'dired-goto-subdir'.
-Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=
-+++
-*** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key "% Y" is now bound by default in Dired.
-
-|*** 'M-G' is now bound to 'dired-goto-subdir'.
-Before, that binding was only available if the 'dired-x' package was
-loaded.
-=-=-=
index e1152265a45f47cae8d733d171f646bc0514ad3a..676a3270da61d3b58b19af83f8210b1147c1a592 100644 (file)
 (require 'ert-x)
 (require 'emacs-news-mode)
 
-(ert-deftest emacs-news-toggle-tag ()
-  (ert-test-erts-file (ert-resource-file "toggle-tag.erts")
+(ert-deftest emacs-news-cycle-tag ()
+  (ert-test-erts-file (ert-resource-file "cycle-tag.erts")
                       (lambda ()
                         (emacs-news-mode)
-                        (emacs-news-toggle-tag))))
+                        (emacs-news-cycle-tag))))
 
 ;;; emacs-news-mode-tests.el ends here