]> code.delx.au - gnu-emacs/commitdiff
* lisp/paren.el (show-paren-delay): Add a :set function. Doc fix. (Bug#12297)
authorGlenn Morris <rgm@gnu.org>
Thu, 30 Aug 2012 01:44:11 +0000 (21:44 -0400)
committerGlenn Morris <rgm@gnu.org>
Thu, 30 Aug 2012 01:44:11 +0000 (21:44 -0400)
lisp/ChangeLog
lisp/paren.el

index 0fd323a6a2cb891e619d8f206f5fcebbc3ac1fdd..aa89a939f4a5d75afbd7bdffc6cf4ef3cbdd0349 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-30  Glenn Morris  <rgm@gnu.org>
+
+       * paren.el (show-paren-delay):
+       Add a :set function.  Doc fix.  (Bug#12297)
+
 2012-08-29  Martin Blais  <blais@furius.ca>  (tiny change)
 
        * progmodes/compile.el (compilation-always-kill): New var.
index 2d6c42478e18453a7e182d0032b2c7f1aeada854..ab856380d3f6dcf8d6c0c8ba4a59857b4614991a 100644 (file)
@@ -52,8 +52,17 @@ otherwise)."
   :group 'paren-showing)
 
 (defcustom show-paren-delay 0.125
-  "Time in seconds to delay before showing a matching paren."
+  "Time in seconds to delay before showing a matching paren.
+If you change this without using customize while `show-paren-mode' is
+active, you must toggle the mode off and on again for this to take effect."
   :type '(number :tag "seconds")
+  :initialize 'custom-initialize-default
+  :set (lambda (sym val)
+        (if (not show-paren-mode)
+            (set sym val)
+          (show-paren-mode -1)
+          (set sym val)
+          (show-paren-mode 1)))
   :group 'paren-showing)
 
 (defcustom show-paren-priority 1000