[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sass-mode c5de02d 22/31: Use cl-lib for consistent destruc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sass-mode c5de02d 22/31: Use cl-lib for consistent destructuring-bind etc. |
Date: |
Sun, 29 Aug 2021 11:29:40 -0400 (EDT) |
branch: elpa/sass-mode
commit c5de02d5bca3ae538373e61b01457f9a3baa40fc
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>
Use cl-lib for consistent destructuring-bind etc.
See #17
---
sass-mode.el | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/sass-mode.el b/sass-mode.el
index c1e89a5..64ac795 100644
--- a/sass-mode.el
+++ b/sass-mode.el
@@ -8,7 +8,7 @@
;; Created: 2007-03-15
;; By: Nathan Weizenbaum
;; Keywords: markup, language, css
-;; Package-Requires: ((haml-mode "3.0.15"))
+;; Package-Requires: ((haml-mode "3.0.15") (cl-lib "0.5"))
;;; Commentary:
@@ -26,6 +26,7 @@
;;; Code:
(require 'haml-mode)
+(require 'cl-lib)
;; User definable variables
@@ -117,7 +118,8 @@ LIMIT is the limit of the search."
(when (re-search-forward "^ *\\(.+\\)$" limit t)
(goto-char (match-beginning 1))
(dolist (keyword sass-line-keywords)
- (destructuring-bind (keyword subexp-or-fn &optional face fn) keyword
+ (cl-destructuring-bind
+ (keyword subexp-or-fn &optional face fn) keyword
(when (looking-at keyword)
(if (integerp subexp-or-fn)
(put-text-property (match-beginning subexp-or-fn)
@@ -126,7 +128,7 @@ LIMIT is the limit of the search."
(setq fn subexp-or-fn))
(when fn (funcall fn))
(end-of-line)
- (return t)))))))
+ (cl-return t)))))))
(defun sass-highlight-selector ()
"Highlight a CSS selector starting at `point' and ending at `end-of-line'."
@@ -153,14 +155,14 @@ LIMIT is the limit of the search."
(defun sass-highlight-directive ()
"Highlight a Sass directive."
(goto-char (match-end 0))
- (block nil
- (case (intern (match-string 1))
+ (cl-block nil
+ (cl-case (intern (match-string 1))
(for
- (unless (looking-at " +!\\w+") (return))
+ (unless (looking-at " +!\\w+") (cl-return))
(put-text-property (match-beginning 0) (match-end 0)
'face font-lock-variable-name-face)
(goto-char (match-end 0))
- (unless (looking-at " +from") (return))
+ (unless (looking-at " +from") (cl-return))
(put-text-property (match-beginning 0) (match-end 0)
'face font-lock-keyword-face)
(goto-char (match-end 0))
@@ -171,7 +173,7 @@ LIMIT is the limit of the search."
(sass-highlight-script-after-match))
(else
- (unless (looking-at " +if") (return))
+ (unless (looking-at " +if") (cl-return))
(put-text-property (match-beginning 0) (match-end 0)
'face font-lock-keyword-face)
(sass-highlight-script-after-match))
@@ -207,9 +209,9 @@ LIMIT is the limit of the search."
(defun sass-indent-p ()
"Return non-nil if the current line can have lines nested beneath it."
- (loop for opener in sass-non-block-openers
- if (looking-at opener) return nil
- finally return t))
+ (cl-loop for opener in sass-non-block-openers
+ if (looking-at opener) return nil
+ finally return t))
;; Command
- [nongnu] branch elpa/sass-mode created (now 247a0d4), ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 1bcaf92 02/31: Add a note about haml-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 242b0ea 07/31: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 26dff5f 12/31: Merge pull request #12 from purcell/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 8190f29 15/31: Better version of sass-output-region (see #1), ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 28dd06b 14/31: Merge remote-tracking branch 'refs/remotes/nex3/pr/1', ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode c5de02d 22/31: Use cl-lib for consistent destructuring-bind etc.,
ELPA Syncer <=
- [nongnu] elpa/sass-mode b676b2d 03/31: Make variables buffer-local before setting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 30f6132 09/31: added missing ' in auto-mode-alisp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode bf846d6 13/31: Merge pull request #11 from gramos/fix_auto-mode-alist_pattern, ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 0c54866 16/31: Make comments toggleable with M-;, ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode aee28ea 18/31: Bump version to 3.0.16, ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 5d69d5f 06/31: Update .gitignore., ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode fcee43b 01/31: Get rid of haml-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 3930ddc 05/31: add sass-output-region() and sass-output-buffer(), ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode 9d05841 08/31: auto-mode-alisp patter should ends with \\ is better, ELPA Syncer, 2021/08/29
- [nongnu] elpa/sass-mode d19542f 20/31: Don't override the syntax classes for "-" and "_", ELPA Syncer, 2021/08/29