projects
/
elisp
/
riece.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* riece-commands.el (riece-command-save-variables): New command.
[elisp/riece.git]
/
lisp
/
riece-channel.el
diff --git
a/lisp/riece-channel.el
b/lisp/riece-channel.el
index
a59b7ed
..
a4fc8bd
100644
(file)
--- a/
lisp/riece-channel.el
+++ b/
lisp/riece-channel.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.
;;; Code:
;;; Code:
@@
-28,21
+28,24
@@
(require 'riece-globals)
(require 'riece-identity)
(require 'riece-mode)
(require 'riece-globals)
(require 'riece-identity)
(require 'riece-mode)
+(require 'riece-cache)
;;; Channel object:
(defun riece-find-channel (name)
"Get a channel object named NAME from the server buffer."
;;; Channel object:
(defun riece-find-channel (name)
"Get a channel object named NAME from the server buffer."
+ (riece-cache-get riece-channel-cache name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
- riece-obarray)))
+ riece-channel-obarray)))
(if symbol
(symbol-value symbol))))
(defun riece-forget-channel (name)
(if symbol
(symbol-value symbol))))
(defun riece-forget-channel (name)
+ (riece-cache-delete riece-channel-cache name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
- riece-obarray)))
+ riece-channel-obarray)))
(when symbol
(makunbound symbol)
(when symbol
(makunbound symbol)
- (unintern (symbol-name symbol) riece-obarray))))
+ (unintern (symbol-name symbol) riece-channel-obarray))))
(defun riece-make-channel (users topic modes banned invited uninvited key)
"Make an instance of channel object.
(defun riece-make-channel (users topic modes banned invited uninvited key)
"Make an instance of channel object.
@@
-53,11
+56,14
@@
respectively."
(defun riece-get-channel (name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
(defun riece-get-channel (name)
(let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
- riece-obarray)))
+ riece-channel-obarray)))
(if symbol
(if symbol
- (symbol-value symbol)
+ (progn
+ (riece-cache-get riece-channel-cache name)
+ (symbol-value symbol))
+ (riece-cache-set riece-channel-cache name name)
(set (intern (riece-identity-canonicalize-prefix name)
(set (intern (riece-identity-canonicalize-prefix name)
- riece-obarray)
+ riece-channel-obarray)
(riece-make-channel nil nil nil nil nil nil nil)))))
(defun riece-channel-users (channel)
(riece-make-channel nil nil nil nil nil nil nil)))))
(defun riece-channel-users (channel)