projects
/
riece
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make "^C<fg>[,<bg>]" ctlseq matching robuster.
[riece]
/
lisp
/
riece-shrink-buffer.el
diff --git
a/lisp/riece-shrink-buffer.el
b/lisp/riece-shrink-buffer.el
index
7b78b36
..
69d4a07
100644
(file)
--- a/
lisp/riece-shrink-buffer.el
+++ b/
lisp/riece-shrink-buffer.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., 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:
@@
-29,6
+29,7
@@
;;; Code:
(require 'riece-globals)
;;; Code:
(require 'riece-globals)
+(require 'derived)
(defgroup riece-shrink-buffer nil
"Free old IRC messages to save memory usage."
(defgroup riece-shrink-buffer nil
"Free old IRC messages to save memory usage."
@@
-61,16
+62,13
@@
(while buffers
(if (and (get 'riece-shrink-buffer 'riece-addon-enabled)
(buffer-live-p (car buffers))
(while buffers
(if (and (get 'riece-shrink-buffer 'riece-addon-enabled)
(buffer-live-p (car buffers))
- (eq (derived-mode-class
- (with-current-buffer (car buffers)
- major-mode))
- 'riece-dialogue-mode))
+ (with-current-buffer (car buffers)
+ (riece-derived-mode-p 'riece-dialogue-mode)))
(riece-shrink-buffer (car buffers)))
(setq buffers (cdr buffers)))))
(defun riece-shrink-buffer (buffer)
(riece-shrink-buffer (car buffers)))
(setq buffers (cdr buffers)))))
(defun riece-shrink-buffer (buffer)
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(goto-char (point-min))
(while (> (buffer-size) riece-max-buffer-size)
(let* ((inhibit-read-only t)
(goto-char (point-min))
(while (> (buffer-size) riece-max-buffer-size)
(let* ((inhibit-read-only t)