[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 03/05: [gnugo int] Make ‘gnug o-board-buffer-p’ precise.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 03/05: [gnugo int] Make ‘gnug o-board-buffer-p’ precise. |
Date: |
Tue, 08 Apr 2014 10:38:25 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 1ce954ca5828b6a307276c268c39cdfca40fb4ac
Author: Thien-Thi Nguyen <address@hidden>
Date: Tue Apr 8 09:53:36 2014 +0200
[gnugo int] Make ‘gnugo-board-buffer-p’ precise.
* packages/gnugo/gnugo.el (gnugo-board-buffer-p):
Check ‘major-mode’ directly; use ‘buffer-local-value’.
---
packages/gnugo/gnugo.el | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 4706b83..8ccb347 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -313,7 +313,10 @@ Handle the big, slow-to-render, and/or uninteresting ones
specially."
(defun gnugo-board-buffer-p (&optional buffer)
"Return non-nil if BUFFER is a GNUGO Board buffer."
- (with-current-buffer (or buffer (current-buffer)) gnugo-state))
+ (eq 'gnugo-board-mode
+ (buffer-local-value
+ 'major-mode
+ (or buffer (current-buffer)))))
(defun gnugo-board-user-play-ok-p (&optional buffer)
"Return non-nil if BUFFER is a GNUGO Board buffer ready for a user move."