Commit 7403ff04 authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from trunk.

parents d3411f89 15e3a074
2011-07-18 Andreas Schwab <>
* charsets/ Update to 2005 edition.
* charsets/ Likewise.
2011-07-17 Bill Wohler <>
Release MH-E version 8.2.93.
* NEWS, MH-E-NEWS: Update for MH-E release 8.2.93.
2011-07-16 Bill Wohler <>
Release MH-E version 8.2.92.
......@@ -3,6 +3,11 @@
Copyright (C) 2001-2011 Free Software Foundation, Inc.
See the end of the file for license conditions.
* Changes in MH-E 8.2.93
Version 8.2.93 reverts back to using `switch-to-buffer' which the
Emacs developers decided was fine to call from programs after all.
* Changes in MH-E 8.2.92
Version 8.2.92 actually corrects the error in the modeline glyph when
......@@ -488,7 +488,7 @@ $ESHELL nor variable `explicit-shell-file-name' is set.
** MH-E
*** Upgraded to MH-E version 8.2.92. See MH-E-NEWS for details.
*** Upgraded to MH-E version 8.2.93. See MH-E-NEWS for details.
** comint and modes derived from it use the generic completion code.
......@@ -1077,6 +1077,11 @@ syntactic rules.
** Syntax tables support a new "comment style c" additionally to style b.
** frame-local variables cannot be let-bound any more.
** prog-mode is a new major-mode meant to be the parent of programming mode.
The prog-mode-hook it defines can be used to enable features for
programming modes. For example:
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
enables on the fly spell checking for comments and strings for
programming modes.
** define-minor-mode accepts a new keyword :variable.
** `delete-file' and `delete-directory' now accept optional arg TRASH.
......@@ -2048,17 +2048,20 @@
0xA6B9-0xA6C0 0xE785
0xA6C1-0xA6D1 0x03B1
0xA6D2-0xA6D8 0x03C3
0xA6D9-0xA6DF 0xE78D
0xA6D9 0xFE10
0xA6DA 0xFE12
0xA6DB 0xFE11
0xA6DC-0xA6DF 0xFE13
0xA6E0-0xA6E1 0xFE35
0xA6E2-0xA6E3 0xFE39
0xA6E4-0xA6E5 0xFE3F
0xA6E6-0xA6E7 0xFE3D
0xA6E8-0xA6EB 0xFE41
0xA6EC-0xA6ED 0xE794
0xA6EC-0xA6ED 0xFE17
0xA6EE-0xA6EF 0xFE3B
0xA6F0-0xA6F1 0xFE37
0xA6F2 0xFE31
0xA6F3 0xE796
0xA6F3 0xFE19
0xA6F4-0xA6F5 0xFE33
0xA6F6-0xA6FE 0xE797
0xA740-0xA77E 0xE706
......@@ -2124,7 +2127,7 @@
0xA8B9 0x00FC
0xA8BA 0x00EA
0xA8BB 0x0251
0xA8BC 0xE7C7
0xA8BC 0x1E3F
0xA8BD 0x0144
0xA8BE 0x0148
0xA8BF 0x01F9
......@@ -10385,13 +10388,15 @@
0xFE4B-0xFE4C 0xFA23
0xFE4D-0xFE4F 0xFA27
0xFE50 0x2E81
0xFE51-0xFE53 0xE816
0xFE51 0x00020087
0xFE52 0x00020089
0xFE53 0x000200CC
0xFE54 0x2E84
0xFE55 0x3473
0xFE56 0x3447
0xFE57 0x2E88
0xFE58 0x2E8B
0xFE59 0xE81E
0xFE59 0x9FB4
0xFE5A 0x359E
0xFE5B 0x361A
0xFE5C 0x360E
......@@ -10399,17 +10404,18 @@
0xFE5E 0x2E97
0xFE5F 0x396E
0xFE60 0x3918
0xFE61 0xE826
0xFE61 0x9FB5
0xFE62 0x39CF
0xFE63 0x39DF
0xFE64 0x3A73
0xFE65 0x39D0
0xFE66-0xFE67 0xE82B
0xFE66-0xFE67 0x9FB6
0xFE68 0x3B4E
0xFE69 0x3C6E
0xFE6A 0x3CE0
0xFE6B 0x2EA7
0xFE6C-0xFE6D 0xE831
0xFE6C 0x000215D7
0xFE6D 0x9FB8
0xFE6E 0x2EAA
0xFE6F 0x4056
0xFE70 0x415F
......@@ -10417,7 +10423,7 @@
0xFE72 0x4337
0xFE73 0x2EB3
0xFE74-0xFE75 0x2EB6
0xFE76 0xE83B
0xFE76 0x0002298F
0xFE77 0x43B1
0xFE78 0x43AC
0xFE79 0x2EBB
......@@ -10425,7 +10431,7 @@
0xFE7B 0x44D6
0xFE7C 0x4661
0xFE7D 0x464C
0xFE7E 0xE843
0xFE7E 0x9FB9
0xFE80 0x4723
0xFE81 0x4729
0xFE82 0x477C
......@@ -10440,12 +10446,13 @@
0xFE8D 0x499B
0xFE8E 0x49B7
0xFE8F 0x49B6
0xFE90-0xFE91 0xE854
0xFE90 0x9FBA
0xFE91 0x000241FE
0xFE92 0x4CA3
0xFE93-0xFE95 0x4C9F
0xFE96 0x4C77
0xFE97 0x4CA2
0xFE98-0xFE9E 0x4D13
0xFE9F 0x4DAE
0xFEA0 0xE864
0xFEA0 0x9FBB
0xFEA1-0xFEFE 0xE468
......@@ -40,7 +40,8 @@
0x8130CC30-0x8130D134 0x03CA
0x8130D135-0x8130D238 0x0402
0x8130D239 0x0450
0x8130D330-0x8136A531 0x0452
0x8130D330-0x8135F436 0x0452
0x8135F438-0x8136A531 0x1E40
0x8136A532-0x8136A533 0x2011
0x8136A534 0x2017
0x8136A535-0x8136A536 0x201A
......@@ -171,8 +172,10 @@
0x8234EB33-0x8234F633 0x4CA4
0x8234F634-0x82358731 0x4D1A
0x82358732-0x82358F32 0x4DAF
0x82358F33-0x8336C738 0x9FA6
0x82358F33-0x82359036 0x9FA6
0x82359135-0x8336C738 0x9FBC
0x8336C739 0xE76C
0x8135F437 0xE7C7
0x8336C830 0xE7C8
0x8336C831-0x8336C933 0xE7E7
0x8336C934 0xE815
......@@ -196,7 +199,8 @@
0x84309B39-0x84309C34 0xFA19
0x84309C35 0xFA22
0x84309C36-0x84309C37 0xFA25
0x84309C38-0x84318537 0xFA2A
0x84309C38-0x84318235 0xFA2A
0x84318336-0x84318537 0xFE1A
0x84318538 0xFE32
0x84318539-0x84318632 0xFE45
0x84318633 0xFE53
2011-07-18 Alan Mackenzie <>
Fontify declarators properly when, e.g., a jit-lock chunk begins
inside a declaration.
* progmodes/cc-langs.el (c-symbol-chars): Correct a typo.
* progmodes/cc-fonts.el (c-font-lock-enclosing-decls): New
(c-complex-decl-matchers): Insert reference to
* progmodes/cc-engine.el (c-backward-single-comment):
(c-backward-comments): Bind open-paren-in-column-0-is-defun-start
to nil around calls to (forward-comment -1).
2011-07-17 Lars Magne Ingebrigtsen <>
* image.el (put-image): Doc typo fix.
* progmodes/etags.el (tags-search): Doc typo fix.
* mail/smtpmail.el (smtpmail-via-smtp): Query the user for
password if we get errors 550 to 554.
......@@ -282,7 +282,7 @@ Not documented
;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist
;;;;;; do* do loop return-from return block etypecase typecase ecase
;;;;;; case load-time-value eval-when destructuring-bind function*
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "2261724608e3223036b863d214f7dc0c")
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "9452c0e16fd960fce5c19e5c067a7160")
;;; Generated autoloads from cl-macs.el
(autoload 'gensym "cl-macs" "\
......@@ -389,7 +389,7 @@ IMAGE must be an image created with `create-image' or `defimage'.
IMAGE is displayed by putting an overlay into the current buffer with a
`before-string' STRING that has a `display' property whose value is the
image. STRING is defaulted if you omit it.
The overlay created will have the `put-overlay' property set to t.
The overlay created will have the `put-image' property set to t.
POS may be an integer or marker.
AREA is where to display the image. AREA nil or omitted means
display it in the text area, a value of `left-margin' means
2011-07-17 Bill Wohler <>
Release MH-E version 8.2.93.
* mh-e.el (Version, mh-version): Update for release 8.2.93.
* mh-compat.el (mh-pop-to-buffer-same-window): Delete.
* mh-folder.el (mh-inc-folder, mh-modify, mh-scan-folder)
(mh-make-folder): Revert to switch-to-buffer, as the Emacs folks
decided that it was fine to use it in programs.
2011-07-16 Bill Wohler <>
Release MH-E version 8.2.92.
......@@ -251,18 +251,6 @@ The argument STRING is ignored."
(match-beginning num) (match-end num)))
(defun-mh mh-pop-to-buffer-same-window
pop-to-buffer-same-window (&optional buffer-or-name norecord label)
"Pop to buffer specified by BUFFER-OR-NAME in the selected window.
Another window will be used only if the buffer can't be shown in
the selected window, usually because it is dedicated to another
buffer. Optional arguments BUFFER-OR-NAME, NORECORD and LABEL are
as for `pop-to-buffer'. This macro is used by Emacs versions that
lack the `pop-to-buffer-same-window' function, introduced in
Emacs 24. The function `switch-to-buffer' is used instead and
LABEL is ignored."
(switch-to-buffer buffer-or-name norecord))
(defun-mh mh-replace-regexp-in-string replace-regexp-in-string
(regexp rep string &optional fixedcase literal subexp start)
"Replace REGEXP with REP everywhere in STRING and return result.
......@@ -5,7 +5,7 @@
;; Author: Bill Wohler <>
;; Maintainer: Bill Wohler <>
;; Version: 8.2.92
;; Version: 8.2.93
;; Keywords: mail
;; This file is part of GNU Emacs.
......@@ -127,7 +127,7 @@
;; Try to keep variables local to a single file. Provide accessors if
;; variables are shared. Use this section as a last resort.
(defconst mh-version "8.2.92" "Version number of MH-E.")
(defconst mh-version "8.2.93" "Version number of MH-E.")
;; Variants
......@@ -795,7 +795,7 @@ instead."
(setq threading-needed-flag mh-show-threads-flag)
(setq mh-previous-window-config config))
((not (eq (current-buffer) (get-buffer folder)))
(mh-pop-to-buffer-same-window folder)
(switch-to-buffer folder)
(setq mh-previous-window-config config))))
(mh-get-new-mail file)
(when (and threading-needed-flag
......@@ -855,7 +855,7 @@ From a program, edit MESSAGE; nil means edit current message."
;; Just show the edit buffer...
(mh-pop-to-buffer-same-window edit-buffer)))
(switch-to-buffer edit-buffer)))
(defun mh-next-button (&optional backward-flag)
......@@ -1705,7 +1705,7 @@ DONT-EXEC-PENDING is non-nil."
(unless dont-exec-pending
(mh-process-or-undo-commands folder)
(mh-pop-to-buffer-same-window folder)))
(switch-to-buffer folder)))
(mh-regenerate-headers range)
(if (zerop (buffer-size))
(if (equal range "all")
......@@ -1786,7 +1786,7 @@ Also removes all content from the folder buffer."
(defun mh-make-folder (name)
"Create a new mail folder called NAME.
Make it the current folder."
(mh-pop-to-buffer-same-window name)
(switch-to-buffer name)
(setq buffer-read-only nil)
(if mh-adaptive-cmd-note-flag
......@@ -1301,12 +1301,13 @@ This function does not do any hidden buffer changes."
;; same line.
(re-search-forward "\\=\\s *[\n\r]" start t)
(if (if (forward-comment -1)
(if (if (let (open-paren-in-column-0-is-defun-start) (forward-comment -1))
(if (eolp)
;; If forward-comment above succeeded and we're at eol
;; then the newline we moved over above didn't end a
;; line comment, so we give it another go.
(forward-comment -1)
(let (open-paren-in-column-0-is-defun-start)
(forward-comment -1))
;; Emacs <= 20 and XEmacs move back over the closer of a
......@@ -1333,7 +1334,8 @@ comment at the start of cc-engine.el for more info."
;; return t when moving backwards at bob.
(not (bobp))
(if (forward-comment -1)
(if (let (open-paren-in-column-0-is-defun-start)
(forward-comment -1))
(if (looking-at "\\*/")
;; Emacs <= 20 and XEmacs move back over the
;; closer of a block comment that lacks an opener.
......@@ -1346,6 +1346,50 @@ casts and declarations are fontified. Used on level 2 and higher."
(c-font-lock-declarators limit t nil)))
(defun c-font-lock-enclosing-decls (limit)
;; Fontify the declarators of (nested) declarations we're in the middle of.
;; This is mainly for when a jit-lock etc. chunk starts inside the brace
;; block of a struct/union/class, etc.
;; This function will be called from font-lock for a region bounded by POINT
;; and LIMIT, as though it were to identify a keyword for
;; font-lock-keyword-face. It always returns NIL to inhibit this and
;; prevent a repeat invocation. See elisp/lispref page "Search-based
;; Fontification".
(let* ((paren-state (c-parse-state))
(start (point))
decl-context bo-decl in-typedef type-type ps-elt)
;; First, are we actually in a "local" declaration?
(setq decl-context (c-beginning-of-decl-1)
bo-decl (point)
in-typedef (looking-at c-typedef-key))
(if in-typedef (c-forward-token-2))
(when (and (eq (car decl-context) 'same)
(< bo-decl start))
;; Are we genuinely at a type?
(setq type-type (c-forward-type t))
(if (and type-type
(or (not (eq type-type 'maybe))
(looking-at c-symbol-key)))
(c-font-lock-declarators limit t in-typedef)))
;; Secondly, are we in any nested struct/union/class/etc. braces?
(while paren-state
(setq ps-elt (car paren-state)
paren-state (cdr paren-state))
(when (and (atom ps-elt)
(eq (char-after ps-elt) ?\{))
(goto-char ps-elt)
(setq decl-context (c-beginning-of-decl-1)
in-typedef (looking-at c-typedef-key))
(if in-typedef (c-forward-token-2))
(when (looking-at c-opt-block-decls-with-vars-key)
(goto-char ps-elt)
(when (c-safe (c-forward-sexp))
(c-font-lock-declarators limit t in-typedef)))))))
(c-lang-defconst c-simple-decl-matchers
"Simple font lock matchers for types and declarations. These are used
on level 2 only and so aren't combined with `c-complex-decl-matchers'."
......@@ -1452,6 +1496,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
;; Fontify all declarations, casts and normal labels.
;; Fontify declarators when POINT is within their declaration.
;; Fontify angle bracket arglists like templates in C++.
,@(when (c-lang-const c-recognize-<>-arglists)
......@@ -523,7 +523,7 @@ operator at the top level."
(c-lang-defconst c-symbol-chars
"Set of characters that can be part of a symbol.
This is on the form that fits inside [ ] in a regexp."
This is of the form that fits inside [ ] in a regexp."
;; Pike note: With the backquote identifiers this would include most
;; operator chars too, but they are handled with other means instead.
t (concat c-alnum "_$")
......@@ -1860,7 +1860,7 @@ nil, we exit; otherwise we scan the next file."
Stops when a match is found.
To continue searching for next match, use command \\[tags-loop-continue].
If `file-list-form' is non-nil, it should be a form that, when
If FILE-LIST-FORM is non-nil, it should be a form that, when
evaluated, will return a list of file names. The search will be
restricted to these files.
......@@ -29,8 +29,6 @@
now that we have two such functions. All uses changed.
(sanitize_char_width): New inline function.
2011-07-18 Paul Eggert <>
Don't assume that tab-width fits in int.
* character.h (sanitize_width): New inline function.
(SANE_TAB_WIDTH): New macro.
......@@ -46,8 +44,6 @@
Remove unreachable code.
(read_hex, load_charset_map_from_file): Check for integer overflow.
2011-07-17 Paul Eggert <>
* xterm.c: don't go over XClientMessageEvent limit
(scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
(x_send_scroll_bar_event): Likewise. Check that the size does not
......@@ -110,8 +106,6 @@
(gs_load): Use printmax_t to print the widest integers possible.
Check for integer overflow when computing image height and width.
2011-07-17 Paul Eggert <>
Integer signedness and overflow and related fixes. (Bug#9079)
* bidi.c: Integer size and overflow fixes.
......@@ -309,6 +303,36 @@
Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
well either way, and we prefer signed to unsigned.
2011-07-18 Paul Eggert <>
* fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
This fixes some race conditions on the permissions of any newly
created file.
* alloc.c (valid_pointer_p): Use pipe, not open.
This fixes some permissions issues when debugging.
* fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
If fchown fails to set both uid and gid, try to set just gid,
as that is sometimes allowed. Adjust the file's mode to eliminate
setuid or setgid bits that are inappropriate if fchown fails.
2011-07-18 Stefan Monnier <>
* xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
to compare Lisp_Objects.
* gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
global_gnutls_log_level, don't mistake it for a Lisp_Object.
(init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
2011-07-17 Andreas Schwab <>
* lread.c (read_integer): Unread even EOF character.
(read1): Likewise. Properly record start position of symbol.
* lread.c (read1): Read `#:' as empty uninterned symbol if no
symbol character follows.
2011-07-17 Paul Eggert <>
* fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
......@@ -4430,18 +4430,18 @@ valid_pointer_p (void *p)
return w32_valid_pointer_p (p, 16);
int fd;
int fd[2];
/* Obviously, we cannot just access it (we would SEGV trying), so we
trick the o/s to tell us whether p is a valid pointer.
Unfortunately, we cannot use NULL_DEVICE here, as emacs_write may
not validate p in that case. */
if ((fd = emacs_open ("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0)
if (pipe (fd) == 0)
int valid = (emacs_write (fd, (char *)p, 16) == 16);
emacs_close (fd);
unlink ("__Valid__Lisp__Object__");
int valid = (emacs_write (fd[1], (char *) p, 16) == 16);
emacs_close (fd[1]);
emacs_close (fd[0]);
return valid;
......@@ -38,8 +38,6 @@ along with GNU Emacs. If not, see <>. */
#include <selinux/context.h>
#include <ignore-value.h>
#include "lisp.h"
#include "intervals.h"
#include "buffer.h"
......@@ -1939,10 +1937,19 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
| (NILP (ok_if_already_exists) ? O_EXCL : 0),
#else /* not MSDOS */
ofd = emacs_open (SSDATA (encoded_newname),
| (NILP (ok_if_already_exists) ? O_EXCL : 0),
int new_mask = 0666;
if (input_file_statable_p)
if (!NILP (preserve_uid_gid))
new_mask = 0600;
new_mask &= st.st_mode;
ofd = emacs_open (SSDATA (encoded_newname),
| (NILP (ok_if_already_exists) ? O_EXCL : 0)),
#endif /* not MSDOS */
if (ofd < 0)
report_file_error ("Opening output file", Fcons (newname, Qnil));
......@@ -1961,9 +1968,21 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
owner and group. */
if (input_file_statable_p)
int mode_mask = 07777;
if (!NILP (preserve_uid_gid))
ignore_value (fchown (ofd, st.st_uid, st.st_gid));
if (fchmod (ofd, st.st_mode & 07777) != 0)
/* Attempt to change owner and group. If that doesn't work
attempt to change just the group, as that is sometimes allowed.
Adjust the mode mask to eliminate setuid or setgid bits
that are inappropriate if the owner and group are wrong. */
if (fchown (ofd, st.st_uid, st.st_gid) != 0)
mode_mask &= ~06000;
if (fchown (ofd, -1, st.st_gid) == 0)
mode_mask |= 02000;
if (fchmod (ofd, st.st_mode & mode_mask) != 0)
report_file_error ("Doing chmod", Fcons (newname, Qnil));
#endif /* not MSDOS */
......@@ -193,8 +193,7 @@ init_gnutls_functions (Lisp_Object libraries)
LOAD_GNUTLS_FN (library, gnutls_x509_crt_import);
LOAD_GNUTLS_FN (library, gnutls_x509_crt_init);
if (NUMBERP (Vgnutls_log_level))
max_log_level = XINT (Vgnutls_log_level);
max_log_level = global_gnutls_log_level;
GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
SDATA (Fget (Qgnutls_dll, QCloaded_from)));
......@@ -406,8 +405,7 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
if (err >= 0)
return 0;
if (NUMBERP (Vgnutls_log_level))
max_log_level = XINT (Vgnutls_log_level);
max_log_level = global_gnutls_log_level;
/* TODO: use gnutls-error-fatalp and gnutls-error-string. */
......@@ -1155,9 +1153,9 @@ syms_of_gnutls (void)
defsubr (&Sgnutls_bye);
defsubr (&Sgnutls_available_p);
DEFVAR_INT ("gnutls-log-level", Vgnutls_log_level,
doc: /* Logging level used by the GnuTLS functions. */);
Vgnutls_log_level = make_number (0);
DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level,
doc: /* Logging level used by the GnuTLS functions. */);
global_gnutls_log_level = 0;
#endif /* HAVE_GNUTLS */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment