projects
/
riece
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed.
[riece]
/
lisp
/
riece-eval-ruby.el
diff --git
a/lisp/riece-eval-ruby.el
b/lisp/riece-eval-ruby.el
index
8f0091a
..
8595a57
100644
(file)
--- a/
lisp/riece-eval-ruby.el
+++ b/
lisp/riece-eval-ruby.el
@@
-1,4
+1,4
@@
-;;; riece-eval-ruby.el --- evaluate
Ruby programs in channels
+;;; riece-eval-ruby.el --- evaluate
input string as a Ruby program
;; Copyright (C) 1998-2005 Daiki Ueno
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Copyright (C) 1998-2005 Daiki Ueno
;; Author: Daiki Ueno <ueno@unixuser.org>
@@
-19,13
+19,12
@@
;; 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., 5
9 Temple Place - Suite 330
,
-;; Boston, MA 0211
1-1307
, USA.
+;; Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+;; Boston, MA 0211
0-1301
, USA.
;;; Commentary:
;;; Commentary:
-;; To use, add the following line to your ~/.riece/init.el:
-;; (add-to-list 'riece-addons 'riece-eval-ruby)
+;; NOTE: This is an add-on module for Riece.
;;; Code:
;;; Code:
@@
-33,7
+32,7
@@
(require 'riece-message)
(defgroup riece-eval-ruby nil
(require 'riece-message)
(defgroup riece-eval-ruby nil
- "Evaluate
Ruby programs in channels
."
+ "Evaluate
input string as a Ruby program
."
:prefix "riece-"
:group 'riece)
:prefix "riece-"
:group 'riece)
@@
-42,10
+41,8
@@
:type 'string
:group 'riece-eval-ruby)
:type 'string
:group 'riece-eval-ruby)
-(defvar riece-eval-ruby-enabled nil)
-
(defconst riece-eval-ruby-description
(defconst riece-eval-ruby-description
- "Evaluate
an input string as
Ruby program.")
+ "Evaluate
input string as a
Ruby program.")
(defun riece-eval-ruby-exit-handler (name)
(riece-ruby-inspect name)
(defun riece-eval-ruby-exit-handler (name)
(riece-ruby-inspect name)
@@
-68,7
+65,7
@@
'notice))))
(defun riece-eval-ruby-display-message-function (message)
'notice))))
(defun riece-eval-ruby-display-message-function (message)
- (if (and
riece-eval-ruby-enabled
+ (if (and
(get 'riece-eval-ruby 'riece-addon-enabled)
(riece-message-own-p message)
(string-match riece-eval-ruby-prefix-regexp
(riece-message-text message)))
(riece-message-own-p message)
(string-match riece-eval-ruby-prefix-regexp
(riece-message-text message)))
@@
-85,11
+82,9
@@
(add-hook 'riece-after-display-message-functions
'riece-eval-ruby-display-message-function))
(add-hook 'riece-after-display-message-functions
'riece-eval-ruby-display-message-function))
-(defun riece-eval-ruby-enable ()
- (setq riece-eval-ruby-enabled t))
-
-(defun riece-eval-ruby-disable ()
- (setq riece-eval-ruby-enabled nil))
+(defun riece-eval-ruby-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-eval-ruby-display-message-function))
(provide 'riece-eval-ruby)
(provide 'riece-eval-ruby)