emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master f58bcfb 2/2: [gnugo int] Gate ‘cursor-intangible-mode’ ca


From: Thien-Thi Nguyen
Subject: [elpa] master f58bcfb 2/2: [gnugo int] Gate ‘cursor-intangible-mode’ call precisely
Date: Tue, 14 Mar 2017 03:12:27 -0400 (EDT)

branch: master
commit f58bcfb1a4022c030cd1ab1b749c8a3121a79c31
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>

    [gnugo int] Gate ‘cursor-intangible-mode’ call precisely
    
    * packages/gnugo/gnugo.el (gnugo-board-mode): ...here, via ‘fboundp’.
---
 packages/gnugo/gnugo.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index af3f3f0..abc4970 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -2169,10 +2169,16 @@ In this mode, keys do not self insert (see 
`gnugo-board-mode-map')."
   (setq font-lock-defaults '(gnugo-font-lock-keywords t)
         truncate-lines t)
   (add-hook 'kill-buffer-hook 'gnugo-cleanup nil t)
-  (if (eq gnugo--intangible 'cursor-intangible)
+
+  ;; Previously, we used ‘(eq gnugo--intangible 'cursor-intangible)’
+  ;; here, but (a) this is a bit quicker; and (b) we want to placate
+  ;; Emacs 24, which blurts out a "not known to be defined" warning.
+  ;; (Apparently it cannot infer equivalence of the two conditions.)
+  (if (fboundp 'cursor-intangible-mode)
       (cursor-intangible-mode 1)
     ;; Make sure ‘intangible’ DTRT in this buffer.
     (setq-local inhibit-point-motion-hooks nil))
+
   (setq-local gnugo-state (gnugo--mkht :size (1- 42)))
   (setq-local gnugo-btw nil)
   (add-to-list 'minor-mode-alist '(gnugo-btw gnugo-btw))



reply via email to

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