From: ueno Date: Sat, 13 Aug 2005 09:06:08 +0000 (+0000) Subject: * riece-async.el (riece-async-open-network-stream): Locate Ruby X-Git-Tag: channel-coding-branchpoint~108 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9030aea66d89e75d4d0d63d779456f210117023a;p=elisp%2Friece.git * riece-async.el (riece-async-open-network-stream): Locate Ruby script file in riece-data-directory. * riece-toolbar.el (riece-make-toolbar-from-menu): Locate Ruby script file in riece-data-directory. * riece-ruby.el (riece-ruby-execute): Locate Ruby script file in riece-data-directory. * riece-options.el (riece-data-directory): New user option. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8a3a8f..f723e34 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2005-08-13 Daiki Ueno + * riece-async.el (riece-async-open-network-stream): Locate Ruby + script file in riece-data-directory. + * riece-toolbar.el (riece-make-toolbar-from-menu): Locate Ruby + script file in riece-data-directory. + * riece-ruby.el (riece-ruby-execute): Locate Ruby script file in + riece-data-directory. + * riece-options.el (riece-data-directory): New user option. + * riece-ruby.el (riece-ruby-execute): Bind process-connection-type to nil. diff --git a/lisp/riece-async.el b/lisp/riece-async.el index 8ec6fd2..1434c73 100644 --- a/lisp/riece-async.el +++ b/lisp/riece-async.el @@ -69,16 +69,11 @@ assumed that the file is in the same directory of this file.") ;;;###autoload (defun riece-async-open-network-stream (name buffer host service) - (let* ((process-connection-type nil) + (let* (process-connection-type (process (apply #'start-process name buffer riece-ruby-command - (if (file-name-absolute-p riece-ruby-server-program) - riece-async-server-program - (expand-file-name - riece-async-server-program - (file-name-directory - (locate-library - (symbol-file 'riece-async-open-network-stream))))) + (expand-file-name riece-async-server-program + riece-data-directory) riece-async-server-program-arguments))) (if buffer (save-excursion diff --git a/lisp/riece-identity.el b/lisp/riece-identity.el index 09c45bf..adada4c 100644 --- a/lisp/riece-identity.el +++ b/lisp/riece-identity.el @@ -43,11 +43,11 @@ RFC2812, 2.2 \"Character codes\" says: equivalence of two nicknames or channel names.") (defun riece-identity-prefix (identity) - "Return the component sans its server from IDENTITY." + "Return the component sans its server name from IDENTITY." (aref identity 0)) (defun riece-identity-server (identity) - "Return the server component in IDENTITY." + "Return the server name component in IDENTITY." (aref identity 1)) (defun riece-make-identity (prefix server) @@ -55,7 +55,7 @@ RFC2812, 2.2 \"Character codes\" says: (vector prefix server)) (defun riece-identity-equal (ident1 ident2) - "Return t, if IDENT1 and IDENT2 is equal." + "Return t, if IDENT1 and IDENT2 are equal." (and (riece-identity-equal-no-server (riece-identity-prefix ident1) (riece-identity-prefix ident2)) @@ -76,7 +76,7 @@ RFC2812, 2.2 \"Character codes\" says: prefix)) (defun riece-identity-equal-no-server (prefix1 prefix2) - "Return t, if IDENT1 and IDENT2 is equal without server part." + "Return t, if IDENT1 and IDENT2 are equal without server part." (equal (riece-identity-canonicalize-prefix prefix1) (riece-identity-canonicalize-prefix prefix2))) diff --git a/lisp/riece-options.el b/lisp/riece-options.el index d694dba..2d39612 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -76,7 +76,7 @@ See the document of the function `recenter'." :group 'riece-looks) (defcustom riece-directory (expand-file-name "~/.riece") - "Where to look for data files." + "Where to look for startup files." :type 'directory :group 'riece-options) @@ -86,6 +86,14 @@ See the document of the function `recenter'." :type 'directory :group 'riece-options) +(defcustom riece-data-directory + (if (fboundp 'locate-data-directory) + (locate-data-directory "riece") + (file-name-directory (locate-library (symbol-file 'riece-data-directory)))) + "Where to look for data files." + :type 'directory + :group 'riece-options) + (defcustom riece-variables-file (expand-file-name "init" riece-directory) "Where to look for variables." diff --git a/lisp/riece-ruby.el b/lisp/riece-ruby.el index 12d29ef..290fecb 100644 --- a/lisp/riece-ruby.el +++ b/lisp/riece-ruby.el @@ -262,13 +262,8 @@ Return a string name assigned by the server." (setq riece-ruby-process (apply #'start-process "riece-ruby" (generate-new-buffer " *Ruby*") riece-ruby-command - (if (file-name-absolute-p riece-ruby-server-program) - riece-ruby-server-program - (expand-file-name - riece-ruby-server-program - (file-name-directory - (locate-library - (symbol-file 'riece-ruby-execute))))) + (expand-file-name riece-ruby-server-program + riece-data-directory) riece-ruby-server-program-arguments)) (process-kill-without-query riece-ruby-process) (set-process-filter riece-ruby-process #'riece-ruby-filter) diff --git a/lisp/riece-toolbar.el b/lisp/riece-toolbar.el index fc22878..3c076e5 100644 --- a/lisp/riece-toolbar.el +++ b/lisp/riece-toolbar.el @@ -62,14 +62,10 @@ (let ((pointer items) toolbar file - menu-item - (riece-data-directory (locate-data-directory "riece"))) + menu-item) (while pointer (setq file (locate-file (symbol-name (car pointer)) - (if riece-data-directory - (cons riece-data-directory - load-path) - load-path) + (cons riece-data-directory load-path) '(".xpm" ".pbm" ".xbm")) menu-item (riece-toolbar-find-menu-item (car pointer))) (if (and file (file-exists-p file))