[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode bdf353a 304/495: Use cl-lib instead of cl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode bdf353a 304/495: Use cl-lib instead of cl |
Date: |
Sat, 7 Aug 2021 09:05:36 -0400 (EDT) |
branch: elpa/go-mode
commit bdf353a5992ce493d6f6510f442384cdae155e58
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>
Use cl-lib instead of cl
Avoid a warning (and deprecated package) by using cl-lib instead of cl.
---
NEWS | 3 +++
go-mode.el | 18 +++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/NEWS b/NEWS
index 1498728..aee84da 100644
--- a/NEWS
+++ b/NEWS
@@ -53,6 +53,9 @@ go-mode-1.4.0 (???)
* Add support for electric-indent-mode and only reindent for closing
parens, not colons, commas or equal signs.
+ * Avoid warnings by the byte compiler -- Use cl-lib instead of cl,
+ and utilize a macro to conditionally compile fallback code.
+
go-mode-1.3.1 (2015-07-03)
* The 1.3.0 release forgot to update the version in the package
diff --git a/go-mode.el b/go-mode.el
index 7978fb6..0d44311 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -13,7 +13,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(require 'etags)
(require 'ffap)
(require 'find-file)
@@ -617,7 +617,7 @@ current line will be returned."
(goto-char point)
(setq indent (go-indentation-at-point))
(if (looking-at (concat go-label-regexp ":\\([[:space:]]*/.+\\)?$\\|case
.+:\\|default:"))
- (decf indent tab-width))
+ (cl-decf indent tab-width))
(setq shift-amt (- indent (current-column)))
(if (zerop shift-amt)
nil
@@ -1036,14 +1036,14 @@ with goflymake \(see URL
`https://github.com/dougm/goflymake'), gocode
(forward-line len)
(let ((text (buffer-substring start (point))))
(with-current-buffer target-buffer
- (decf line-offset len)
+ (cl-decf line-offset len)
(goto-char (point-min))
(forward-line (- from len line-offset))
(insert text)))))
((equal action "d")
(with-current-buffer target-buffer
(go--goto-line (- from line-offset))
- (incf line-offset len)
+ (cl-incf line-offset len)
(go--delete-whole-line len)))
(t
(error "invalid rcs patch or internal error in
go--apply-rcs-patch")))))))))
@@ -1338,7 +1338,7 @@ uncommented, otherwise a new import will be added."
(goto-char (point-min))
(if (re-search-forward (concat "^[[:space:]]*//[[:space:]]*import " line
"$") nil t)
(uncomment-region (line-beginning-position) (line-end-position))
- (case (go-goto-imports)
+ (cl-case (go-goto-imports)
('fail (message "Could not find a place to add import."))
('block-empty
(insert "\n\t" line "\n"))
@@ -1390,10 +1390,10 @@ If IGNORE-CASE is non-nil, the comparison is
case-insensitive."
archive files in /pkg/"
(sort
(delete-dups
- (mapcan
+ (cl-mapcan
(lambda (topdir)
(let ((pkgdir (concat topdir "/pkg/")))
- (mapcan (lambda (dir)
+ (cl-mapcan (lambda (dir)
(mapcar (lambda (file)
(let ((sub (substring file (length pkgdir) -2)))
(unless (or (go--string-prefix-p "obj/" sub)
(go--string-prefix-p "tool/" sub))
@@ -1551,7 +1551,7 @@ description at POINT."
(forward-char (1- column))
(point)))
-(defstruct go--covered
+(cl-defstruct go--covered
start-line start-column end-line end-column covered count)
(defun go--coverage-file ()
@@ -1615,7 +1615,7 @@ divisor for FILE-NAME."
(file (car parts))
(rest (split-string (nth 1 parts) "[., ]")))
- (destructuring-bind
+ (cl-destructuring-bind
(start-line start-column end-line end-column num count)
(mapcar #'string-to-number rest)
- [nongnu] elpa/go-mode c849d72 273/495: Don't throw errors in some go-goto-* functions, (continued)
- [nongnu] elpa/go-mode c849d72 273/495: Don't throw errors in some go-goto-* functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 37b9f9c 272/495: Change handling of prefix args to consider them booleans, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c8c6bb0 275/495: go--function-name: return nil for anonymous functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f58910a 276/495: Reimplement go--in-function-p to do as the name says, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f44854b 278/495: More idiomatic docstrings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9424ab3 283/495: Map C-g f to goto-function and C-g n to goto-function-name, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode abc56d4 286/495: Rename go-goto-return-value to go-goto-return-values, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e4cd631 288/495: Update AUTHORS, automate process, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 63e67b1 290/495: go-goto-docstring: fix insertion of function name, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7c5e9ad 303/495: Avoid warning because of font-lock-syntactic-keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bdf353a 304/495: Use cl-lib instead of cl,
ELPA Syncer <=
- [nongnu] elpa/go-mode 82ebf74 302/495: Don't make ":", ", " or "=" electric, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a49cdb8 305/495: Evaluate (featurep 'xemacs) at compile time, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3200a9f 301/495: Support electric-indent-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 53f50f7 299/495: Make godoc command and completion configurable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1a0541c 312/495: Simplify go-packages-go-list by using process-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 404f8ca 308/495: Improve README and NEWS entries for new goto commands, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f12f2cc 319/495: Add support for gogetdoc, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7fec5b2 317/495: Move test Go files to testdata, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 648ad3d 311/495: Use null-device instead of /dev/null, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e035e60 309/495: Mention GOPATH detection in README, ELPA Syncer, 2021/08/07