aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-11-13 15:43:59 +0100
committerGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-11-13 15:43:59 +0100
commit6c47d20a9e1fa0a30be041dc565ae71090ffcd4a (patch)
tree512d871d368ac8b02239540646e39015a8ab4bd2 /coq/coq.el
parent078e38fb576dbd91fb92b7bca89d4a9d47f88e79 (diff)
Fixed auto-width setting not initialized (trac #456).
Diffstat (limited to 'coq/coq.el')
-rw-r--r--coq/coq.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/coq/coq.el b/coq/coq.el
index 074a0a79..cd6991af 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -1150,8 +1150,9 @@ flag Printing All set."
;; FIXME: hopefully this will eventually become a non synchronized option and
;; we can remove this.
-(defun coq-auto-adapt-printing-width-switch ()
- "Function called when toggling `auto-adapt-printing-width'"
+(defun coq-set-auto-adapt-printing-width (&optional symb val); args are for :set compatibility
+ "Function called when setting `auto-adapt-printing-width'"
+ (setq symb val)
(if coq-auto-adapt-printing-width
(progn
(add-hook 'proof-assert-command-hook 'coq-adapt-printing-width)
@@ -1170,7 +1171,10 @@ width is synchronized by coq (?!)."
:type 'boolean
:safe 'booleanp
:group 'coq
- :eval (coq-auto-adapt-printing-width-switch))
+ :eval (coq-set-auto-adapt-printing-width))
+
+;; defpacustom fails to call :eval during inititialization, see trac #456
+(coq-set-auto-adapt-printing-width)
;; this initiates aut adapt printing width at start, by reading the config var.
;; Let us put this at the end of hooks to have a chance to read local variables