help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cperl-mode bug in customization with hairy enabled


From: netmage . scw
Subject: cperl-mode bug in customization with hairy enabled
Date: Tue, 14 Jan 2014 16:59:17 -0800 (PST)
User-agent: G2/1.0

In GNU Emacs 24.3.1 on Windows 7, I have cperl-hairy set to true, and have also 
customized some cperl-mode variables.

cperl-version says 6.2

I am trying to set cperl-lazy-help-time to 1, which I have done in 
Customization and saved.

In the cperl-mode code, the value for lazy help time is decided by 
(cperl-val 'cperl-lazy-help-time 1000000 5)

where

;; Make customization possible "in reverse"
(defsubst cperl-val (symbol &optional default hairy)
  (cond
   ((eq (symbol-value symbol) 'null) default)
   (cperl-hairy (or hairy t))
   (t (symbol-value symbol))))

The documentation says
 "*Not-nil (and non-null) means to show lazy help after given idle time.
Can be overwritten by `cperl-hairy' to be 5 sec if nil."

and the help says
It is possible to show this help automatically after some idle time.
This is regulated by variable `cperl-lazy-help-time'.  Default with
`cperl-hairy' (if the value of `cperl-lazy-help-time' is nil) is 5
secs idle time .  It is also possible to switch this on/off from the
menu, or via \\[cperl-toggle-autohelp].  Requires `run-with-idle-timer'.

I believe the definition of cperl-val does not do what the documentation says: 
if cperl-hairy is true, the value returned is always the hairy value, 
regardless of the variable setting. This presumably applies to all 
affected-by-hairy variables.

I suggest cperl-val should be:
(defsubst cperl-val (symbol &optional default hairy)
  (cond
   ((eq (symbol-value symbol) 'null) default)
   (cperl-hairy (or (symbol-value symbol) hairy))
   (t (symbol-value symbol))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]