Provides an interactive environment for manipulating an inferior
process running some form of Lisp.
- * JDE: <URL:http://jdee.sunsite.dk/>
+ * JDEE: <URL:http://jdee.sunsite.dk/>
Provides a Java development environment for Emacs.
- * Mule-UCS: Universal enCoding System:
- <URL:ftp://ftp.m17n.org/pub/mule/Mule-UCS/>
- Extended coding systems for Mule, specifically for reading and
- writing UTF-8 encoded Unicode. This probably doesn't have much
- advantage over the built-in `mule-utf-8' coding system with
- `utf-translate-cjk' turned on.
-
* Mailcrypt:
- <URL:http://www.pobox.com/%7Elbudney/linux/software/mailcrypt.html>
+ <URL:http://mailcrypt.sourceforge.net/>
PGP and GPG support. PGP isn't free software, but GPG, the GNU
Privacy Guard, is a free replacement <URL:http://www.gnupg.org/>.
;;; desktop.el --- save partial status of Emacs when killed
--;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001
++;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001, 2005
;; Free Software Foundation, Inc.
;; Author: Morten Welinder <terra@diku.dk>
(erase-buffer)
(insert
- ";; -*- coding: utf-8-emacs; -*-\n"
- ";; -*- mode: emacs-lisp; coding: emacs-mule; -*-\n"
++ ";; -*- mode: emacs-lisp; coding: utf-8-emacs; -*-\n"
desktop-header
";; Created " (current-time-string) "\n"
";; Desktop file format version " desktop-file-version "\n"
(insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n")
(mapc #'(lambda (l)
- (if (apply 'desktop-save-buffer-p l)
- (progn
- (insert "(desktop-create-buffer " desktop-file-version)
- (mapc #'(lambda (e)
- (insert "\n " (desktop-value-to-string e)))
- l)
- (insert ")\n\n"))))
- info)
+ (when (apply 'desktop-save-buffer-p l)
+ (insert "("
+ (if (or (not (integerp eager))
+ (unless (zerop eager)
+ (setq eager (1- eager))
+ t))
+ "desktop-create-buffer"
+ "desktop-append-buffer-args")
+ " "
+ desktop-file-version)
+ (mapc #'(lambda (e)
+ (insert "\n " (desktop-value-to-string e)))
+ l)
+ (insert ")\n\n")))
+ info)
(setq default-directory dirname)
(when (file-exists-p filename) (delete-file filename))
- (let ((coding-system-for-write 'emacs-mule))
+ (let ((coding-system-for-write 'utf-8-emacs))
(write-region (point-min) (point-max) filename nil 'nomessage))))
(setq desktop-dirname dirname))
int, int));
int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int,
int, int *, enum face_id, int));
+ int merge_faces P_ ((struct frame *, Lisp_Object, int, int));
int compute_char_face P_ ((struct frame *, int, Lisp_Object));
void free_all_realized_faces P_ ((Lisp_Object));
+void free_realized_face P_ ((struct frame *, struct face *));
extern Lisp_Object Qforeground_color, Qbackground_color;
extern char unspecified_fg[], unspecified_bg[];
-void free_realized_multibyte_face P_ ((struct frame *, int));
+extern Lisp_Object split_font_name_into_vector P_ ((Lisp_Object));
+extern Lisp_Object build_font_name_from_vector P_ ((Lisp_Object));
/* Defined in xfns.c */
}
else
{
- /* We have a string in Vglyph_table. */
- Lisp_Object string;
-
- string = tbase[g];
- if (! STRING_MULTIBYTE (string))
- string = string_to_multibyte (string);
- nbytes = buf - encode_terminal_buf;
- if (encode_terminal_bufsize < nbytes + SBYTES (string))
+ /* C is not encodable. */
+ *buf++ = '?';
+ nchars++;
+ while (src + 1 < src_end && CHAR_GLYPH_PADDING_P (src[1]))
{
- encode_terminal_bufsize = nbytes + SBYTES (string);
- encode_terminal_buf = xrealloc (encode_terminal_buf,
- encode_terminal_bufsize);
- buf = encode_terminal_buf + nbytes;
+ *buf++ = '?';
+ nchars++;
+ src++;
}
- bcopy (SDATA (string), buf, SBYTES (string));
- buf += SBYTES (string);
- nchars += SCHARS (string);
}
}
- if (nbytes + SBYTES (string) < encode_terminal_src_size)
+ else
+ {
+ unsigned char *p = SDATA (string), *pend = p + SBYTES (string);
+
+ if (! STRING_MULTIBYTE (string))
+ string = string_to_multibyte (string);
+ nbytes = buf - encode_terminal_src;
++ if (encode_terminal_src_size < nbytes + SBYTES (string))
+ {
+ encode_terminal_src_size = nbytes + SBYTES (string);
+ encode_terminal_src = xrealloc (encode_terminal_src,
+ encode_terminal_src_size);
+ buf = encode_terminal_src + nbytes;
+ }
+ bcopy (SDATA (string), buf, SBYTES (string));
+ buf += SBYTES (string);
+ nchars += SCHARS (string);
+ }
}
src++;
}
fontp->name = (char *) xmalloc (strlen (fontname) + 1);
bcopy (fontname, fontp->name, strlen (fontname) + 1);
+ if (lf.lfPitchAndFamily == FIXED_PITCH)
+ {
+ /* Fixed width font. */
+ fontp->average_width = fontp->space_width = FONT_WIDTH (font);
+ }
+ else
+ {
+ wchar_t space = 32;
+ XCharStruct* pcm;
+ pcm = w32_per_char_metric (font, &space, ANSI_FONT);
+ if (pcm)
+ fontp->space_width = pcm->width;
+ else
+ fontp->space_width = FONT_WIDTH (font);
+
+ fontp->average_width = font->tm.tmAveCharWidth;
+ }
+
++
+ fontp->charset = -1;
charset = xlfd_charset_of_font (fontname);
/* Cache the W32 codepage for a font. This makes w32_encode_char
/* Implementation of GUI terminal on the Microsoft W32 API.
-- Copyright (C) 1989, 93, 94, 95, 96, 1997, 1998, 1999, 2000, 2001
++ Copyright (C) 1989, 93, 94, 95, 96, 1997, 1998, 1999, 2000, 2001, 2005
Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Function prototypes of this page. */
- static XCharStruct *w32_per_char_metric P_ ((XFontStruct *,
- wchar_t *, int));
+ XCharStruct *w32_per_char_metric P_ ((XFontStruct *, wchar_t *, int));
-static int w32_encode_char P_ ((int, wchar_t *, struct font_info *, int *));
+static int w32_encode_char P_ ((int, wchar_t *, struct font_info *,
+ struct charset *, int *));
/* Get metrics of character CHAR2B in FONT. Value is always non-null.
don't have corresponding multibyte char code are also
translated to octal form. */
else if ((it->c < ' '
- && (it->area != TEXT_AREA
- /* In mode line, treat \n like other crl chars. */
- || (it->c != '\n'
- && it->glyph_row && it->glyph_row->mode_line_p)
- || (it->c != '\n' && it->c != '\t')))
- || (it->multibyte_p
- ? ((it->c >= 127
- && it->len == 1)
- || !CHAR_PRINTABLE_P (it->c)
+ ? (it->area != TEXT_AREA
+ /* In mode line, treat \n, \t like other crl chars. */
+ || (it->c != '\n'
+ && it->glyph_row && it->glyph_row->mode_line_p)
+ || (it->c != '\n' && it->c != '\t'))
+ : (it->multibyte_p
+ ? (!CHAR_PRINTABLE_P (it->c)
- || it->c == 0xA0 /* NO-BREAK SPACE */
- || it->c == 0xAD /* SOFT HYPHEN */)
+ || (!NILP (Vshow_nonbreak_escape)
- && (it->c == 0x8ad || it->c == 0x8a0)))
++ && (it->c == 0xA0 /* NO-BREAK SPACE */
++ || it->c == 0xAD /* SOFT HYPHEN */)))
: (it->c >= 127
- && (!unibyte_display_via_language_environment
- || it->c == unibyte_char_to_multibyte (it->c)))))
+ && (! unibyte_display_via_language_environment
+ || (UNIBYTE_CHAR_HAS_MULTIBYTE_P (it->c)))))))
{
/* IT->c is a control character which must be displayed
either as '\003' or as `^C' where the '\\' and '^'
if (it->dp
&& INTEGERP (DISP_CTRL_GLYPH (it->dp))
&& GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp))))
- g = XINT (DISP_CTRL_GLYPH (it->dp));
+ {
+ g = XINT (DISP_CTRL_GLYPH (it->dp));
+ lface_id = FAST_GLYPH_FACE (g);
+ if (lface_id)
+ {
+ g = FAST_GLYPH_CHAR (g);
+ face_id = merge_faces (it->f, Qt, lface_id,
+ it->face_id);
+ }
+ }
else
- g = FAST_MAKE_GLYPH ('^', face_id);
- XSETINT (it->ctl_chars[0], g);
+ {
+ /* Merge the escape-glyph face into the current face. */
+ face_id = merge_faces (it->f, Qescape_glyph, 0,
+ it->face_id);
+ g = '^';
+ }
- g = FAST_MAKE_GLYPH (it->c ^ 0100, face_id);
+ XSETINT (it->ctl_chars[0], g);
+ g = it->c ^ 0100;
XSETINT (it->ctl_chars[1], g);
ctl_len = 2;
+ goto display_control;
}
- else if (it->c == 0xA0 || it->c == 0xAD)
+
+ if (it->dp
+ && INTEGERP (DISP_ESCAPE_GLYPH (it->dp))
+ && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp))))
{
- /* Set IT->ctl_chars[0] to the glyph for `\\'. */
- if (it->dp
- && INTEGERP (DISP_ESCAPE_GLYPH (it->dp))
- && GLYPH_CHAR_VALID_P (XINT (DISP_ESCAPE_GLYPH (it->dp))))
- g = XINT (DISP_ESCAPE_GLYPH (it->dp));
- else
- g = FAST_MAKE_GLYPH ('\\', face_id);
- XSETINT (it->ctl_chars[0], g);
+ escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp));
+ lface_id = FAST_GLYPH_FACE (escape_glyph);
+ if (lface_id)
+ {
+ escape_glyph = FAST_GLYPH_CHAR (escape_glyph);
+ face_id = merge_faces (it->f, Qt, lface_id,
+ it->face_id);
+ }
+ }
+ else
+ {
+ /* Merge the escape-glyph face into the current face. */
+ face_id = merge_faces (it->f, Qescape_glyph, 0,
+ it->face_id);
+ escape_glyph = '\\';
+ }
- g = FAST_MAKE_GLYPH (it->c == 0xAD ? '-' : ' ', face_id);
- if (it->c == 0x8a0 || it->c == 0x8ad)
++ if (it->c == 0xA0 || it->c == 0xAD)
+ {
+ XSETINT (it->ctl_chars[0], escape_glyph);
- g = it->c == 0x8ad ? '-' : ' ';
++ g = it->c == 0xAD ? '-' : ' ';
XSETINT (it->ctl_chars[1], g);
ctl_len = 2;
+ goto display_control;
}
- else
- {
- unsigned char str[MAX_MULTIBYTE_LENGTH];
- int len;
- int i;
- GLYPH escape_glyph;
- /* Set IT->ctl_chars[0] to the glyph for `\\'. */
- if (it->dp
- && INTEGERP (DISP_ESCAPE_GLYPH (it->dp))
- && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp))))
- escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp));
- else
- escape_glyph = FAST_MAKE_GLYPH ('\\', face_id);
+ {
+ unsigned char str[MAX_MULTIBYTE_LENGTH];
+ int len;
+ int i;
- if (CHAR_BYTE8_P (it->c))
- {
- str[0] = CHAR_TO_BYTE8 (it->c);
- len = 1;
- }
- else if (it->c < 256)
- {
- str[0] = it->c;
- len = 1;
- }
- else
- {
- /* It's an invalid character, which
- shouldn't happen actually, but due to
- bugs it may happen. Let's print the char
- as is, there's not much meaningful we can
- do with it. */
+ /* Set IT->ctl_chars[0] to the glyph for `\\'. */
- if (SINGLE_BYTE_CHAR_P (it->c))
- str[0] = it->c, len = 1;
++ if (CHAR_BYTE8_P (it->c))
++ {
++ str[0] = CHAR_TO_BYTE8 (it->c);
++ len = 1;
++ }
++ else if (it->c < 256)
++ {
++ str[0] = it->c;
++ len = 1;
++ }
+ else
+ {
- len = CHAR_STRING_NO_SIGNAL (it->c, str);
- if (len < 0)
- {
- /* It's an invalid character, which shouldn't
- happen actually, but due to bugs it may
- happen. Let's print the char as is, there's
- not much meaningful we can do with it. */
- str[0] = it->c;
- str[1] = it->c >> 8;
- str[2] = it->c >> 16;
- str[3] = it->c >> 24;
- len = 4;
- }
++ /* It's an invalid character, which shouldn't
++ happen actually, but due to bugs it may
++ happen. Let's print the char as is, there's
++ not much meaningful we can do with it. */
+ str[0] = it->c;
+ str[1] = it->c >> 8;
+ str[2] = it->c >> 16;
+ str[3] = it->c >> 24;
+ len = 4;
}
- for (i = 0; i < len; i++)
- {
- XSETINT (it->ctl_chars[i * 4], escape_glyph);
- /* Insert three more glyphs into IT->ctl_chars for
- the octal display of the character. */
- g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0',
- face_id);
- XSETINT (it->ctl_chars[i * 4 + 1], g);
- g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0',
- face_id);
- XSETINT (it->ctl_chars[i * 4 + 2], g);
- g = FAST_MAKE_GLYPH ((str[i] & 7) + '0',
- face_id);
- XSETINT (it->ctl_chars[i * 4 + 3], g);
- }
- ctl_len = len * 4;
- }
+ for (i = 0; i < len; i++)
+ {
+ XSETINT (it->ctl_chars[i * 4], escape_glyph);
+ /* Insert three more glyphs into IT->ctl_chars for
+ the octal display of the character. */
+ g = ((str[i] >> 6) & 7) + '0';
+ XSETINT (it->ctl_chars[i * 4 + 1], g);
+ g = ((str[i] >> 3) & 7) + '0';
+ XSETINT (it->ctl_chars[i * 4 + 2], g);
+ g = (str[i] & 7) + '0';
+ XSETINT (it->ctl_chars[i * 4 + 3], g);
+ }
+ ctl_len = len * 4;
+ }
+ display_control:
/* Set up IT->dpvec and return first character from it. */
it->dpvec_char_len = it->len;
it->dpvec = it->ctl_chars;