From: yamaoka Date: Mon, 17 Dec 2001 12:17:18 +0000 (+0000) Subject: * wl/wl-e21.el (wl-e21-toolbar-configurations): Replace `auto-resize-tool-bar' X-Git-Tag: wl-2_8_0pre2~16 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b9dc08ce07b25440f57ef29e203912048ead5e77;p=elisp%2Fwanderlust.git * wl/wl-e21.el (wl-e21-toolbar-configurations): Replace `auto-resize-tool-bar' to `auto-resize-tool-bars'. Pavel Janik has realized this in the emacs-w3m list. * wl/wl-demo.el (wl-demo-insert-image): Retry to read *.img file only if it was failed. (wl-demo): Disable undo in the demo buffer. * etc/icons/*.img: Shrink the size of files. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 49bbf8e..d2277eb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2001-12-17 Katsumi Yamaoka + + * wl-e21.el (wl-e21-toolbar-configurations): Replace + `auto-resize-tool-bar' to `auto-resize-tool-bars'. Pavel Janik + has realized this in the emacs-w3m list. + + * wl-demo.el (wl-demo-insert-image): Retry to read *.img file only + if it was failed. + (wl-demo): Disable undo in the demo buffer. + 2001-12-15 Yuuichi Teranishi * wl-version.el (wl-version): Changed codename. diff --git a/wl/wl-demo.el b/wl/wl-demo.el index 72bdb9f..b35a2b0 100644 --- a/wl/wl-demo.el +++ b/wl/wl-demo.el @@ -200,24 +200,38 @@ Return a number of lines that an image occupies in the buffer." ((eq 'bitmap image-type) ;; Use ready-composed bitmap image. (require 'bitmap) - (if wl-on-emacs21 - (progn - ;; Decode bitmap data line by line. - (let ((coding-system-for-read 'raw-text)) - (insert-file-contents file)) - (while (not (eobp)) - (decode-coding-region (point) (line-end-position) - 'iso-2022-7bit) - (forward-line 1)) - (goto-char (point-min))) - (let ((coding-system-for-read 'iso-2022-7bit) - (input-coding-system '*iso-2022-jp*)) - (insert-file-contents file))) - (end-of-line) + (let ((coding-system-for-read 'iso-2022-7bit) + (input-coding-system '*iso-2022-jp*)) + (insert-file-contents file)) + (goto-char (point-max)) + (unless (bolp) + (insert "\n")) + (setq width 0) + (while (progn + (end-of-line 0) + (not (bobp))) + (setq width (max width (current-column)))) + ;; Emacs 21.1 would fail to decode composite chars + ;; if it has been built without fixing coding.c. + (when (and wl-on-emacs21 + (>= width 80)) + (erase-buffer) + (let ((coding-system-for-read 'raw-text)) + (insert-file-contents file)) + (goto-char (point-max)) + (unless (bolp) + (insert "\n")) + (setq width 0) + (while (progn + (end-of-line 0) + (not (bobp))) + ;; Decode bitmap data line by line. + (decode-coding-region (line-beginning-position) + (point) + 'iso-2022-7bit) + (setq width (max width (current-column))))) (indent-rigidly (point-min) (point-max) - (max 0 (/ (1+ (- (window-width) - (current-column))) - 2))) + (max 0 (/ (1+ (- (window-width) width)) 2))) (put-text-property (point-min) (point-max) 'face 'wl-highlight-logo-face) (count-lines (point-min) (goto-char (point-max)))) @@ -301,6 +315,7 @@ argument." (get-buffer-create "*WL Demo*")))) (switch-to-buffer buffer) (setq buffer-read-only nil) + (buffer-disable-undo) (erase-buffer) (setq truncate-lines t tab-width 8) diff --git a/wl/wl-e21.el b/wl/wl-e21.el index e33d3fe..579749c 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -198,7 +198,7 @@ success))) (defvar wl-e21-toolbar-configurations - '((auto-resize-tool-bar . t) + '((auto-resize-tool-bars . t) (auto-raise-tool-bar-buttons . t) (tool-bar-button-margin . 0) (tool-bar-button-relief . 2)))