annotate lisp/gnus/compface.el @ 112451:98ad7c9e56a3

gnus-html.el (gnus-html-image-fetched): Don't kill the temporary buffer after being called. It's apparently being killed by url.el, and killing it made point move to end-of-buffer in a random buffer. shr.el (shr-image-fetched): Ditto. shr.el (shr-image-fetched): Avoid having point move in the article buffer. gnus-html.el (gnus-html-image-fetched): Kill the buffer anyway, and fix the bug in url-http.el instead. shr.el (shr-image-fetched): Ditto. gravatar.el (gravatar-retrieve): Be silent when retrieving. gnus-gravatar.el (gnus-gravatar-insert): Don't move point around in the article buffer. (gnus-gravatar-insert): Use blank space from the current buffer to avoid breaking text properties. This makes X-Sent updating work again. gnus-art.el (gnus-article-read-summary-keys): Don't call disabled commands.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 24 Jan 2011 04:10:19 +0000
parents 417b1e4d63cd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
1 ;;; compface.el --- functions for converting X-Face headers
64754
fafd692d1e40 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64085
diff changeset
2
112218
376148b31b5e Add 2011 to FSF/AIST copyright years.
Glenn Morris <rgm@gnu.org>
parents: 106815
diff changeset
3 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
4
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
6 ;; Keywords: news
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
7
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
9
94662
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
94662
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
12 ;; the Free Software Foundation, either version 3 of the License, or
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
13 ;; (at your option) any later version.
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
14
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
19
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
94662
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
22
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
23 ;;; Commentary:
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
24
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
25 ;;; Code:
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
26
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
27 ;;;###
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
28 (defun uncompface (face)
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
29 "Convert FACE to pbm.
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
30 Requires the external programs `uncompface', and `icontopbm'. On a
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
31 GNU/Linux system these might be in packages with names like `compface'
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
32 or `faces-xface' and `netpbm' or `libgr-progs', for instance."
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
33 (with-temp-buffer
93836
f4db18a43b84 (uncompface): Make buffer unibyte.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 79708
diff changeset
34 (unless (featurep 'xemacs) (set-buffer-multibyte nil))
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
35 (insert face)
72425
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
36 (let ((coding-system-for-read 'raw-text)
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
37 ;; At least "icontopbm" doesn't work with Windows because
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
38 ;; the line-break code is converted into CRLF by default.
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
39 (coding-system-for-write 'binary))
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
40 (and (eq 0 (apply 'call-process-region (point-min) (point-max)
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
41 "uncompface"
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
42 'delete '(t nil) nil))
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
43 (progn
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
44 (goto-char (point-min))
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
45 (insert "/* Width=48, Height=48 */\n")
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
46 ;; I just can't get "icontopbm" to work correctly on its
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
47 ;; own in XEmacs. And Emacs doesn't understand un-raw pbm
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
48 ;; files.
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
49 (if (not (featurep 'xemacs))
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
50 (eq 0 (call-process-region (point-min) (point-max)
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
51 "icontopbm"
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
52 'delete '(t nil)))
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
53 (shell-command-on-region (point-min) (point-max)
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
54 "icontopbm | pnmnoraw"
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
55 (current-buffer) t)
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
56 t))
4fa1b5c6a34c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
57 (buffer-string)))))
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
58
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
59 (provide 'compface)
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
60
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
diff changeset
61 ;;; compface.el ends here