branch: elpa/haskell-tng-mode commit a98dda0705196905ddb902f0a9bc17f384f3b0a8 Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
emacs 27 macro deprecations --- haskell-tng-hsinspect.el | 10 +++++----- haskell-tng-layout.el | 12 ++++++------ haskell-tng-syntax.el | 2 +- haskell-tng-util.el | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el index 089c041..ac9f645 100644 --- a/haskell-tng-hsinspect.el +++ b/haskell-tng-hsinspect.el @@ -15,7 +15,7 @@ ;; with pre-canned data. (eval-when-compile - (require 'cl)) + (require 'cl-macs)) (require 'array) (require 'dired) @@ -274,7 +274,7 @@ Respects the `C-u' cache invalidation convention." (defun haskell-tng--hsinspect-check-fqn-import (index module sym) "Checks if an FQN exists" - (block nested + (cl-block nested (cl-loop for pkg-entry in index do @@ -291,7 +291,7 @@ Respects the `C-u' cache invalidation convention." ((or 'id 'con 'pat) name) ('tycon type)))) (when (equal sym id) - (return-from nested + (cl-return-from nested `(,(alist-get 'srcid pkg-entry)))))))))) (defun haskell-tng--hsinspect-return-type (type) @@ -320,7 +320,7 @@ Respects the `C-u' cache invalidation convention." nil if nothing was found. If SRCID is nil then the first matching MODULE is used." - (block nested + (cl-block nested (cl-loop for pkg-entry in index when (or (null srcid) (equal srcid (alist-get 'srcid pkg-entry))) @@ -329,7 +329,7 @@ If SRCID is nil then the first matching MODULE is used." for module-entry in (alist-get 'modules pkg-entry) when (equal module (alist-get 'module module-entry)) do - (return-from nested (cons pkg-entry module-entry)))))) + (cl-return-from nested (cons pkg-entry module-entry)))))) (defun haskell-tng--hsinspect-follow (index srcid module name) "Follow re-exports of MODULE to find where it was originally defined. diff --git a/haskell-tng-layout.el b/haskell-tng-layout.el index fbfaa3e..afbba49 100644 --- a/haskell-tng-layout.el +++ b/haskell-tng-layout.el @@ -28,7 +28,7 @@ ;; or deleted regions. Would give fast lookup at point. (eval-when-compile - (require 'cl)) + (require 'cl-macs)) (require 'haskell-tng-util) @@ -173,7 +173,7 @@ using a cache if available." value))))) (defun haskell-tng--layout-next-wldo (limit) - (block wldo + (cl-block wldo (while (< (point) limit) (forward-comment limit) (cond @@ -184,7 +184,7 @@ using a cache if available." (goto-char (match-end 0)) (forward-comment limit) (unless (looking-at "{") - (return-from wldo + (cl-return-from wldo (haskell-tng--layout-wldo (min (or (haskell-tng--util-paren-close) (point-max)) limit))))) @@ -201,7 +201,7 @@ WLDO that is using the offside rule." (let* ((open (point)) seps (level (current-column)) - (close (block closed + (close (cl-block closed (while (< (point) limit) (forward-line) (forward-comment limit) @@ -211,9 +211,9 @@ WLDO that is using the offside rule." (rx bol (or "," ")" "]" "}"))))) (push (point) seps)) (when (<= limit (point)) - (return-from closed limit)) + (cl-return-from closed limit)) (when (< (current-column) level) - (return-from closed (point)))) + (cl-return-from closed (point)))) limit))) `(,open . (,close . ,(reverse seps)))))) diff --git a/haskell-tng-syntax.el b/haskell-tng-syntax.el index a2c35df..2caa511 100644 --- a/haskell-tng-syntax.el +++ b/haskell-tng-syntax.el @@ -23,7 +23,7 @@ (lambda (k v) ;; reset the (surprisingly numerous) defaults (let ((class (syntax-class v))) - (when (seq-contains '(1 4 5 6 9) class) + (when (seq-contains-p '(1 4 5 6 9) class) (modify-syntax-entry k "_" table)))) (char-table-parent table)) diff --git a/haskell-tng-util.el b/haskell-tng-util.el index 48c4ba3..e6b277b 100644 --- a/haskell-tng-util.el +++ b/haskell-tng-util.el @@ -12,7 +12,7 @@ ;; TODO move things to single use sites (twas premature abstraction!) (eval-when-compile - (require 'cl)) + (require 'cl-macs)) (require 'subr-x) (require 'xdg) @@ -32,10 +32,10 @@ (save-excursion (goto-char (or pos (point))) (let ((level (current-column))) - (block closed + (cl-block closed (while (and (forward-line) (not (eobp))) (when (<= (current-indentation) level) - (return-from closed (point)))))))) + (cl-return-from closed (point)))))))) (defun haskell-tng--util-type-ender (&optional pos) ;; trivial, should just be called as an inline regexp