From 6eec90631408fc69b0052c521369026d2635ca49 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Jun 2007 03:01:08 +0000 Subject: * image-mode.el (image-forward-hscroll, image-backward-hscroll) (image-next-line, image-previous-line, image-scroll-up) (image-scroll-down, image-bol, image-eol, image-bob, image-eob): New functions. (image-mode-map): Remap motion commands. (image-mode-text-map): New keymap for viewing images as text. (image-mode): Use image-mode-map. (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps. --- lisp/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79fb349d949..3e7b4885e78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2007-06-08 Chong Yidong + + * image-mode.el (image-forward-hscroll, image-backward-hscroll) + (image-next-line, image-previous-line, image-scroll-up) + (image-scroll-down, image-bol, image-eol, image-bob, image-eob): + New functions. + (image-mode-map): Remap motion commands. + (image-mode-text-map): New keymap for viewing images as text. + (image-mode): Use image-mode-map. + (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps. + 2007-06-07 Michael Albinus Sync with Tramp 2.0.56. -- cgit v1.2.1 From 736697e013c480f1c902e36144ae3b124e4df6fc Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Jun 2007 03:01:25 +0000 Subject: (image-forward-hscroll, image-backward-hscroll) (image-next-line, image-previous-line, image-scroll-up) (image-scroll-down, image-bol, image-eol, image-bob, image-eob): New functions. (image-mode-map): Remap motion commands. (image-mode-text-map): New keymap for viewing images as text. (image-mode): Use image-mode-map. (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps. --- lisp/image-mode.el | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 156 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/image-mode.el b/lisp/image-mode.el index eb08de1d6bb..18246b8dc90 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -43,11 +43,160 @@ ;;;###autoload (push '("\\.p[bpgn]m\\'" . image-mode) auto-mode-alist) ;;;###autoload (push '("\\.x[bp]m\\'" . image-mode-maybe) auto-mode-alist) +;;; Image scrolling functions + +(defun image-forward-hscroll (&optional n) + "Scroll image in current window to the left by N character widths. +Stop if the right edge of the image is reached." + (interactive "p") + (cond ((= n 0) nil) + ((< n 0) + (set-window-hscroll nil (max 0 (+ (window-hscroll) n)))) + (t + (let* ((image (get-text-property 1 'display)) + (img-width (ceiling (car (image-size image)))) + (edges (window-inside-edges)) + (win-width (- (nth 2 edges) (nth 0 edges)))) + (set-window-hscroll nil + (min (max 0 (- img-width win-width)) + (+ n (window-hscroll)))))))) + +(defun image-backward-hscroll (&optional n) + "Scroll image in current window to the right by N character widths. +Stop if the left edge of the image is reached." + (interactive "p") + (image-forward-hscroll (- n))) + +(defun image-next-line (&optional n) + "Scroll image in current window upward by N lines. +Stop if the bottom edge of the image is reached." + (interactive "p") + (cond ((= n 0) nil) + ((< n 0) + (set-window-vscroll nil (max 0 (+ (window-vscroll) n)))) + (t + (let* ((image (get-text-property 1 'display)) + (img-height (ceiling (cdr (image-size image)))) + (edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (set-window-vscroll nil + (min (max 0 (- img-height win-height)) + (+ n (window-vscroll)))))))) + +(defun image-previous-line (&optional n) + "Scroll image in current window downward by N lines. +Stop if the top edge of the image is reached." + (interactive "p") + (image-next-line (- n))) + +(defun image-scroll-up (&optional n) + "Scroll image in current window upward by N lines. +Stop if the bottom edge of the image is reached. +If ARG is omitted or nil, scroll upward by a near full screen. +A near full screen is `next-screen-context-lines' less than a full screen. +Negative ARG means scroll downward. +If ARG is the atom `-', scroll downward by nearly full screen. +When calling from a program, supply as argument a number, nil, or `-'." + (interactive "P") + (cond ((null n) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (max 0 (- win-height next-screen-context-lines))))) + ((eq n '-) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (min 0 (- next-screen-context-lines win-height))))) + (t (image-next-line (prefix-numeric-value n))))) + +(defun image-scroll-down (&optional n) + "Scroll image in current window downward by N lines +Stop if the top edge of the image is reached. +If ARG is omitted or nil, scroll downward by a near full screen. +A near full screen is `next-screen-context-lines' less than a full screen. +Negative ARG means scroll upward. +If ARG is the atom `-', scroll upward by nearly full screen. +When calling from a program, supply as argument a number, nil, or `-'." + (interactive "P") + (cond ((null n) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (min 0 (- next-screen-context-lines win-height))))) + ((eq n '-) + (let* ((edges (window-inside-edges)) + (win-height (- (nth 3 edges) (nth 1 edges)))) + (image-next-line + (max 0 (- win-height next-screen-context-lines))))) + (t (image-next-line (- (prefix-numeric-value n)))))) + +(defun image-bol (arg) + "Scroll horizontally to the left edge of the image in the current window. +With argument ARG not nil or 1, move forward ARG - 1 lines first, +stopping if the top or bottom edge of the image is reached." + (interactive "p") + (and arg + (/= (setq arg (prefix-numeric-value arg)) 1) + (image-next-line (- arg 1))) + (set-window-hscroll (selected-window) 0)) + +(defun image-eol (arg) + "Scroll horizontally to the right edge of the image in the current window. +With argument ARG not nil or 1, move forward ARG - 1 lines first, +stopping if the top or bottom edge of the image is reached." + (interactive "p") + (and arg + (/= (setq arg (prefix-numeric-value arg)) 1) + (image-next-line (- arg 1))) + (let* ((image (get-text-property 1 'display)) + (edges (window-inside-edges)) + (win-width (- (nth 2 edges) (nth 0 edges))) + (img-width (ceiling (car (image-size image))))) + (set-window-hscroll (selected-window) + (max 0 (- img-width win-width))))) + +(defun image-bob () + "Scroll to the top-left corner of the image in the current window." + (interactive) + (set-window-hscroll (selected-window) 0) + (set-window-vscroll (selected-window) 0)) + +(defun image-eob () + "Scroll to the bottom-right corner of the image in the current window." + (interactive) + (let* ((image (get-text-property 1 'display)) + (edges (window-inside-edges)) + (win-width (- (nth 2 edges) (nth 0 edges))) + (img-width (ceiling (car (image-size image)))) + (win-height (- (nth 3 edges) (nth 1 edges))) + (img-height (ceiling (cdr (image-size image))))) + (set-window-hscroll (selected-window) (max 0 (- img-width win-width))) + (set-window-vscroll (selected-window) (max 0 (- img-height win-height))))) + +;;; Image Mode setup + (defvar image-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-c" 'image-toggle-display) + (define-key map [remap forward-char] 'image-forward-hscroll) + (define-key map [remap backward-char] 'image-backward-hscroll) + (define-key map [remap previous-line] 'image-previous-line) + (define-key map [remap next-line] 'image-next-line) + (define-key map [remap scroll-up] 'image-scroll-up) + (define-key map [remap scroll-down] 'image-scroll-down) + (define-key map [remap move-beginning-of-line] 'image-bol) + (define-key map [remap move-end-of-line] 'image-eol) + (define-key map [remap beginning-of-buffer] 'image-bob) + (define-key map [remap end-of-buffer] 'image-eob) + map) + "Major mode keymap for viewing images in Image mode.") + +(defvar image-mode-text-map (let ((map (make-sparse-keymap))) (define-key map "\C-c\C-c" 'image-toggle-display) map) - "Major mode keymap for Image mode.") + "Major mode keymap for viewing images as text in Image mode.") ;;;###autoload (defun image-mode () @@ -58,13 +207,13 @@ to toggle between display as an image and display as text." (kill-all-local-variables) (setq mode-name "Image") (setq major-mode 'image-mode) - (use-local-map image-mode-map) (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) (if (and (display-images-p) (not (get-text-property (point-min) 'display))) (image-toggle-display) ;; Set next vars when image is already displayed but local ;; variables were cleared by kill-all-local-variables + (use-local-map image-mode-map) (setq cursor-type nil truncate-lines t)) (run-mode-hooks 'image-mode-hook) (if (display-images-p) @@ -140,6 +289,8 @@ and showing the image as an image." (set-buffer-modified-p modified) (kill-local-variable 'cursor-type) (kill-local-variable 'truncate-lines) + (kill-local-variable 'auto-hscroll-mode) + (use-local-map image-mode-text-map) (if (called-interactively-p) (message "Repeat this command to go back to displaying the image"))) ;; Turn the image data into a real image, but only if the whole file @@ -177,6 +328,9 @@ and showing the image as an image." ;; This just makes the arrow displayed in the right fringe ;; area look correct when the image is wider than the window. (setq truncate-lines t) + ;; Allow navigation of large images + (set (make-local-variable 'auto-hscroll-mode) nil) + (use-local-map image-mode-map) (if (called-interactively-p) (message "Repeat this command to go back to displaying the file as text"))))) -- cgit v1.2.1 From b258555dcbe1a4673c2ba8c1cc6c4d3f87015068 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 9 Jun 2007 00:13:10 +0000 Subject: (desktop-minor-mode-table): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/desktop.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3e7b4885e78..1fb3fc380df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-09 Davis Herring + + * desktop.el (desktop-minor-mode-table): Doc fix. + 2007-06-08 Chong Yidong * image-mode.el (image-forward-hscroll, image-backward-hscroll) diff --git a/lisp/desktop.el b/lisp/desktop.el index 92f6a448574..e44e943db3e 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -423,7 +423,7 @@ Furthermore the major mode function must be autoloaded.") Each entry has the form (NAME RESTORE-FUNCTION). NAME is the name of the buffer-local variable indicating that the minor mode is active. RESTORE-FUNCTION is the function to activate the minor mode. -called. RESTORE-FUNCTION nil means don't try to restore the minor mode. +RESTORE-FUNCTION nil means don't try to restore the minor mode. Only minor modes for which the name of the buffer-local variable and the name of the minor mode function are different have to be added to this table. See also `desktop-minor-mode-handlers'." -- cgit v1.2.1 From 6a29399e7446ac33514d7d518bb2278450fc2cfb Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 9 Jun 2007 12:54:46 +0000 Subject: (rmail-movemail-variant-in-use): Fix doc typo. --- lisp/ChangeLog | 4 ++++ lisp/mail/rmail.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fb3fc380df..569064d7910 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-09 Alfred M. Szmidt (tiny change) + + * mail/rmail.el (rmail-movemail-variant-in-use): Fix doc typo. + 2007-06-09 Davis Herring * desktop.el (desktop-minor-mode-table): Doc fix. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 13aba1a3fb0..2a2f0355ab2 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -228,7 +228,7 @@ Otherwise, look for `movemail' in the directories in `emacs' Means any implementation, compatible with the native Emacs one. This is the default; `mailutils' Means GNU mailutils implementation, capable of handling full -mail URLs as the source mailbox;") +mail URLs as the source mailbox.") ;;;###autoload (defun rmail-movemail-variant-p (&rest variants) -- cgit v1.2.1 From f0fc85830bcfcbfdba13f4f83bf3897f19d9926c Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 11 Jun 2007 05:12:38 +0000 Subject: (custom-variable-type): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/cus-edit.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 569064d7910..f5b63f37570 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-11 Richard Stallman + + * cus-edit.el (custom-variable-type): Doc fix. + 2007-06-09 Alfred M. Szmidt (tiny change) * mail/rmail.el (rmail-movemail-variant-in-use): Fix doc typo. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 4dae3bab018..0984fc73e43 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2500,7 +2500,8 @@ However, setting it through Custom sets the default value.") (defun custom-variable-type (symbol) "Return a widget suitable for editing the value of SYMBOL. If SYMBOL has a `custom-type' property, use that. -Otherwise, look up symbol in `custom-guess-type-alist'." +Otherwise, try matching SYMBOL against `custom-guess-name-alist' and +try matching its doc string against `custom-guess-doc-alist'." (let* ((type (or (get symbol 'custom-type) (and (not (get symbol 'standard-value)) (custom-guess-type symbol)) -- cgit v1.2.1 From 72fa3278be1baf255a3027229e28d3574f17601e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 11 Jun 2007 21:57:11 +0000 Subject: (font-lock-add-keywords): In case font-lock was only half-activated, forcefully activate it completely. --- lisp/ChangeLog | 5 +++++ lisp/font-lock.el | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5b63f37570..41c902b9a86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-06-11 Stefan Monnier + + * font-lock.el (font-lock-add-keywords): In case font-lock was only + half-activated, forcefully activate it completely. + 2007-06-11 Richard Stallman * cus-edit.el (custom-variable-type): Doc fix. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index c826a5f20c6..265cc4bf682 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -698,6 +698,14 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', ;; contain the new keywords. (font-lock-update-removed-keyword-alist mode keywords how)) (t + (when (and font-lock-mode + (not (or font-lock-keywords font-lock-defaults))) + ;; The major mode has not set any keywords, so when we enabled + ;; font-lock-mode it only enabled the font-core.el part, not the + ;; font-lock-mode-internal. Try again. + (font-lock-mode -1) + (set (make-local-variable 'font-lock-defaults) '(nil t)) + (font-lock-mode 1)) ;; Otherwise set or add the keywords now. ;; This is a no-op if it has been done already in this buffer ;; for the correct major mode. -- cgit v1.2.1 From 1d42f49396420ca0d0d246e7122a882e49a635c9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 12 Jun 2007 23:55:58 +0000 Subject: * scroll-lock.el (scroll-lock-mode): Doc fix. --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41c902b9a86..e6391ddf708 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-12 Ralf Angeli + + * scroll-lock.el (scroll-lock-mode): Doc fix. + 2007-06-11 Stefan Monnier * font-lock.el (font-lock-add-keywords): In case font-lock was only -- cgit v1.2.1 From c44a951ac97ddf1548aa02ceab779eedaeb70728 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 12 Jun 2007 23:56:10 +0000 Subject: (scroll-lock-mode): Doc fix. --- lisp/scroll-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el index 7075377d1b0..5896d6478eb 100644 --- a/lisp/scroll-lock.el +++ b/lisp/scroll-lock.el @@ -50,7 +50,7 @@ ;;;###autoload (define-minor-mode scroll-lock-mode - "Minor mode for pager-like scrolling. + "Buffer-local minor mode for pager-like scrolling. Keys which normally move point by line or paragraph will scroll the buffer by the respective amount of lines instead and point will be kept vertically fixed relative to window boundaries -- cgit v1.2.1 From 1f445a397e3411eda2c6baf712b7a48a7de26c8d Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Wed, 13 Jun 2007 19:08:44 +0000 Subject: * term/xterm.el (terminal-init-xterm): Escape parens in character constants. --- lisp/ChangeLog | 5 +++++ lisp/term/xterm.el | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6391ddf708..c8bd63eb17e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-06-13 Johan Bockg,Ae(Brd (tiny change) + + * term/xterm.el (terminal-init-xterm): Escape parens in character + constants. + 2007-06-12 Ralf Angeli * scroll-lock.el (scroll-lock-mode): Doc fix. diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 297ee7df5cd..a7249536f7b 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -272,8 +272,8 @@ (define-key map "\e[27;6;36~" [?\C-$]) (define-key map "\e[27;6;37~" [?\C-%]) (define-key map "\e[27;6;38~" [?\C-&]) - (define-key map "\e[27;6;40~" [?\C-(]) - (define-key map "\e[27;6;41~" [?\C-)]) + (define-key map "\e[27;6;40~" [?\C-\(]) + (define-key map "\e[27;6;41~" [?\C-\)]) (define-key map "\e[27;6;42~" [?\C-*]) (define-key map "\e[27;6;43~" [?\C-+]) (define-key map "\e[27;6;58~" [?\C-:]) @@ -312,8 +312,8 @@ (define-key map "\e[27;14;36~" [?\C-\M-$]) (define-key map "\e[27;14;37~" [?\C-\M-%]) (define-key map "\e[27;14;38~" [?\C-\M-&]) - (define-key map "\e[27;14;40~" [?\C-\M-(]) - (define-key map "\e[27;14;41~" [?\C-\M-)]) + (define-key map "\e[27;14;40~" [?\C-\M-\(]) + (define-key map "\e[27;14;41~" [?\C-\M-\)]) (define-key map "\e[27;14;42~" [?\C-\M-*]) (define-key map "\e[27;14;43~" [?\C-\M-+]) (define-key map "\e[27;14;58~" [?\C-\M-:]) @@ -350,8 +350,8 @@ (define-key map "\e[27;8;36~" [?\C-\M-$]) (define-key map "\e[27;8;37~" [?\C-\M-%]) (define-key map "\e[27;8;38~" [?\C-\M-&]) - (define-key map "\e[27;8;40~" [?\C-\M-(]) - (define-key map "\e[27;8;41~" [?\C-\M-)]) + (define-key map "\e[27;8;40~" [?\C-\M-\(]) + (define-key map "\e[27;8;41~" [?\C-\M-\)]) (define-key map "\e[27;8;42~" [?\C-\M-*]) (define-key map "\e[27;8;43~" [?\C-\M-+]) (define-key map "\e[27;8;58~" [?\C-\M-:]) -- cgit v1.2.1 From 524705ae2da95c571fedb83b3a1c3a80e1335a72 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 14 Jun 2007 10:02:55 +0000 Subject: Merge from gnus--rel--5.10 Patches applied: * emacs--devo--0 (patch 725, 740-741, 749, 768, 777, 786, 788-789, 792) - Merge from gnus--rel--5.10 - Update from CVS - Merge from emacs--rel--22, gnus--rel--5.10 * gnus--rel--5.10 (patch 217-229) - Update from CVS - Merge from emacs--devo--0, emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--rel--22--patch-44 --- lisp/gnus/ChangeLog | 44 +++++++++++++++-- lisp/gnus/gnus-art.el | 15 +++--- lisp/gnus/gnus-ems.el | 123 +++++++++++++++++++++++++++++++++++------------- lisp/gnus/gnus-start.el | 3 +- lisp/gnus/mm-decode.el | 25 +++++----- 5 files changed, 150 insertions(+), 60 deletions(-) (limited to 'lisp') diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e5b314bf20a..f93bc55eb6e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,21 +1,50 @@ +2007-06-08 Katsumi Yamaoka + + * gnus-ems.el (gnus-x-splash): Make it work. + + * gnus-start.el (gnus-1): Relax restrictions that prevent gnus-x-splash + from being used. + + * lpath.el: Bind line-spacing and tool-bar-mode for XEmacs. + + * gnus-art.el (gnus-article-summary-command-nosave): Correct the order + of the arguments passed to pop-to-buffer. + (gnus-article-read-summary-keys): Ditto. + 2007-06-07 Juanma Barranquero - * gnus-art.el (gnus-split-methods): - * mail-source.el (mail-source-delete-old-incoming-confirm): - Fix typo in docstring. + * gnus-art.el (gnus-split-methods): Fix typo in docstring. 2007-06-06 Juanma Barranquero * gnus-diary.el (gnus-diary-time-format, gnus-summary-sort-by-schedule): * gnus-sum.el (gnus-summary-highlight): + * mail-source.el (mail-source-delete-old-incoming-confirm): * nndiary.el (nndiary-reminders): Fix typos in docstrings. +2007-06-04 Katsumi Yamaoka + + * gnus-art.el (gnus-mime-view-part-externally) + (gnus-mime-view-part-internally): Fix predicate function passed to + completing-read. + + * mm-decode.el (mm-image-fit-p): Return t if argument is not an image; + return t if image size is just the same as window size. + 2007-05-28 Katsumi Yamaoka * message.el (message-pop-to-buffer): Add switch-function argument. (message-mail): Pass switch-function argument to it. - (message-narrow-to-headers-or-head): Ignore mail-header-separator in - the body. + +2007-05-24 Katsumi Yamaoka + + * message.el (message-narrow-to-headers-or-head): Ignore + mail-header-separator in the body. + +2007-05-10 Reiner Steib + + * gnus-art.el (gnus-article-mode): Fix comment about displaying + non-break space. 2007-05-09 Didier Verna @@ -35,6 +64,11 @@ (mm-inline-text-html-render-with-w3m-standalone) (mm-inline-render-with-function): Use mail-parse-charset by default. +2007-04-18 Levin Du (tiny change) + + * calendar/parse-time.el (parse-time-string-chars): Check if CHAR + is less than the length of parse-time-syntax. + 2007-04-10 Katsumi Yamaoka * gnus-msg.el (gnus-inews-yank-articles): Use diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 83e4ec71b79..90af0740318 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3925,7 +3925,8 @@ commands: (make-local-variable 'gnus-article-image-alist) (make-local-variable 'gnus-article-charset) (make-local-variable 'gnus-article-ignored-charsets) - ;; Prevent recent Emacsen from displaying non-break space as "\ ". + ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space' + ;; face. (set (make-local-variable 'nobreak-char-display) nil) (setq cursor-in-non-selected-windows nil) (gnus-set-default-directory) @@ -4673,7 +4674,7 @@ specified charset." (mm-enable-external t)) (if (not (stringp method)) (gnus-mime-view-part-as-type - nil (lambda (type) (stringp (mailcap-mime-info type)))) + nil (lambda (types) (stringp (mailcap-mime-info (car types))))) (when handle (if (mm-handle-undisplayer handle) (mm-remove-part handle) @@ -4694,7 +4695,7 @@ If no internal viewer is available, use an external viewer." (inhibit-read-only t)) (if (not (mm-inlinable-p handle)) (gnus-mime-view-part-as-type - nil (lambda (type) (mm-inlinable-p handle type))) + nil (lambda (types) (mm-inlinable-p handle (car types)))) (when handle (if (mm-handle-undisplayer handle) (mm-remove-part handle) @@ -5606,7 +5607,7 @@ not have a face in `gnus-article-boring-faces'." "Execute the last keystroke in the summary buffer." (interactive) (let (func) - (pop-to-buffer gnus-article-current-summary 'norecord) + (pop-to-buffer gnus-article-current-summary nil 'norecord) (setq func (lookup-key (current-local-map) (this-command-keys))) (call-interactively func))) @@ -5645,7 +5646,7 @@ not have a face in `gnus-article-boring-faces'." (member keys nosave-in-article)) (let (func) (save-window-excursion - (pop-to-buffer gnus-article-current-summary 'norecord) + (pop-to-buffer gnus-article-current-summary nil 'norecord) ;; We disable the pick minor mode commands. (let (gnus-pick-mode) (setq func (lookup-key (current-local-map) keys)))) @@ -5657,14 +5658,14 @@ not have a face in `gnus-article-boring-faces'." (call-interactively func) (setq new-sum-point (point))) (when (member keys nosave-but-article) - (pop-to-buffer gnus-article-buffer 'norecord))) + (pop-to-buffer gnus-article-buffer nil 'norecord))) ;; These commands should restore window configuration. (let ((obuf (current-buffer)) (owin (current-window-configuration)) (opoint (point)) win func in-buffer selected new-sum-start new-sum-hscroll) (cond (not-restore-window - (pop-to-buffer gnus-article-current-summary 'norecord)) + (pop-to-buffer gnus-article-current-summary nil 'norecord)) ((setq win (get-buffer-window gnus-article-current-summary)) (select-window win)) (t diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index 60e66adc98b..4400b81f041 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el @@ -172,40 +172,95 @@ (defun gnus-x-splash () "Show a splash screen using a pixmap in the current buffer." - (let ((dir (nnheader-find-etc-directory "gnus")) - pixmap file height beg i) - (save-excursion - (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer)) - (let ((buffer-read-only nil) - width height) - (erase-buffer) - (when (and dir - (file-exists-p (setq file - (expand-file-name "x-splash" dir)))) - (let ((coding-system-for-read 'raw-text) - default-enable-multibyte-characters) - (with-temp-buffer - (insert-file-contents file) - (goto-char (point-min)) - (ignore-errors - (setq pixmap (read (current-buffer))))))) - (when pixmap - (make-face 'gnus-splash) - (setq height (/ (car pixmap) (frame-char-height)) - width (/ (cadr pixmap) (frame-char-width))) - (set-face-foreground 'gnus-splash "Brown") - (set-face-stipple 'gnus-splash pixmap) - (insert-char ?\n (* (/ (window-height) 2 height) height)) - (setq i height) - (while (> i 0) - (insert-char ?\ (* (/ (window-width) 2 width) width)) - (setq beg (point)) - (insert-char ?\ width) - (set-text-properties beg (point) '(face gnus-splash)) - (insert ?\n) - (decf i)) - (goto-char (point-min)) - (sit-for 0)))))) + (interactive) + (unless window-system + (error "`gnus-x-splash' requires running on the window system")) + (switch-to-buffer (gnus-get-buffer-create (if (or (gnus-alive-p) + (interactive-p)) + "*gnus-x-splash*" + gnus-group-buffer))) + (let ((inhibit-read-only nil) + (file (nnheader-find-etc-directory "images/gnus/x-splash" t)) + pixmap fcw fch width height fringes sbars left yoffset top ls) + (erase-buffer) + (when (and file + (ignore-errors + (let ((coding-system-for-read 'raw-text) + default-enable-multibyte-characters) + (with-temp-buffer + (insert-file-contents file) + (goto-char (point-min)) + (setq pixmap (read (current-buffer))))))) + (setq fcw (float (frame-char-width)) + fch (float (frame-char-height)) + width (/ (car pixmap) fcw) + height (/ (cadr pixmap) fch) + fringes (if (fboundp 'window-fringes) + (eval '(window-fringes)) + '(10 11 nil)) + sbars (frame-parameter nil 'vertical-scroll-bars)) + (cond ((eq sbars 'right) + (setq sbars + (cons 0 (/ (or (frame-parameter nil 'scroll-bar-width) 14) + fcw)))) + (sbars + (setq sbars + (cons (/ (or (frame-parameter nil 'scroll-bar-width) 14) + fcw) + 0)))) + (setq left (- (* (round (/ (1- (/ (+ (window-width) + (car sbars) (cdr sbars) + (/ (+ (or (car fringes) 0) + (or (cadr fringes) 0)) + fcw)) + width)) + 2)) + width) + (car sbars) + (/ (or (car fringes) 0) fcw)) + yoffset (cadr (window-edges)) + top (max 0 (- (* (max (if (and tool-bar-mode + (not (featurep 'gtk)) + (eq (frame-first-window) + (selected-window))) + 1 0) + (round (/ (1- (/ (+ (1- (window-height)) + (* 2 yoffset)) + height)) + 2))) + height) + yoffset)) + ls (/ (or line-spacing 0) fch) + height (max 0 (- height ls))) + (cond ((>= (- top ls) 1) + (insert + (propertize + " " + 'display `(space :width 0 :ascent 100)) + "\n" + (propertize + " " + 'display `(space :width 0 :height ,(- top ls 1) :ascent 100)) + "\n")) + ((> (- top ls) 0) + (insert + (propertize + " " + 'display `(space :width 0 :height ,(- top ls) :ascent 100)) + "\n"))) + (if (and (> width 0) (> left 0)) + (insert (propertize + " " + 'display `(space :width ,left :height ,height :ascent 0))) + (setq width (+ width left))) + (when (> width 0) + (insert (propertize + " " + 'display `(space :width ,width :height ,height :ascent 0) + 'face `(gnus-splash :stipple ,pixmap)))) + (goto-char (if (<= (- top ls) 0) (1- (point)) (point-min))) + (redraw-frame (selected-frame)) + (sit-for 0)))) ;;; Image functions. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 9fbab8b340b..d906cec6c6a 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -758,8 +758,7 @@ prompt the user for the name of an NNTP server to use." (cond ((featurep 'xemacs) (gnus-xmas-splash)) - ((and window-system - (= (frame-height) (1+ (window-height)))) + (window-system (gnus-x-splash)))) (let ((level (and (numberp arg) (> arg 0) arg)) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 6d52d8b2f16..028855ab341 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1371,18 +1371,19 @@ be determined." (defun mm-image-fit-p (handle) "Say whether the image in HANDLE will fit the current window." (let ((image (mm-get-image handle))) - (if (fboundp 'glyph-width) - ;; XEmacs' glyphs can actually tell us about their width, so - ;; lets be nice and smart about them. - (or mm-inline-large-images - (and (< (glyph-width image) (window-pixel-width)) - (< (glyph-height image) (window-pixel-height)))) - (let* ((size (image-size image)) - (w (car size)) - (h (cdr size))) - (or mm-inline-large-images - (and (< h (1- (window-height))) ; Don't include mode line. - (< w (window-width)))))))) + (or (not image) + (if (fboundp 'glyph-width) + ;; XEmacs' glyphs can actually tell us about their width, so + ;; lets be nice and smart about them. + (or mm-inline-large-images + (and (<= (glyph-width image) (window-pixel-width)) + (<= (glyph-height image) (window-pixel-height)))) + (let* ((size (image-size image)) + (w (car size)) + (h (cdr size))) + (or mm-inline-large-images + (and (<= h (1- (window-height))) ; Don't include mode line. + (<= w (window-width))))))))) (defun mm-valid-image-format-p (format) "Say whether FORMAT can be displayed natively by Emacs." -- cgit v1.2.1