projects
/
elisp
/
riece.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Described 4.0.0 changes.
[elisp/riece.git]
/
lisp
/
riece-google.el
diff --git
a/lisp/riece-google.el
b/lisp/riece-google.el
index
de93b90
..
3bfe96e
100644
(file)
--- a/
lisp/riece-google.el
+++ b/
lisp/riece-google.el
@@
-19,8
+19,8
@@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; Commentary:
@@
-154,15
+154,13
@@
end
(defconst riece-google-regexp
"^go\\(o+\\)gle\\(:\\([a-z]+\\)\\)?>\\s-*\\(.*\\)")
(defconst riece-google-regexp
"^go\\(o+\\)gle\\(:\\([a-z]+\\)\\)?>\\s-*\\(.*\\)")
-(defvar riece-google-enabled nil)
-
(defconst riece-google-description
"Search keywords by Google.")
(defvar riece-google-target nil)
(defun riece-google-display-message-function (message)
(defconst riece-google-description
"Search keywords by Google.")
(defvar riece-google-target nil)
(defun riece-google-display-message-function (message)
- (when (and riece-google-enabled
+ (when (and (get 'riece-google 'riece-addon-enabled)
(stringp riece-google-license-key)
(string-match riece-google-regexp (riece-message-text message)))
(let ((keywords (match-string 4 (riece-message-text message)))
(stringp riece-google-license-key)
(string-match riece-google-regexp (riece-message-text message)))
(let ((keywords (match-string 4 (riece-message-text message)))
@@
-234,11
+232,9
@@
end
(add-hook 'riece-after-display-message-functions
'riece-google-display-message-function))
(add-hook 'riece-after-display-message-functions
'riece-google-display-message-function))
-(defun riece-google-enable ()
- (setq riece-google-enabled t))
-
-(defun riece-google-disable ()
- (setq riece-google-enabled nil))
+(defun riece-google-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-google-display-message-function))
(provide 'riece-google)
(provide 'riece-google)