Translate.
[riece] / lisp / riece-eval-ruby.el
index 60d59b1..8595a57 100644 (file)
@@ -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
-;; 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:
 
@@ -41,8 +41,6 @@
   :type 'string
   :group 'riece-eval-ruby)
 
-(defvar riece-eval-ruby-enabled nil)
-
 (defconst riece-eval-ruby-description
   "Evaluate input string as a Ruby program.")
 
@@ -67,7 +65,7 @@
                         '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)))
   (remove-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))
-
 (provide 'riece-eval-ruby)
 
 ;;; riece-eval-ruby.el ends here