[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3f771f7 419/433: Use cl-lib instead of cl
From: |
Dmitry Gutov |
Subject: |
[elpa] master 3f771f7 419/433: Use cl-lib instead of cl |
Date: |
Thu, 15 Mar 2018 19:44:47 -0400 (EDT) |
branch: master
commit 3f771f74ab0099ed1a997d0785ed97f2a63701ca
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Use cl-lib instead of cl
---
NEWS | 4 ++++
mmm-auto.el | 1 -
mmm-class.el | 26 +++++++++++++-------------
mmm-cmds.el | 30 +++++++++++++++---------------
mmm-compat.el | 2 --
mmm-erb.el | 14 +++++++-------
mmm-mode.el | 8 ++++----
mmm-noweb.el | 6 +++---
mmm-region.el | 38 +++++++++++++++++++-------------------
mmm-sample.el | 12 ++++++------
mmm-utils.el | 2 --
mmm-vars.el | 14 +++++++-------
12 files changed, 78 insertions(+), 79 deletions(-)
diff --git a/NEWS b/NEWS
index 3659710..41e1d51 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,10 @@ Introduced mode transition hooks, like mmm-x-enter-hook and
mmm-y-exit-hook.
New function mmm-indent-line-narrowed, to use as mmm-indent-line-function.
+`cl-lib' is a new dependency, replacing `cl'. It comes bundled with
+recent versions of Emacs, and for older ones it can be installed from
+GNU ELPA.
+
* Changes in MMM Mode 0.5.4
diff --git a/mmm-auto.el b/mmm-auto.el
index 8ff532b..c013175 100644
--- a/mmm-auto.el
+++ b/mmm-auto.el
@@ -58,7 +58,6 @@
;;; Code:
-(require 'cl)
(require 'mmm-vars)
;;{{{ Autoload Submode Classes
diff --git a/mmm-class.el b/mmm-class.el
index a5b7920..7df9456 100644
--- a/mmm-class.el
+++ b/mmm-class.el
@@ -31,7 +31,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(require 'mmm-vars)
(require 'mmm-region)
@@ -71,7 +71,7 @@ Creates a new parameter if one is not present."
;;}}}
;;{{{ Apply Classes
-(defun* mmm-apply-class
+(cl-defun mmm-apply-class
(class &optional (start (point-min)) (stop (point-max)) face)
"Apply the submode class CLASS from START to STOP in FACE.
If FACE is nil, the face for CLASS is used, or the default face if
@@ -86,7 +86,7 @@ none is specified by CLASS."
;; Hack in case class hook sets mmm-buffer-mode-display-name etc.
(mmm-set-mode-line)))
-(defun* mmm-apply-classes
+(cl-defun mmm-apply-classes
(classes &key (start (point-min)) (stop (point-max)) face)
"Apply all submode classes in CLASSES, in order.
All classes are applied regardless of any errors that may occur in
@@ -99,14 +99,14 @@ error once all classes have been applied."
(mmm-invalid-submode-class
;; Save the name of the invalid class, so we can report them
;; all together at the end.
- (add-to-list 'invalid-classes (second err)))))
+ (add-to-list 'invalid-classes (cl-second err)))))
(when invalid-classes
(signal 'mmm-invalid-submode-class invalid-classes))))
;;}}}
;;{{{ Apply All Classes
-(defun* mmm-apply-all (&key (start (point-min)) (stop (point-max)))
+(cl-defun mmm-apply-all (&key (start (point-min)) (stop (point-max)))
"MMM-ify from START to STOP by all submode classes.
The classes come from mode/ext, `mmm-classes', `mmm-global-classes',
and interactive history."
@@ -122,7 +122,7 @@ and interactive history."
;;; BUFFER SCANNING
;;{{{ Scan for Regions
-(defun* mmm-ify
+(cl-defun mmm-ify
(&rest all &key classes handler
submode match-submode
(start (point-min)) (stop (point-max))
@@ -171,7 +171,7 @@ the rest of the arguments are for an actual class being
applied. See
(t
(mmm-save-all
(goto-char start)
- (loop for (beg end front-pos back-pos matched-front matched-back
+ (cl-loop for (beg end front-pos back-pos matched-front matched-back
matched-submode matched-face matched-name
invalid-resume ok-resume) =
(apply #'mmm-match-region :start (point) all)
@@ -204,7 +204,7 @@ the rest of the arguments are for an actual class being
applied. See
;;}}}
;;{{{ Match Regions
-(defun* mmm-match-region
+(cl-defun mmm-match-region
(&key start stop front back front-verify back-verify
front-delim back-delim
include-front include-back front-offset back-offset
@@ -232,9 +232,9 @@ and OK-RESUME if the region is valid."
(mmm-save-all
(funcall match-submode front-form))
(mmm-no-matching-submode
- (return-from
+ (cl-return-from
mmm-match-region
- (values beg nil nil nil nil nil nil nil nil
+ (cl-values beg nil nil nil nil nil nil nil nil
invalid-resume nil))))
nil))
(name (cond ((functionp match-name)
@@ -262,7 +262,7 @@ and OK-RESUME if the region is valid."
(ok-resume (if end-not-begin
(match-end back-match)
end)))
- (values beg end front-pos back-pos front-form back-form
+ (cl-values beg end front-pos back-pos front-form back-form
submode face name
invalid-resume ok-resume)))))))
@@ -297,8 +297,8 @@ unless POS is a regexp."
(looking-at "")) ; Set the match data
;; Strings are searched for as regexps.
((stringp pos)
- (loop always (re-search-forward pos stop 'limit)
- until (or (not verify) (mmm-save-all (funcall verify)))))
+ (cl-loop always (re-search-forward pos stop 'limit)
+ until (or (not verify) (mmm-save-all (funcall verify)))))
;; Otherwise it must be a function.
((functionp pos)
(funcall pos stop))))
diff --git a/mmm-cmds.el b/mmm-cmds.el
index b2670fa..cec8113 100644
--- a/mmm-cmds.el
+++ b/mmm-cmds.el
@@ -29,7 +29,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(require 'font-lock)
(require 'mmm-compat)
(require 'mmm-vars)
@@ -44,12 +44,12 @@
(list (intern
(completing-read
"Submode Class: "
- (remove-duplicates
- (mapcar #'(lambda (spec) (list (symbol-name (car spec))))
+ (cl-remove-duplicates
+ (mapcar (lambda (spec) (list (symbol-name (car spec))))
(append
- (remove-if #'(lambda (spec) (plist-get (cdr spec)
:private))
+ (cl-remove-if (lambda (spec) (plist-get (cdr spec)
:private))
mmm-classes-alist)
- (remove-if #'caddr mmm-autoloaded-classes)))
+ (cl-remove-if #'caddr mmm-autoloaded-classes)))
:test #'equal)
nil t))))
(unless (eq class (intern ""))
@@ -124,7 +124,7 @@ delimiter auto-insertion that MMM Mode provides. See, for
example,
`mmm-insert-region'."
(interactive "p")
(message "MMM-ifying block...")
- (destructuring-bind (start stop) (mmm-get-block lines)
+ (cl-destructuring-bind (start stop) (mmm-get-block lines)
(when (< start stop)
(mmm-apply-all :start start :stop stop)))
(message "MMM-ifying block...done"))
@@ -182,7 +182,7 @@ Use this command if a submode region's boundaries have
become wrong."
;;}}}
;;{{{ End Current Region
-(defun* mmm-end-current-region (&optional arg)
+(cl-defun mmm-end-current-region (&optional arg)
"End current submode region.
If ARG is nil, end it at the most appropriate place, usually its
current back boundary. If ARG is non-nil, end it at point. If the
@@ -202,7 +202,7 @@ entire job of this function."
(when (mmm-match-back ovl)
(if arg
(replace-match "")
- (return-from mmm-end-current-region)))))
+ (cl-return-from mmm-end-current-region)))))
(let ((back (overlay-get ovl 'back)))
(cond ((stringp back)
(save-excursion
@@ -249,9 +249,9 @@ prefix and modifiers) will insert a <%perl>...</%perl>
region."
(event (aref seq (1- (length seq))))
(mods (event-modifiers event))
(key (mmm-event-key event)))
- (if (subsetp mmm-insert-modifiers mods)
+ (if (cl-subsetp mmm-insert-modifiers mods)
(mmm-insert-by-key
- (append (set-difference mods mmm-insert-modifiers)
+ (append (cl-set-difference mods mmm-insert-modifiers)
key)
arg))))
@@ -265,7 +265,7 @@ KEY must be a list \(MODIFIERS... . BASIC-KEY) where
MODIFIERS are
symbols such as shift, control, etc. and BASIC-KEY is a character code
or a symbol such as tab, return, etc. Note that if there are no
MODIFIERS, the dotted list becomes simply BASIC-KEY."
- (multiple-value-bind (class skel str) (mmm-get-insertion-spec key)
+ (cl-multiple-value-bind (class skel str) (mmm-get-insertion-spec key)
(when skel
(let ((after-change-functions nil)
(old-undo buffer-undo-list) undo)
@@ -273,7 +273,7 @@ MODIFIERS, the dotted list becomes simply BASIC-KEY."
;; have to do it.
(if mmm-xemacs (setq skeleton-positions nil))
(skeleton-proxy-new skel str arg)
- (destructuring-bind (back end beg front) skeleton-positions
+ (cl-destructuring-bind (back end beg front) skeleton-positions
;; TODO: Find a way to trap invalid-parent signals from
;; make-region and undo the skeleton insertion.
(let ((match-submode (plist-get class :match-submode))
@@ -342,7 +342,7 @@ Return \(CLASS SKEL STR) where CLASS is the class spec a
match was
found in, SKEL is the skeleton to insert, and STR is the argument.
CLASSLIST defaults to the return value of `mmm-get-all-classes',
including global classes."
- (loop for classname in (or classlist (mmm-get-all-classes t))
+ (cl-loop for classname in (or classlist (mmm-get-all-classes t))
for class = (mmm-get-class-spec classname)
for inserts = (plist-get class :insert)
for skel = (cddr (assoc key inserts))
@@ -397,8 +397,8 @@ is a symbol naming the insertion."
"Return an alist of all currently available insertion keys.
Elements look like \(KEY NAME ...) where KEY is an insertion key and
NAME is a symbol naming the insertion."
- (remove-duplicates
- (loop for classname in (or classlist (mmm-get-all-classes t))
+ (cl-remove-duplicates
+ (cl-loop for classname in (or classlist (mmm-get-all-classes t))
for class = (mmm-get-class-spec classname)
append (plist-get class :insert) into keys
;; If we have a group class, recurse.
diff --git a/mmm-compat.el b/mmm-compat.el
index 5a4c4b3..d974a0f 100644
--- a/mmm-compat.el
+++ b/mmm-compat.el
@@ -32,8 +32,6 @@
;;; Code:
-(require 'cl)
-
;;{{{ Emacsen Detection
(defvar mmm-xemacs (featurep 'xemacs)
diff --git a/mmm-erb.el b/mmm-erb.el
index 502d9c8..44de1ce 100644
--- a/mmm-erb.el
+++ b/mmm-erb.el
@@ -57,7 +57,7 @@
;;; Code:
(require 'sgml-mode)
-(eval-when-compile (require 'cl))
+(require 'cl-lib)
(require 'mmm-vars)
(require 'mmm-region)
@@ -169,19 +169,19 @@
(regions (mmm-regions-in start here))
(n 0))
;; Collect indent modifier depending on type of tags.
- (loop for region in regions
+ (cl-loop for region in regions
for type = (mmm-erb-scan-region region)
when type do
(if (eq type 'close)
- (when (plusp n) (decf n))
- (incf n (if (eq type 'close) 0 1))))
+ (when (cl-plusp n) (cl-decf n))
+ (cl-incf n (if (eq type 'close) 0 1))))
(let ((eol (progn (goto-char here) (end-of-line 1) (point))))
;; Look for "else" and "end" instructions to adjust modifier.
;; If a block start instruction comes first, abort.
- (loop for region in (mmm-regions-in here eol)
+ (cl-loop for region in (mmm-regions-in here eol)
for type = (mmm-erb-scan-region region)
until (eq type 'open)
- when (memq type '(middle close)) do (decf n)))
+ when (memq type '(middle close)) do (cl-decf n)))
(goto-char here)
(funcall (mmm-erb-orig-indent-function mmm-primary-mode))
(let* ((indent (current-indentation))
@@ -190,7 +190,7 @@
(defun mmm-erb-scan-region (region)
(when region ; Can be nil if a line is empty, for example.
- (destructuring-bind (submode beg end ovl) region
+ (cl-destructuring-bind (submode beg end ovl) region
(let ((scan-fn (plist-get '(ruby-mode mmm-erb-scan-erb
js-mode mmm-erb-scan-ejs)
submode)))
diff --git a/mmm-mode.el b/mmm-mode.el
index 3015643..94a972f 100644
--- a/mmm-mode.el
+++ b/mmm-mode.el
@@ -70,11 +70,11 @@
;;; with more than four arguments, such as in `mmm-ify-by-regexp'.
;;; In general, while I have no qualms about using things from CL like
-;;; `mapl', `loop' and `destructuring-bind', I try not to use `defun*'
+;;; `cl-mapl', `cl-loop' and `cl-destructuring-bind', I try not to use
`cl-defun'
;;; more than I have to. For one, it sometimes makes bad documentation
;;; strings. Furthermore, to a `defun'ned function, a nil argument is
;;; the same as no argument, so it will use its (manual) default, but
-;;; to a `defun*'ned function, a nil argument *is* the argument, so
+;;; to a `cl-defun'ned function, a nil argument *is* the argument, so
;;; any default specified in the arglist will be ignored. Confusion of
;;; this type should be avoided when at all possible.
@@ -82,7 +82,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
;; If we don't load font-lock now, but it is loaded later, the
;; necessary mmm-font-lock-* properties may not be there.
(require 'font-lock)
@@ -162,7 +162,7 @@ available through M-x customize-group RET mmm."
(mmm-update-mode-info major-mode)
(setq mmm-region-saved-locals-for-dominant
;; FIXME: Neither is defined in recent Emacs.
- (list* (list 'font-lock-cache-state nil)
+ (cl-list* (list 'font-lock-cache-state nil)
(list 'font-lock-cache-position (make-marker))
(copy-tree (cdr (assq major-mode
mmm-region-saved-locals-defaults)))))
;; Without the next line, the (make-marker) above gets replaced
diff --git a/mmm-noweb.el b/mmm-noweb.el
index b936be1..974c522 100644
--- a/mmm-noweb.el
+++ b/mmm-noweb.el
@@ -7,7 +7,7 @@
;; noweb-mode.el - edit noweb files with GNU Emacs
;; Copyright 1995 by Thorsten.Ohl @ Physik.TH-Darmstadt.de
;; with a little help from Norman Ramsey <address@hidden>
-;;
+;;
;;{{{ GPL
@@ -39,7 +39,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(require 'mmm-region)
(require 'mmm-vars)
(require 'mmm-mode)
@@ -147,7 +147,7 @@ return the value of `mmm-noweb-code-mode'."
names which match REGEXP."
(let* ((remove-next nil)
(regions
- (maplist #'(lambda (pos-list)
+ (cl-maplist (lambda (pos-list)
(if (cdr pos-list)
(if remove-next
(setq remove-next nil)
diff --git a/mmm-region.el b/mmm-region.el
index 1631c37..c006eed 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -35,7 +35,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(require 'font-lock)
(require 'mmm-compat)
(require 'mmm-utils)
@@ -60,7 +60,7 @@ See `mmm-included-p' for the values of TYPE."
See `mmm-included-p' for the values of TYPE."
(or pos (setq pos (point)))
(mmm-sort-overlays
- (remove-if-not
+ (cl-remove-if-not
#'(lambda (ovl)
(and (overlay-get ovl 'mmm)
(mmm-included-p ovl pos type)))
@@ -87,18 +87,18 @@ should be one of nil, `beg', `end', `none', or `all'.
(end (overlay-end ovl)))
(cond ((and (= beg pos) (= end pos))
;; Do the Right Thing for zero-width overlays
- (case type
+ (cl-case type
((nil) (and (overlay-get ovl 'beg-sticky)
(overlay-get ovl 'end-sticky)))
((none) nil)
(t t)))
((= beg pos)
- (case type
+ (cl-case type
((nil) (overlay-get ovl 'beg-sticky))
((beg all) t)
(t nil)))
((= end pos)
- (case type
+ (cl-case type
((nil) (overlay-get ovl 'end-sticky))
((end all) t)
(t nil)))
@@ -113,7 +113,7 @@ should be one of nil, `beg', `end', `none', or `all'.
The overlays are returned in order of decreasing priority. No
attention is paid to stickiness."
(mmm-sort-overlays
- (remove-if-not
+ (cl-remove-if-not
#'(lambda (ovl)
(and (overlay-get ovl 'mmm)
(<= (overlay-start ovl) start)
@@ -126,7 +126,7 @@ attention is paid to stickiness."
The overlays are returned in order of decreasing priority. No
attention is paid to stickiness."
(mmm-sort-overlays
- (remove-if-not
+ (cl-remove-if-not
#'(lambda (ovl)
(and (overlay-get ovl 'mmm)
(>= (overlay-start ovl) start)
@@ -139,7 +139,7 @@ attention is paid to stickiness."
The overlays are returned in order of decreasing priority. No
attention is paid to stickiness."
(mmm-sort-overlays
- (remove-if-not
+ (cl-remove-if-not
#'(lambda (ovl)
(overlay-get ovl 'mmm))
(overlays-in (max start (point-min))
@@ -147,7 +147,7 @@ attention is paid to stickiness."
(defun mmm-sort-overlays (overlays)
"Sort OVERLAYS in order of decreasing priority."
- (sort (copy-list overlays)
+ (sort (cl-copy-list overlays)
#'(lambda (x y) (> (or (overlay-get x 'priority) 0)
(or (overlay-get y 'priority) 0)))))
@@ -181,7 +181,7 @@ Return non-nil if the current region changed.
Also deletes overlays that ought to evaporate because their delimiters
have disappeared."
(mapc #'delete-overlay
- (remove-if #'(lambda (ovl)
+ (cl-remove-if #'(lambda (ovl)
(or (not (eq (overlay-get ovl 'mmm-evap) 'front))
(overlay-buffer (overlay-get ovl 'front))))
(mmm-overlays-at pos)))
@@ -275,7 +275,7 @@ a valid child of the highest-priority of those regions, if
any.
Signals errors, returns `t' if no error."
;; First check if the placement is valid. Every existing region
;; that overlaps this one must contain it in its entirety.
- (let ((violators (set-difference
+ (let ((violators (cl-set-difference
(mmm-overlays-overlapping beg end)
(mmm-overlays-containing beg end))))
(if violators
@@ -294,7 +294,7 @@ Signals errors, returns `t' if no error."
(list parent-mode))))
t)
-(defun* mmm-make-region
+(cl-defun mmm-make-region
(submode beg end &key face
front back (evaporation 'front)
delimiter-mode front-face back-face
@@ -433,7 +433,7 @@ Does not handle delimiters. Use `mmm-make-region'."
,@(if delim '((delim t)) nil)
(mmm-local-variables
;; Have to be careful to make new list structure here
- ,(list* (list 'font-lock-cache-state nil)
+ ,(cl-list* (list 'font-lock-cache-state nil)
(list 'font-lock-cache-position (make-marker))
(copy-tree
(cdr (assq submode mmm-region-saved-locals-defaults)))))
@@ -689,7 +689,7 @@ region and mode for the previous position."
(defun mmm-update-font-lock-buffer ()
"Turn on font lock if any mode in the buffer enables it."
- (if (some #'(lambda (mode)
+ (if (cl-some #'(lambda (mode)
(get mode 'mmm-font-lock-mode))
(cons mmm-primary-mode
(mapcar #'(lambda (ovl)
@@ -717,8 +717,8 @@ region and mode for the previous position."
(defun mmm-submode-changes-in (start stop)
"Return a list of all submode-change positions from START to STOP.
The list is sorted in order of increasing buffer position."
- (let ((changes (sort (remove-duplicates
- (mapcan #'(lambda (ovl)
+ (let ((changes (sort (cl-remove-duplicates
+ (mapcan (lambda (ovl)
`(,(overlay-start ovl)
,(overlay-end ovl)))
(mmm-overlays-overlapping start stop)))
@@ -735,7 +735,7 @@ The list is sorted in order of increasing buffer position."
union covers the region from START to STOP, including delimiters."
(when (> stop start)
(let ((regions
- (maplist #'(lambda (pos-list)
+ (cl-maplist (lambda (pos-list)
(when (cdr pos-list)
(let ((ovl (mmm-overlay-at (car pos-list) 'beg)))
(list (if ovl
@@ -795,7 +795,7 @@ of the REGIONS covers START to STOP."
(let ((func (get mode 'mmm-fontify-region-function))
font-lock-extend-region-functions)
(mapc #'(lambda (reg)
- (destructuring-bind (beg end ovl) reg
+ (cl-destructuring-bind (beg end ovl) reg
(goto-char beg)
;; Here we do the same sort of thing that
;; `mmm-update-submode-region' does, but we force it
@@ -835,7 +835,7 @@ calls each respective submode's
`syntax-propertize-function'."
(mmm-save-changed-local-variables
mmm-current-submode mmm-current-overlay)
(unwind-protect
- (mapc #'(lambda (elt)
+ (mapc (lambda (elt)
(let* ((mode (car elt))
(func (get mode 'mmm-syntax-propertize-function))
(beg (cadr elt)) (end (caddr elt))
diff --git a/mmm-sample.el b/mmm-sample.el
index b507455..3c4345e 100644
--- a/mmm-sample.el
+++ b/mmm-sample.el
@@ -34,7 +34,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(require 'mmm-auto)
(require 'mmm-vars)
@@ -118,7 +118,7 @@ and MODE is a major mode function symbol.")
(setq string (match-string 0 string))
(or (mmm-ensure-modename
;; First try the user override variable.
- (some #'(lambda (pair)
+ (cl-some #'(lambda (pair)
(if (string-match (car pair) string) (cdr pair) nil))
mmm-here-doc-mode-alist))
(let ((words (split-string (downcase string) "[_-]+")))
@@ -126,20 +126,20 @@ and MODE is a major mode function symbol.")
;; Try the whole name, stopping at "mode" if present.
(intern
(mapconcat #'identity
- (nconc (ldiff words (member "mode" words))
+ (nconc (cl-ldiff words (member "mode" words))
(list "mode"))
"-")))
;; Try each word by itself (preference list)
- (some #'(lambda (word)
+ (cl-some (lambda (word)
(mmm-ensure-modename (intern word)))
words)
;; Try each word with -mode tacked on
- (some #'(lambda (word)
+ (cl-some (lambda (word)
(mmm-ensure-modename
(intern (concat word "-mode"))))
words)
;; Try each pair of words with -mode tacked on
- (loop for (one two) on words
+ (cl-loop for (one two) on words
if (mmm-ensure-modename
(intern (concat one two "-mode")))
return it)
diff --git a/mmm-utils.el b/mmm-utils.el
index 1c378a5..9fd4394 100644
--- a/mmm-utils.el
+++ b/mmm-utils.el
@@ -30,8 +30,6 @@
;;; Code:
-(require 'cl)
-
;;{{{ Valid Buffer
;; We used to wrap almost everything in this, but I realized that
diff --git a/mmm-vars.el b/mmm-vars.el
index 8397122..56c6644 100644
--- a/mmm-vars.el
+++ b/mmm-vars.el
@@ -32,7 +32,7 @@
;;; Code:
(require 'mmm-compat)
-(require 'cl)
+(require 'cl-lib)
;; MISCELLANEOUS
;;{{{ Shut up the Byte Compiler
@@ -597,7 +597,7 @@ element in `mmm-major-mode-preferences'. In the latter
case, the
first `fboundp' element of the `cdr' is returned, or nil if none."
(if (fboundp mode)
mode
- (car (remove-if-not
+ (car (cl-remove-if-not
#'fboundp
(cdr (assq mode mmm-major-mode-preferences))))))
@@ -1024,7 +1024,7 @@ The CLASSES are all made private, i.e. non-user-visible."
'(:private t)))
classes))
(add-to-list 'mmm-classes-alist
- (list group :classes (mapcar #'first classes))))
+ (list group :classes (mapcar #'cl-first classes))))
(defun mmm-add-to-group (group classes)
"Add CLASSES to the \"grouping class\" named GROUP.
@@ -1035,7 +1035,7 @@ The CLASSES are all made private, i.e. non-user-visible."
classes))
(mmm-set-class-parameter group :classes
(append (mmm-get-class-parameter group :classes)
- (mapcar #'first classes))))
+ (mapcar #'cl-first classes))))
;;}}}
;;{{{ Version Number
@@ -1088,8 +1088,8 @@ Set automatically from `mmm-mode-ext-classes-alist'.")
Uses `mmm-mode-ext-classes-alist' to find submode classes."
(or mmm-mode-ext-classes
(setq mmm-mode-ext-classes
- (mapcar #'third
- (remove-if-not #'mmm-mode-ext-applies
+ (mapcar #'cl-third
+ (cl-remove-if-not #'mmm-mode-ext-applies
mmm-mode-ext-classes-alist)))))
(defun mmm-clear-mode-ext-classes ()
@@ -1097,7 +1097,7 @@ Uses `mmm-mode-ext-classes-alist' to find submode
classes."
(setq mmm-mode-ext-classes nil))
(defun mmm-mode-ext-applies (element)
- (destructuring-bind (mode ext class) element
+ (cl-destructuring-bind (mode ext class) element
(and (if mode
(eq mode
;; If MMM is on in this buffer, use the primary mode,
- [elpa] master 68a169e 366/433: Don't make the temp buffer unmodified before killing it, (continued)
- [elpa] master 68a169e 366/433: Don't make the temp buffer unmodified before killing it, Dmitry Gutov, 2018/03/15
- [elpa] master aea8495 433/433: Add the agreed-upon copyright exceptions, Dmitry Gutov, 2018/03/15
- [elpa] master a897a41 360/433: * mmm-erb.el: Update comments, Dmitry Gutov, 2018/03/15
- [elpa] master 1bcb406 379/433: Add magic comment for autoload to mmm-add-classes, Dmitry Gutov, 2018/03/15
- [elpa] master 3ac63b8 336/433: Define mmm-syntax-propertize-function, Dmitry Gutov, 2018/03/15
- [elpa] master 1e655f7 395/433: mmm-save-local-variables: Add forward-sexp-function and SMIE-related vars, Dmitry Gutov, 2018/03/15
- [elpa] master c23be30 384/433: Limit html-php to .php files, Dmitry Gutov, 2018/03/15
- [elpa] master 70f115e 348/433: Update the TODO, Dmitry Gutov, 2018/03/15
- [elpa] master 02a3248 394/433: Merge pull request #49 from namikister/css-mode, Dmitry Gutov, 2018/03/15
- [elpa] master 2995771 420/433: Update copyright dates again, Dmitry Gutov, 2018/03/15
- [elpa] master 3f771f7 419/433: Use cl-lib instead of cl,
Dmitry Gutov <=
- [elpa] master 912f3bd 335/433: Use syntax-propertize-function set in submodes, Dmitry Gutov, 2018/03/15
- [elpa] master c9dea38 363/433: Update the FAQ, Dmitry Gutov, 2018/03/15
- [elpa] master 628e1dc 380/433: Merge pull request #31 from tom-tan/add-autoloads, Dmitry Gutov, 2018/03/15
- [elpa] master 01b5cd9 338/433: * mmm-apply-all: flush syntax cache, Dmitry Gutov, 2018/03/15
- [elpa] master e257808 413/433: Copy mmm-indent-line body into mmm-indent-narrowed, Dmitry Gutov, 2018/03/15
- [elpa] master 3895201 294/433: Merge pull request #3 from dgutov/shortcuts-fix, Dmitry Gutov, 2018/03/15
- [elpa] master de643c9 409/433: Mode transition hooks, Dmitry Gutov, 2018/03/15
- [elpa] master 395317c 332/433: * mmm-make-region: Don't call mmm-save-changed-local-variables, or set the, Dmitry Gutov, 2018/03/15
- [elpa] master 38439a4 301/433: Reparse mmm-mode buffer when Emacs is idle, Dmitry Gutov, 2018/03/15
- [elpa] master c76b13e 418/433: Add some NEWS entries, Dmitry Gutov, 2018/03/15