]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix inability to turn show-paren-local-mode on manually (bug#61098)
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 5 Feb 2023 17:06:47 +0000 (19:06 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 5 Feb 2023 17:06:47 +0000 (19:06 +0200)
* lisp/paren.el (show-paren-local-mode): Don't kill the local
value when both local and global are t.  Because the
show-paren-predicate check in show-paren-function also checks
whether a local (non-nil) value of this variable exists.

lisp/paren.el

index d1623a2b24854ec887a61a0c31d5c9af7385d18e..7ee4e9ae6821beb1aeb0283fa3f856c88565ac04 100644 (file)
@@ -166,8 +166,8 @@ use `show-paren-local-mode'."
   (cond
    ((eq show-paren-mode (default-value 'show-paren-mode))
     (unless show-paren-mode
-      (show-paren--delete-overlays))
-    (kill-local-variable 'show-paren-mode))
+      (show-paren--delete-overlays)
+      (kill-local-variable 'show-paren-mode)))
    ((not (default-value 'show-paren-mode))
     ;; Locally enabled, but globally disabled.
     (show-paren-mode 1)                ; Setup the timer.