[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 7c5e9ad 303/495: Avoid warning because of font-loc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 7c5e9ad 303/495: Avoid warning because of font-lock-syntactic-keywords |
Date: |
Sat, 7 Aug 2021 09:05:36 -0400 (EDT) |
branch: elpa/go-mode
commit 7c5e9ade4cf6036eb1eda8cc588b390927321f6e
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>
Avoid warning because of font-lock-syntactic-keywords
Use a macro to check for the existence syntax-propertize-function. That
way, the byte compiler will optimize away one branch of the if, and not
complain about our fallback use of font-lock-syntactic-keywords.
---
go-mode.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/go-mode.el b/go-mode.el
index cde2567..7978fb6 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -46,6 +46,9 @@
(defmacro go--xemacs-p ()
`(featurep 'xemacs))
+(defmacro go--has-syntax-propertize-p ()
+ (boundp 'syntax-propertize-function))
+
(defun go--delete-whole-line (&optional arg)
"Delete the current line without putting it in the `kill-ring'.
Derived from function `kill-whole-line'. ARG is defined as for that
@@ -959,7 +962,7 @@ with goflymake \(see URL
`https://github.com/dougm/goflymake'), gocode
(set (make-local-variable 'end-of-defun-function) #'go-end-of-defun)
(set (make-local-variable 'parse-sexp-lookup-properties) t)
- (if (boundp 'syntax-propertize-function)
+ (if (go--has-syntax-propertize-p)
(set (make-local-variable 'syntax-propertize-function)
#'go-propertize-syntax)
(set (make-local-variable 'font-lock-syntactic-keywords)
go--font-lock-syntactic-keywords)
- [nongnu] elpa/go-mode c0a3a16 269/495: Update README.md to reflect the latest version of the truth, (continued)
- [nongnu] elpa/go-mode c0a3a16 269/495: Update README.md to reflect the latest version of the truth, ELPA Syncer, 2021/08/07
- [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 <=
- [nongnu] elpa/go-mode bdf353a 304/495: Use cl-lib instead of cl, ELPA Syncer, 2021/08/07
- [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