Browse Source

Fix some `cl-case' uses

* lisp/org-capture.el (org-capture-finalize):
* lisp/org-timer.el (org-timer-set-mode-line): Symbols need not be
  quoted in `cl-case'.
Nicolas Goaziou 3 years ago
parent
commit
2e4b66f5f5
2 changed files with 41 additions and 40 deletions
  1. 5 4
      lisp/org-capture.el
  2. 36 36
      lisp/org-timer.el

+ 5 - 4
lisp/org-capture.el

@@ -800,10 +800,11 @@ captured item after finalizing."
     (cond
      (abort-note
       (cl-case abort-note
-       ('clean
-	(message "Capture process aborted and target buffer cleaned up"))
-       ('dirty
-	(error "Capture process aborted, but target buffer could not be cleaned up correctly"))))
+	(clean
+	 (message "Capture process aborted and target buffer cleaned up"))
+	(dirty
+	 (error "Capture process aborted, but target buffer could not be \
+cleaned up correctly"))))
      (stay-with-capture
       (org-capture-goto-last-stored)))
     ;; Return if we did store something

+ 36 - 36
lisp/org-timer.el

@@ -344,42 +344,42 @@ VALUE can be `on', `off', or `paused'."
 	(setq frame-title-format
 	      (append frame-title-format '(org-timer-mode-line-string)))))
   (cl-case value
-   ('off
-    (when org-timer-mode-line-timer
-      (cancel-timer org-timer-mode-line-timer)
-      (setq org-timer-mode-line-timer nil))
-    (when (or (eq org-timer-display 'mode-line)
-	      (eq org-timer-display 'both))
-      (setq global-mode-string
-	    (delq 'org-timer-mode-line-string global-mode-string)))
-    (when (or (eq org-timer-display 'frame-title)
-	      (eq org-timer-display 'both))
-      (setq frame-title-format
-	    (delq 'org-timer-mode-line-string frame-title-format)))
-    (force-mode-line-update))
-   ('paused
-    (when org-timer-mode-line-timer
-      (cancel-timer org-timer-mode-line-timer)
-      (setq org-timer-mode-line-timer nil)))
-   ('on
-    (when (or (eq org-timer-display 'mode-line)
-	      (eq org-timer-display 'both))
-      (or global-mode-string (setq global-mode-string '("")))
-      (or (memq 'org-timer-mode-line-string global-mode-string)
-	  (setq global-mode-string
-		(append global-mode-string '(org-timer-mode-line-string)))))
-    (when (or (eq org-timer-display 'frame-title)
-	      (eq org-timer-display 'both))
-      (or (memq 'org-timer-mode-line-string frame-title-format)
-	  (setq frame-title-format
-		(append frame-title-format '(org-timer-mode-line-string)))))
-    (org-timer-update-mode-line)
-    (when org-timer-mode-line-timer
-      (cancel-timer org-timer-mode-line-timer)
-      (setq org-timer-mode-line-timer nil))
-    (when org-timer-display
-      (setq org-timer-mode-line-timer
-	    (run-with-timer 1 1 'org-timer-update-mode-line))))))
+    (off
+     (when org-timer-mode-line-timer
+       (cancel-timer org-timer-mode-line-timer)
+       (setq org-timer-mode-line-timer nil))
+     (when (or (eq org-timer-display 'mode-line)
+	       (eq org-timer-display 'both))
+       (setq global-mode-string
+	     (delq 'org-timer-mode-line-string global-mode-string)))
+     (when (or (eq org-timer-display 'frame-title)
+	       (eq org-timer-display 'both))
+       (setq frame-title-format
+	     (delq 'org-timer-mode-line-string frame-title-format)))
+     (force-mode-line-update))
+    (paused
+     (when org-timer-mode-line-timer
+       (cancel-timer org-timer-mode-line-timer)
+       (setq org-timer-mode-line-timer nil)))
+    (on
+     (when (or (eq org-timer-display 'mode-line)
+	       (eq org-timer-display 'both))
+       (or global-mode-string (setq global-mode-string '("")))
+       (or (memq 'org-timer-mode-line-string global-mode-string)
+	   (setq global-mode-string
+		 (append global-mode-string '(org-timer-mode-line-string)))))
+     (when (or (eq org-timer-display 'frame-title)
+	       (eq org-timer-display 'both))
+       (or (memq 'org-timer-mode-line-string frame-title-format)
+	   (setq frame-title-format
+		 (append frame-title-format '(org-timer-mode-line-string)))))
+     (org-timer-update-mode-line)
+     (when org-timer-mode-line-timer
+       (cancel-timer org-timer-mode-line-timer)
+       (setq org-timer-mode-line-timer nil))
+     (when org-timer-display
+       (setq org-timer-mode-line-timer
+	     (run-with-timer 1 1 'org-timer-update-mode-line))))))
 
 (defun org-timer-update-mode-line ()
   "Update the timer time in the mode line."