[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex ba79584 32/43: Replace cl with cl
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex ba79584 32/43: Replace cl with cl-lib in other files |
Date: |
Tue, 20 Mar 2018 11:34:12 -0400 (EDT) |
branch: externals/auctex
commit ba79584eae4fccd9fd9af4752d2d7870eac881ea
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
Replace cl with cl-lib in other files
* latex.el (LaTeX-hanging-ampersand-position):
* tex-fold.el (require):
(TeX-fold-region-macro-or-env):
(TeX-fold-update-at-point):
* tex-info.el (require):
(Texinfo-make-node-list):
* toolbar-x.el (require):
(toolbarx-good-option-list-p): Replace cl with cl-lib and corresponding
macros.
---
latex.el | 30 +++++++++++++++---------------
tex-fold.el | 9 +++++----
tex-info.el | 23 ++++++++++++-----------
toolbar-x.el | 5 +++--
4 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/latex.el b/latex.el
index 411db0e..7354c23 100644
--- a/latex.el
+++ b/latex.el
@@ -6524,21 +6524,21 @@ function would return non-nil and `(match-string 1)'
would return
(defun LaTeX-hanging-ampersand-position ()
"Return indent column for a hanging ampersand (i.e. ^\s-*&)."
- (destructuring-bind
- (beg-pos . beg-col)
- (LaTeX-env-beginning-pos-col)
- (let* ((cur-pos (point)))
- (save-excursion
- (if (re-search-backward "\\\\" beg-pos t)
- (let ((cur-idx (how-many "[^\]&" (point) cur-pos)))
- (goto-char beg-pos)
- (re-search-forward "[^\]&" cur-pos t (+ 1 cur-idx))
- ;; If the above searchs fails, i.e. no "&" found,
- ;; (- (current-column) 1) returns -1, which is wrong. So
- ;; we use a fallback (+ 2 beg-col) whenever this happens:
- (max (- (current-column) 1)
- (+ 2 beg-col)))
- (+ 2 beg-col))))))
+ (cl-destructuring-bind
+ (beg-pos . beg-col)
+ (LaTeX-env-beginning-pos-col)
+ (let* ((cur-pos (point)))
+ (save-excursion
+ (if (re-search-backward "\\\\" beg-pos t)
+ (let ((cur-idx (how-many "[^\]&" (point) cur-pos)))
+ (goto-char beg-pos)
+ (re-search-forward "[^\]&" cur-pos t (+ 1 cur-idx))
+ ;; If the above searchs fails, i.e. no "&" found,
+ ;; (- (current-column) 1) returns -1, which is wrong. So
+ ;; we use a fallback (+ 2 beg-col) whenever this happens:
+ (max (- (current-column) 1)
+ (+ 2 beg-col)))
+ (+ 2 beg-col))))))
(defun LaTeX-indent-tabular ()
"Return indent column for the current tabular-like line."
diff --git a/tex-fold.el b/tex-fold.el
index 72e1a58..16dacae 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -44,7 +44,8 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'cl-lib))
(require 'tex)
(autoload 'LaTeX-forward-paragraph "latex")
@@ -334,8 +335,8 @@ for macros and 'math for math macros."
((eq type 'math) TeX-fold-math-spec-list-internal)
(t TeX-fold-macro-spec-list-internal)))
(dolist (i (cadr item))
- (pushnew (list i (car item)) fold-list :test #'equal)
- (pushnew i item-list :test #'equal)))
+ (cl-pushnew (list i (car item)) fold-list :test #'equal)
+ (cl-pushnew i item-list :test #'equal)))
(when item-list
(setq regexp (cond ((and (eq type 'env)
(eq major-mode 'context-mode))
@@ -701,7 +702,7 @@ breaks will be replaced by spaces."
(dolist (ov (overlays-at (point)))
(when (and (eq (overlay-get ov 'category) 'TeX-fold)
(numberp (overlay-get ov 'TeX-fold-display-string-spec)))
- (pushnew ov overlays)))
+ (cl-pushnew ov overlays)))
(when overlays
;; Sort list according to descending starts.
(setq overlays (sort (copy-sequence overlays)
diff --git a/tex-info.el b/tex-info.el
index 1716627..f990f0f 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -25,7 +25,8 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'cl-lib))
(require 'tex)
@@ -327,16 +328,16 @@ commands. Return the resulting string."
(let (nodes dups)
(while (re-search-forward "address@hidden" nil t)
(skip-chars-forward "[:blank:]")
- (pushnew (list (Texinfo-nodename-de-escape
- (buffer-substring-no-properties
- (point) (progn (skip-chars-forward "^
,")
- (skip-chars-backward "[:blank:]")
- (point)))))
- nodes
- :test (lambda (a b)
- (when (equal a b)
- (push (cons a (line-number-at-pos (point))) dups)
- t))))
+ (cl-pushnew (list (Texinfo-nodename-de-escape
+ (buffer-substring-no-properties
+ (point) (progn (skip-chars-forward "^
,")
+ (skip-chars-backward "[:blank:]")
+ (point)))))
+ nodes
+ :test (lambda (a b)
+ (when (equal a b)
+ (push (cons a (line-number-at-pos (point))) dups)
+ t))))
(when dups
(display-warning
'AUCTeX
diff --git a/toolbar-x.el b/toolbar-x.el
index f61000d..79dacdc 100644
--- a/toolbar-x.el
+++ b/toolbar-x.el
@@ -106,7 +106,8 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'cl-lib))
;; Note that this just gives a useful default. Icons are expected to
;; be in subdirectory "images" or "toolbar" relative to the load-path.
@@ -179,7 +180,7 @@ different. OPTION-LIST equal to nil is a good option list."
(dotimes (i n)
(when (> i 0)
(setq temp-opt-list (cddr temp-opt-list)))
- (pushnew (car temp-opt-list) list-diff :test #'equal)
+ (cl-pushnew (car temp-opt-list) list-diff :test #'equal)
(setq elt-in-valid (and elt-in-valid
(memq (car temp-opt-list)
valid-options))))
- [AUCTeX-diffs] [elpa] externals/auctex d3d321a 05/43: Remove TeX-assoc-string, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex d3d321a 05/43: Remove TeX-assoc-string, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 6861a88 10/43: Change encoding of Elisp source files to UTF-8, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 06f704f 31/43: Explicitly require Emacs 24, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 45d9e1b 13/43: Make sure `LaTeX-default-options' is honored, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 657c338 40/43: * tex.el (TeX-dwim-master): Prefer `cl-return' over `return'., Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 3d08a92 22/43: Restore some code erroneously removed from font-latex.el, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 3cdfdc8 19/43: Remove compatibility code for XEmacs in font-latex.el, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 4dfb98c 01/43: Remove XEmacs compatibility code in tex-buf.el, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 39d4959 23/43: * texmathp.el (texmathp-tex-commands-default): Add entries for breqn.sty., Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 4106f92 24/43: Add fontification for some core macros, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex ba79584 32/43: Replace cl with cl-lib in other files,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 8d2e9db 38/43: Add new function `TeX-arg-verb-delim-or-brace', Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 62d3606 18/43: Remove compatibility code for XEmacs in tex-fold.el, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex f7a4622 16/43: Delte prv-xemacs.el, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 7f9d64b 39/43: * font-latex.el (font-latex--get-script-props): Use `cl-case' instead of `case'., Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex ed54fb1 36/43: Refine how we setup flymake backend function, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 0011b68 43/43: Merge from master, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex d563566 42/43: Merge branch 'master' into externals/auctex, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex e769c3c 25/43: Make sure `process-environment' is recovered after temporal setenv, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex d86e95e 30/43: Support flymake in Emacs 26+ using chktex, Tassilo Horn, 2018/03/20
- [AUCTeX-diffs] [elpa] externals/auctex 4b66b9f 27/43: Do not actually write bug report instructions, Tassilo Horn, 2018/03/20