[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/highlight-parentheses 9a99a4b 42/49: Fix custom type error
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/highlight-parentheses 9a99a4b 42/49: Fix custom type error of highlight-parentheses-attributes |
Date: |
Sun, 15 Aug 2021 03:57:50 -0400 (EDT) |
branch: elpa/highlight-parentheses
commit 9a99a4b2ae468fe8fed4c79ddd4bd55adffa87dd
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
Fix custom type error of highlight-parentheses-attributes
Also enable lexical-binding.
---
highlight-parentheses.el | 41 +++++++++++++++++++++++++++--------------
1 file changed, 27 insertions(+), 14 deletions(-)
diff --git a/highlight-parentheses.el b/highlight-parentheses.el
index 9bc4539..9416f37 100644
--- a/highlight-parentheses.el
+++ b/highlight-parentheses.el
@@ -1,7 +1,8 @@
-;;; highlight-parentheses.el --- Highlight surrounding parentheses
+;;; highlight-parentheses.el --- Highlight surrounding parentheses -*-
lexical-binding: t; -*-
;;
;; Copyright (C) 2007, 2009, 2013 Nikolaj Schumacher
;; Copyright (C) 2018 Tim Perkins
+;; Copyright (C) 2018-2021 Tassilo Horn
;;
;; Author: Nikolaj Schumacher <bugs * nschum de>
;; Maintainer: Tassilo Horn <tsdh@gnu.org>
@@ -32,15 +33,25 @@
;; Add the following to your .emacs file:
;; (require 'highlight-parentheses)
;;
-;; Enable the mode using M-x highlight-parentheses-mode or by adding it to a
-;; hook.
+;; Enable the mode using `M-x highlight-parentheses-mode' or by adding it to a
+;; hook such as `prog-mode-hook'.
;;
+;; The look of the highlighted parens can be customized using these options:
+;;
+;; - `highlight-parentheses-colors'
+;; - `highlight-parentheses-background-colors'
+;; - `highlight-parentheses-attributes'
+;;
+;; If you set them from Lisp rather than through the customize interface, you
+;; may have to call `highlight-parentheses--color-update' in order to have the
+;; changes affect already opened buffers.
+
;;; Code:
(require 'cl-lib)
(defgroup highlight-parentheses nil
- "Highlight surrounding parentheses"
+ "Highlight surrounding parentheses."
:group 'faces
:group 'matching)
@@ -56,18 +67,17 @@ This function is used so that appropriate custom variables
apply
immediately once set (through the custom interface)."
(set variable value)
;; REVIEW: I assume this check is here for cases that are too early into the
- ;; load process?
+ ;; load process? Exactly! ;-)
(when (fboundp 'highlight-parentheses--color-update)
(highlight-parentheses--color-update)))
-;; TODO: There should probably be more documentation on how this variable works
-;; as a function. Same for the others.
(define-obsolete-variable-alias 'hl-paren-colors
'highlight-parentheses-colors "2.0.0")
(defcustom highlight-parentheses-colors
'("firebrick1" "IndianRed1" "IndianRed3" "IndianRed4")
"List of colors for the highlighted parentheses.
-The list starts with the inside parentheses and moves outwards."
+The list starts with the inside parentheses and moves outwards.
+May also be a function returning a list of colors."
:type '(choice (repeat color) function)
:set #'highlight-parentheses--set
:group 'highlight-parentheses)
@@ -76,7 +86,8 @@ The list starts with the inside parentheses and moves
outwards."
'highlight-parentheses-background-colors "2.0.0")
(defcustom highlight-parentheses-background-colors nil
"List of colors for the background highlighted parentheses.
-The list starts with the inside parentheses and moves outwards."
+The list starts with the inside parentheses and moves outwards.
+May also be a function returning a list of colors."
:type '(choice (repeat color) function)
:set #'highlight-parentheses--set
:group 'highlight-parentheses)
@@ -85,8 +96,10 @@ The list starts with the inside parentheses and moves
outwards."
'highlight-parentheses-attributes "2.0.0")
(defcustom highlight-parentheses-attributes nil
"List of face attributes for the highlighted parentheses.
-The list starts with the inside parentheses and moves outwards."
- :type '(choice plist function)
+Each element is a plist of face attributes.
+The list starts with the inside parentheses and moves outwards.
+May also be a function returning a list of plists."
+ :type '(choice (repeat plist) function)
:set #'highlight-parentheses--set
:group 'highlight-parentheses)
@@ -233,8 +246,8 @@ overlays in it instead."
(car-bg (car bg))
(car-attr (car attr)))
(cl-loop for (key . (val . _rest)) on car-attr by #'cddr
- do (setq attributes
- (plist-put attributes key val)))
+ do (setq attributes
+ (plist-put attributes key val)))
(when car-fg
(setq attributes (plist-put attributes :foreground car-fg)))
(when car-bg
@@ -242,7 +255,7 @@ overlays in it instead."
(pop fg)
(pop bg)
(pop attr)
- (dotimes (i 2) ;; front and back
+ (dotimes (_i 2) ;; front and back
(push (make-overlay 0 0 nil t) highlight-parentheses--overlays)
(overlay-put (car highlight-parentheses--overlays) 'font-lock-face
attributes)))
(setq highlight-parentheses--overlays (nreverse
highlight-parentheses--overlays))))
- [nongnu] elpa/highlight-parentheses 7b4ba71 19/49: Add autoload marker for global mode., (continued)
- [nongnu] elpa/highlight-parentheses 7b4ba71 19/49: Add autoload marker for global mode., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses f3d9dcc 16/49: Update copyright year., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses f918444 18/49: Fix elisp-lint download URL., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses f3b1acc 20/49: Merge #5., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses cccdfe0 28/49: Delete overlays in before-revert-hook and change-major-mode-hook, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 5aa800a 26/49: Release version 1.1.0, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 52a8d36 33/49: Added other brackets, so it works with other languages., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses a5eace2 32/49: Added option for highlighting adjacent parens., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 891538d 48/49: Squash emacs 28 define-minor-mode warning; release 2.0.3, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses fdabfda 47/49: Remove cl-lib dependency since it's included in Emacs 24.3 anyhow; release 2.0.2, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 9a99a4b 42/49: Fix custom type error of highlight-parentheses-attributes,
ELPA Syncer <=
- [nongnu] elpa/highlight-parentheses 3b4d2c6 46/49: Add .elpaignore, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses bef1bc2 14/49: Add configuration for travis-ci., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses e653594 15/49: Add README with travis build state., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses d421e15 17/49: Add globalized highlight-parentheses-mode, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 8869fba 21/49: Fix slowdown by moving overlays less often., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 5e1fa9d 22/49: Make overlays front-advancing, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 9b9137b 24/49: New defcustom: hl-paren-delay (see issue #12), ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses ebf8827 25/49: Fix Travis build incidator, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses c38885b 31/49: Merge pull request #18 from Bad-ptr/master, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 73b4aa7 34/49: Added angle brackets!, ELPA Syncer, 2021/08/15