Convert `case' to `cl-case' to fix cl-lib related errors

Broken since PR #13059
This commit is contained in:
Nikita Leshenko 2019-12-18 10:58:56 +02:00 committed by duianto
parent 6f029cc057
commit aaa11a6823
6 changed files with 8 additions and 6 deletions

View File

@ -532,6 +532,8 @@ Other:
- Converted obsolete =cl= to =cl-lib= (thanks to kimr)
- Removed uses of =lexical-let=, part of the deprecated =cl= package
(thanks to Spenser Truex)
- Converted =case= to =cl-case= to fix =cl-lib= related errors
(thanks to Nikita Leshenko)
- Fixes:
- Avoid non-idempotent use of push in init code (thanks to Miciah Masters)
- Moved Spacemacs startup progress bar to =core-progress-bar.el=, removed

View File

@ -212,7 +212,7 @@
company-box-doc-enable nil)
(add-hook 'company-box-selection-hook
(lambda (selection frame) (company-box-doc--hide frame)))
(case auto-completion-enable-help-tooltip
(cl-case auto-completion-enable-help-tooltip
('manual (define-key company-active-map
(kbd "M-h") #'company-box-doc-manually))
('t (setq company-box-doc-enable t))))))

View File

@ -337,7 +337,7 @@ To prevent this error we just wrap `describe-mode' to defeat the
(user-error "C-c C-c can do nothing useful at this location"))
(let* ((context (org-element-context))
(type (org-element-type context)))
(case type
(cl-case type
;; When at a link, act according to the parent instead.
(link (setq context (org-element-property :parent context))
(setq type (org-element-type context)))
@ -359,7 +359,7 @@ To prevent this error we just wrap `describe-mode' to defeat the
(setq context parent type 'item))))
;; Act according to type of element or object at point.
(case type
(cl-case type
((headline inlinetask)
(save-excursion (goto-char (org-element-property :begin context))
(call-interactively 'counsel-org-tag)) t)))))

View File

@ -34,7 +34,7 @@
(setq allowed-values '(super meta hyper control alt none left))
;; Backwards compatibility
(case osx-use-option-as-meta
(cl-case osx-use-option-as-meta
('nil (setf osx-option-as 'none))
(deprecated nil)
(t (setf osx-option-as 'meta)))

View File

@ -755,7 +755,7 @@ If the variable `dotspacemacs-new-empty-buffer-major-mode' has been set,
then apply that major mode to the new buffer."
(interactive)
(let ((newbuf (generate-new-buffer "untitled")))
(case split
(cl-case split
('left (split-window-horizontally))
('below (spacemacs/split-window-vertically-and-switch))
('above (split-window-vertically))

View File

@ -44,7 +44,7 @@
(defun spacemacs/default-pop-shell ()
"Open the default shell in a popup."
(interactive)
(let ((shell (case shell-default-shell
(let ((shell (cl-case shell-default-shell
('multi-term 'multiterm)
('shell 'inferior-shell)
(t shell-default-shell))))