unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12297: show-paren-mode only recognizes show-paren-delay value on activation
@ 2012-08-28 22:47 Roy Crihfield
  2012-08-30  1:45 ` Glenn Morris
  2012-08-30  2:45 ` Roy Crihfield
  0 siblings, 2 replies; 3+ messages in thread
From: Roy Crihfield @ 2012-08-28 22:47 UTC (permalink / raw)
  To: 12297

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Activating show-paren-mode sets the delay time to show-paren-delay
initially, but altering that value later has no effect. i.e., after:

(show-paren-mode)
(setq show-paren-delay 0)

The timer is still set to the original value .125, until the mode is
re-activated.
This should maybe be noted in the variable description, or there should be
a dedicated function to set the new value, e.g. by turning line 125 of
paren.el into a separate function:

(setq show-paren-idle-timer (run-with-idle-timer
                   show-paren-delay t
                   'show-paren-function))

[-- Attachment #2: Type: text/html, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#12297: show-paren-mode only recognizes show-paren-delay value on activation
  2012-08-28 22:47 bug#12297: show-paren-mode only recognizes show-paren-delay value on activation Roy Crihfield
@ 2012-08-30  1:45 ` Glenn Morris
  2012-08-30  2:45 ` Roy Crihfield
  1 sibling, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2012-08-30  1:45 UTC (permalink / raw)
  To: 12297-done

Version: 24.3

Roy Crihfield wrote:

> Activating show-paren-mode sets the delay time to show-paren-delay
> initially, but altering that value later has no effect.

OK, fixed in current trunk.

*** lisp/paren.el	2012-04-09 13:05:48 +0000
--- lisp/paren.el	2012-08-30 01:37:52 +0000
***************
*** 52,59 ****
    :group 'paren-showing)
  
  (defcustom show-paren-delay 0.125
!   "Time in seconds to delay before showing a matching paren."
    :type '(number :tag "seconds")
    :group 'paren-showing)
  
  (defcustom show-paren-priority 1000
--- 52,68 ----
    :group 'paren-showing)
  
  (defcustom show-paren-delay 0.125
!   "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






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#12297: show-paren-mode only recognizes show-paren-delay value on activation
  2012-08-28 22:47 bug#12297: show-paren-mode only recognizes show-paren-delay value on activation Roy Crihfield
  2012-08-30  1:45 ` Glenn Morris
@ 2012-08-30  2:45 ` Roy Crihfield
  1 sibling, 0 replies; 3+ messages in thread
From: Roy Crihfield @ 2012-08-30  2:45 UTC (permalink / raw)
  To: 12297

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

Forgot to include version: 24.1.1.

On Tue, Aug 28, 2012 at 6:47 PM, Roy Crihfield <rscrihf@gmail.com> wrote:

> Activating show-paren-mode sets the delay time to show-paren-delay
> initially, but altering that value later has no effect. i.e., after:
>
> (show-paren-mode)
> (setq show-paren-delay 0)
>
> The timer is still set to the original value .125, until the mode is
> re-activated.
> This should maybe be noted in the variable description, or there should be
> a dedicated function to set the new value, e.g. by turning line 125 of
> paren.el into a separate function:
>
> (setq show-paren-idle-timer (run-with-idle-timer
>                    show-paren-delay t
>                    'show-paren-function))
>

[-- Attachment #2: Type: text/html, Size: 980 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-30  2:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-28 22:47 bug#12297: show-paren-mode only recognizes show-paren-delay value on activation Roy Crihfield
2012-08-30  1:45 ` Glenn Morris
2012-08-30  2:45 ` Roy Crihfield

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).