]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 years agoMerge from trunk.
Paul Eggert [Thu, 1 Sep 2011 14:51:44 +0000 (07:51 -0700)]
Merge from trunk.

13 years ago* src/doprnt.c (esnprintf): Remove. All uses removed.
Paul Eggert [Thu, 1 Sep 2011 14:44:49 +0000 (07:44 -0700)]
* src/doprnt.c (esnprintf): Remove.  All uses removed.

Suggested by Chong Yidong in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9412#23>.

13 years agognus-sum.el: When adding article headers to a summary buffer also update gnus-newsgro...
Andrew Cohen [Thu, 1 Sep 2011 13:25:09 +0000 (13:25 +0000)]
gnus-sum.el: When adding article headers to a summary buffer also update gnus-newsgroup-articles (bug#9386).

13 years agoAuto-commit of loaddefs files.
Glenn Morris [Thu, 1 Sep 2011 10:18:38 +0000 (06:18 -0400)]
Auto-commit of loaddefs files.

13 years ago* lisp/vc/vc-rcs.el (vc-rcs-responsible-p): Handle directories.
Thierry Volpiatto [Thu, 1 Sep 2011 07:34:08 +0000 (00:34 -0700)]
* lisp/vc/vc-rcs.el (vc-rcs-responsible-p): Handle directories.

Fixes: debbugs:9391
13 years ago* lisp/vc/vc-git.el (vc-git-grep): Use --no-color. (tiny change)
Wilfred Hughes [Thu, 1 Sep 2011 07:29:56 +0000 (00:29 -0700)]
* lisp/vc/vc-git.el (vc-git-grep): Use --no-color.  (tiny change)

Fixes: debbugs:9408
13 years agobzr 2.4.0, including changelog_merge plugin, was released.
Glenn Morris [Thu, 1 Sep 2011 07:24:27 +0000 (00:24 -0700)]
bzr 2.4.0, including changelog_merge plugin, was released.

13 years agoMerge from trunk.
Paul Eggert [Thu, 1 Sep 2011 00:47:31 +0000 (17:47 -0700)]
Merge from trunk.

13 years agoAdd a stub for snprintf, for ancient hosts lacking it.
Paul Eggert [Wed, 31 Aug 2011 22:18:16 +0000 (15:18 -0700)]
Add a stub for snprintf, for ancient hosts lacking it.

* configure.in (snprintf): New check.
* nt/config.nt (HAVE_SNPRINTF): New macro.
* src/sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.

13 years agoProperly handle splitting of Rmail buffer and message view buffer.
Richard M. Stallman [Wed, 31 Aug 2011 20:49:24 +0000 (16:49 -0400)]
Properly handle splitting of Rmail buffer and message view buffer.

13 years agoMerge from trunk.
Paul Eggert [Wed, 31 Aug 2011 20:02:51 +0000 (13:02 -0700)]
Merge from trunk.

13 years agoAuto-commit of generated files.
Glenn Morris [Wed, 31 Aug 2011 10:18:35 +0000 (06:18 -0400)]
Auto-commit of generated files.

13 years agoRestore Emacs 23 display-buffer functions and options.
Martin Rudalics [Wed, 31 Aug 2011 09:27:49 +0000 (11:27 +0200)]
Restore Emacs 23 display-buffer functions and options.

* window.el (display-buffer-window): Rewrite doc-string.
(display-buffer-record-window): New function.
(display-buffer-macro-specifiers)
(display-buffer-even-window-sizes, display-buffer-set-height)
(display-buffer-set-width, display-buffer-in-window)
(display-buffer-reuse-window, display-buffer-split-specifiers)
(display-buffer-side-specifiers, display-buffer-split-window-1)
(display-buffer-split-window, display-buffer-split-atom-window)
(display-buffer-pop-up-window, display-buffer-pop-up-frame)
(display-buffer-pop-up-side-window, display-buffer-in-side-window)
(display-buffer-other-window-means-other-frame)
(display-buffer-normalize-special)
(display-buffer-normalize-default)
(display-buffer-normalize-argument)
(display-buffer-normalize-alist-1, display-buffer-normalize-alist)
(display-buffer-normalize-specifiers, display-buffer-frame)
(display-buffer-same-window, display-buffer-same-frame)
(display-buffer-other-window)
(display-buffer-same-frame-other-window)
(display-buffer-other-frame, pop-to-buffer-same-window)
(pop-to-buffer-same-frame, pop-to-buffer-other-window)
(pop-to-buffer-same-frame-other-window, pop-to-buffer-other-frame)
(switch-to-buffer-same-frame)
(switch-to-buffer-other-window-same-frame)
(display-buffer-alist-of-strings-p, display-buffer-alist-add)
(display-buffer-alist-set-1, display-buffer-alist-set-2)
(display-buffer-alist-set): Remove.
(display-buffer-function, special-display-buffer-names)
(special-display-regexps, special-display-function): In
doc-string refer to display-buffer-window and quit-restore
parameter.
(pop-up-frame-alist, pop-up-frame-function, special-display-p)
(special-display-frame-alist, special-display-popup-frame)
(same-window-buffer-names, same-window-regexps, same-window-p)
(pop-up-frames, display-buffer-reuse-frames, pop-up-windows)
(split-window-preferred-function, split-height-threshold)
(split-width-threshold, window-splittable-p)
(split-window-sensibly, window--try-to-split-window)
(window--frame-usable-p, even-window-heights)
(window--even-window-heights, window--display-buffer-1)
(window--display-buffer-2, display-buffer-other-frame): Restore
old Emacs 23 code, order and doc-strings where applicable.
(display-buffer-default, display-buffer-assq-regexp): New functions.
(display-buffer-alist): Rewrite doc-string.
(display-buffer-default-action)
(display-buffer-overriding-action): New variables.
(display-buffer, switch-to-buffer): Rewrite.
(pop-to-buffer): Restore Emacs 23 behavior but use
window-normalize-buffer-to-display.
(switch-to-buffer-other-window, switch-to-buffer-other-frame):
Restore Emacs 23 behavior but use
window-normalize-buffer-to-switch-to.
(pop-to-buffer-same-window): Rewrite.
(pop-to-buffer-other-window, pop-to-buffer-other-frame): Rewrite
using Emacs 23 options.

* org-compat.el (org-pop-to-buffer-same-window): Remove LABEL
argument from pop-to-buffer-same-window call.

13 years ago* net/tramp.el (tramp-root-regexp): Remove.
Michael Albinus [Wed, 31 Aug 2011 08:18:20 +0000 (10:18 +0200)]
* net/tramp.el (tramp-root-regexp): Remove.
(tramp-completion-file-name-regexp-unified)
(tramp-completion-file-name-regexp-separate)
(tramp-completion-file-name-regexp-url): Don't use leading volume
letter on win32 systems.  (Bug#5303, Bug#9311)
(tramp-drop-volume-letter): Simplify definition.  Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.

13 years agoAvoid the use of snprintf.
Paul Eggert [Wed, 31 Aug 2011 05:50:49 +0000 (22:50 -0700)]
Avoid the use of snprintf.

* font.c (APPEND_SNPRINTF): Remove.
(font_unparse_xlfd):
* xterm.c (x_io_error_quitter):
Use esnprintf, not snprintf.  That way, we don't have to worry
about porting to ancient platforms that lack snprintf.
(x_term_init): Use sprintf, not snprintf.

13 years agoauth-source.el: Autoload help-mode.
Katsumi Yamaoka [Tue, 30 Aug 2011 23:01:50 +0000 (23:01 +0000)]
auth-source.el: Autoload help-mode.

13 years agoAdd Bug#.
Paul Eggert [Tue, 30 Aug 2011 22:49:45 +0000 (15:49 -0700)]
Add Bug#.

13 years agoMerge changes from emacs-23 branch
Chong Yidong [Tue, 30 Aug 2011 22:43:43 +0000 (18:43 -0400)]
Merge changes from emacs-23 branch

13 years agoFix syntax scanning bug causing fontification crashes.
Chong Yidong [Tue, 30 Aug 2011 22:38:07 +0000 (18:38 -0400)]
Fix syntax scanning bug causing fontification crashes.

* src/syntax.c (find_defun_start): Update all cache variables if
exiting early.

Fixes: debbugs:9401
13 years agognus-group.el (gnus-group-name-charset): Don't bug out on server names.
Lars Magne Ingebrigtsen [Tue, 30 Aug 2011 22:07:52 +0000 (22:07 +0000)]
gnus-group.el (gnus-group-name-charset): Don't bug out on server names.

13 years agoFix misworded comment.
Paul Eggert [Tue, 30 Aug 2011 22:02:56 +0000 (15:02 -0700)]
Fix misworded comment.

13 years agoMerge from trunk.
Paul Eggert [Tue, 30 Aug 2011 21:16:49 +0000 (14:16 -0700)]
Merge from trunk.

13 years ago* configure.in: Remove no-longer used HP patterns.
Paul Eggert [Tue, 30 Aug 2011 20:46:59 +0000 (13:46 -0700)]
* configure.in: Remove no-longer used HP patterns.

(opsys): Remove unreachable pattern hppa*-*-linux-gnu*.
Also, remove ia64*-hp-hpux1[1-9]*, as it also sets machine=hp800,
and that can't possibly work now that src/m/hp800.h no longer exists.

13 years ago* configure.in (opsys): Change pattern to *-*-linux*.
Paul Eggert [Tue, 30 Aug 2011 20:41:54 +0000 (13:41 -0700)]
* configure.in (opsys): Change pattern to *-*-linux*.

13 years agosrc/image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
Eli Zaretskii [Tue, 30 Aug 2011 18:15:53 +0000 (21:15 +0300)]
src/image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.

13 years agoFix bug #9402 with :align-to on TTY frames.
Eli Zaretskii [Tue, 30 Aug 2011 17:32:44 +0000 (20:32 +0300)]
Fix bug #9402 with :align-to on TTY frames.

 src/xdisp.c (produce_stretch_glyph): No longer static, compiled also
 when HAVE_WINDOW_SYSTEM is not defined.  Support both GUI and TTY
 frames.  Call tty_append_glyph in the TTY case.  (Bug#9402)
 src/term.c (tty_append_glyph): New function.
 (produce_stretch_glyph): Static function and its prototype deleted.
 src/dispextern.h (produce_stretch_glyph, tty_append_glyph): Add
 prototypes.

13 years ago* dbusbind.c (signature_cat): New function.
Paul Eggert [Tue, 30 Aug 2011 16:27:26 +0000 (09:27 -0700)]
* dbusbind.c (signature_cat): New function.

13 years ago* configure.in (opsys): Add pattern *-gnu-linux*
Paul Eggert [Tue, 30 Aug 2011 15:57:22 +0000 (08:57 -0700)]
* configure.in (opsys): Add pattern *-gnu-linux*

to recognize powerpc-gnu-linux-uclibc (Bug#9403).

13 years agoDocument new Emacs 24 faces in Lisp manual.
Chong Yidong [Tue, 30 Aug 2011 15:24:07 +0000 (11:24 -0400)]
Document new Emacs 24 faces in Lisp manual.

* doc/lispref/display.texi (Basic Faces): New node.  Document new faces.

* doc/lispref/modes.texi (Major Mode Conventions): Move some text there.
(Mode Help): Remove major-mode var, duplicated in Major Modes.

13 years ago* lisp/subr.el (event-modifiers): Fix "missing modifier" part of docstring.
Stefan Monnier [Tue, 30 Aug 2011 14:50:02 +0000 (10:50 -0400)]
* lisp/subr.el (event-modifiers): Fix "missing modifier" part of docstring.

Fixes: debbugs:9356
13 years ago* lisp/vc/pcvs-defs.el (cvs-find-file-and-jump): Typo in docstring.
Reuben Thomas [Tue, 30 Aug 2011 14:40:51 +0000 (10:40 -0400)]
* lisp/vc/pcvs-defs.el (cvs-find-file-and-jump): Typo in docstring.

Fixes: debbugs:9369
13 years agoMerge from trunk.
Paul Eggert [Tue, 30 Aug 2011 06:19:35 +0000 (23:19 -0700)]
Merge from trunk.

13 years ago* MACHINES: Remove obsolete info and update a bit (Bug#9404).
Paul Eggert [Tue, 30 Aug 2011 05:52:05 +0000 (22:52 -0700)]
* MACHINES: Remove obsolete info and update a bit (Bug#9404).

13 years ago* PROBLEMS: Remove obsolete comment re Yellow Dog (Bug#9403).
Paul Eggert [Tue, 30 Aug 2011 02:05:43 +0000 (19:05 -0700)]
* PROBLEMS: Remove obsolete comment re Yellow Dog (Bug#9403).

13 years agoUpdate and edit manual sections on major modes.
Chong Yidong [Mon, 29 Aug 2011 22:02:21 +0000 (18:02 -0400)]
Update and edit manual sections on major modes.

* doc/emacs/modes.texi (Choosing Modes): auto-mode-case-fold is now t.

* doc/lispref/modes.texi (Basic Major Modes): New node.  Callers updated.
(Major Modes): Document fundamental-mode and major-mode.
(Major Mode Basics): Node deleted; text moved to Major Modes.
(Derived Modes): Document derived-mode-p.

13 years ago* font.c, gtkutil.c: Include <float.h>.
Paul Eggert [Mon, 29 Aug 2011 20:57:42 +0000 (13:57 -0700)]
* font.c, gtkutil.c: Include <float.h>.

13 years ago* lisp/isearch.el (isearch-done): Don't display message "Mark saved"
Juri Linkov [Mon, 29 Aug 2011 20:22:44 +0000 (23:22 +0300)]
* lisp/isearch.el (isearch-done): Don't display message "Mark saved"
when arg `edit' is non-nil to prevent its flicker in the echo area.

13 years agoMerge from trunk.
Paul Eggert [Mon, 29 Aug 2011 20:06:52 +0000 (13:06 -0700)]
Merge from trunk.

13 years ago* xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
Paul Eggert [Mon, 29 Aug 2011 20:04:46 +0000 (13:04 -0700)]
* xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.

13 years ago* xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
Paul Eggert [Mon, 29 Aug 2011 20:03:30 +0000 (13:03 -0700)]
* xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.

13 years ago* xfns.c (x_window): Make sprintf buffer a bit bigger
Paul Eggert [Mon, 29 Aug 2011 19:59:51 +0000 (12:59 -0700)]
* xfns.c (x_window): Make sprintf buffer a bit bigger

to avoid potential buffer overrun.

13 years ago* xfaces.c (x_update_menu_appearance): Don't overrun buffer
Paul Eggert [Mon, 29 Aug 2011 19:58:56 +0000 (12:58 -0700)]
* xfaces.c (x_update_menu_appearance): Don't overrun buffer

if X resource line is longer than 512 bytes.

13 years ago* term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
Paul Eggert [Mon, 29 Aug 2011 19:47:44 +0000 (12:47 -0700)]
* term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger

to avoid potential buffer overrun.

13 years ago* process.c (make_process): Use printmax_t, not int, to format
Paul Eggert [Mon, 29 Aug 2011 19:46:15 +0000 (12:46 -0700)]
* process.c (make_process): Use printmax_t, not int, to format

process-name gensyms.

13 years ago* print.c (float_to_string): Detect width overflow more reliably.
Paul Eggert [Mon, 29 Aug 2011 19:14:47 +0000 (12:14 -0700)]
* print.c (float_to_string): Detect width overflow more reliably.

(print_object): Make sprintf buffer a bit bigger, to avoid potential
buffer overrun.  Don't assume list length fits in 'int'.  Treat
print length of 0 as 0, not as infinity; to be consistent with other
uses of print length in this function.  Don't overflow print length
index.  Don't assume hash table size fits in 'long', or that
vectorlike size fits in 'unsigned long'.

13 years ago* nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
Paul Eggert [Mon, 29 Aug 2011 19:09:16 +0000 (12:09 -0700)]
* nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,

in case result does not fit in int.

13 years ago* macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
Paul Eggert [Mon, 29 Aug 2011 19:07:18 +0000 (12:07 -0700)]
* macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.

(Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
it as a large positive number.
(Fexecute_kbd_macro): Don't assume repeat count fits in int.
* macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.

13 years ago* lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
Paul Eggert [Mon, 29 Aug 2011 18:55:58 +0000 (11:55 -0700)]
* lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.

Use esprintf, not sprintf, in case result does not fit in int.

13 years ago* gtkutil.c (xg_check_special_colors, xg_set_geometry):
Paul Eggert [Mon, 29 Aug 2011 18:54:11 +0000 (11:54 -0700)]
* gtkutil.c (xg_check_special_colors, xg_set_geometry):

Make sprintf buffers a bit bigger, to avoid potential buffer overrun.

13 years ago* frame.c (tty_frame_count): Now printmax_t, not int.
Paul Eggert [Mon, 29 Aug 2011 18:52:26 +0000 (11:52 -0700)]
* frame.c (tty_frame_count): Now printmax_t, not int.

(make_terminal_frame, set_term_frame_name): Print it.
(x_report_frame_params): In X, window IDs are unsigned long,
not signed long, so print them as unsigned.
(validate_x_resource_name): Check for implausibly long names,
and don't assume name length fits in 'int'.
(x_get_resource_string): Don't blindly alloca invocation name;
use SAFE_ALLOCA.  Use esprintf, not sprintf, in case result does
not fit in int.

13 years ago* fontset.c (num_auto_fontsets): Now printmax_t, not int.
Paul Eggert [Mon, 29 Aug 2011 18:48:24 +0000 (11:48 -0700)]
* fontset.c (num_auto_fontsets): Now printmax_t, not int.

(fontset_from_font): Print it.

13 years ago* leim/quail/latin-ltx.el: Complete the super and subscript letters.
Stefan Monnier [Mon, 29 Aug 2011 18:48:01 +0000 (14:48 -0400)]
* leim/quail/latin-ltx.el: Complete the super and subscript letters.

13 years ago* font.c (font_unparse_xlfd): Don't blindly alloca long strings.
Paul Eggert [Mon, 29 Aug 2011 18:46:42 +0000 (11:46 -0700)]
* font.c (font_unparse_xlfd): Don't blindly alloca long strings.

Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
fits in int, when using sprintf.  Use single snprintf to count
length of string rather than counting it via multiple sprintfs;
that's simpler and more reliable.
(APPEND_SPRINTF): New macro.
(font_unparse_fcname): Use it to avoid sprintf buffer overrun.
(generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
sprintf, in case result does not fit in int.

13 years ago* filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
Paul Eggert [Mon, 29 Aug 2011 16:48:19 +0000 (09:48 -0700)]
* filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;

use SAFE_ALLOCA instead.  Use esprintf to avoid int-overflow issues.

13 years ago* eval.c (verror): Simplify by rewriting in terms of evxprintf,
Paul Eggert [Mon, 29 Aug 2011 16:01:33 +0000 (09:01 -0700)]
* eval.c (verror): Simplify by rewriting in terms of evxprintf,

which has the guts of the old verror function.

13 years ago* emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
Paul Eggert [Mon, 29 Aug 2011 15:56:20 +0000 (08:56 -0700)]
* emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer

when creating daemon; the previous buffer-overflow check was incorrect.

13 years ago* editfns.c (Fcurrent_time_zone): Don't overrun buffer
Paul Eggert [Mon, 29 Aug 2011 15:53:21 +0000 (08:53 -0700)]
* editfns.c (Fcurrent_time_zone): Don't overrun buffer

even if the time zone offset is outlandishly large.
Don't mishandle offset == INT_MIN.

13 years ago* dispnew.c (add_window_display_history): Don't overrun buffer.
Paul Eggert [Mon, 29 Aug 2011 15:51:23 +0000 (08:51 -0700)]
* dispnew.c (add_window_display_history): Don't overrun buffer.

Truncate instead; this is OK since it's just a log.

13 years ago* dbusbind.c (xd_signature, Fdbus_register_signal):
Paul Eggert [Mon, 29 Aug 2011 15:49:19 +0000 (08:49 -0700)]
* dbusbind.c (xd_signature, Fdbus_register_signal):

Do not overrun buffer; instead, report string overflow.

13 years agosprintf-related integer and memory overflow issues.
Paul Eggert [Mon, 29 Aug 2011 15:43:34 +0000 (08:43 -0700)]
sprintf-related integer and memory overflow issues.

* doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
(esprintf, esnprintf, exprintf, evxprintf): New functions.
* keyboard.c (command_loop_level): Now EMACS_INT, not int.
(cmd_error): kbd macro iterations count is now EMACS_INT, not int.
(modify_event_symbol): Do not assume that the length of
name_alist_or_stem is safe to alloca and fits in int.
(Fexecute_extended_command): Likewise for function name and binding.
(Frecursion_depth): Wrap around reliably on integer overflow.
* keymap.c (push_key_description): First arg is now EMACS_INT, not int,
since some callers pass EMACS_INT values.
(Fsingle_key_description): Don't crash if symbol name contains more
than MAX_ALLOCA bytes.
* minibuf.c (minibuf_level): Now EMACS_INT, not int.
(get_minibuffer): Arg is now EMACS_INT, not int.
* lisp.h (get_minibuffer, push_key_description): Reflect API changes.
(esprintf, esnprintf, exprintf, evxprintf): New decls.
* window.h (command_loop_level, minibuf_level): Reflect API changes.

13 years ago* image.c (parse_image_spec): Check for nonnegative, not for positive,
Paul Eggert [Mon, 29 Aug 2011 03:34:25 +0000 (20:34 -0700)]
* image.c (parse_image_spec): Check for nonnegative, not for positive,
when checking :margin (Bug#9390).
(IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
Renamed from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
so that the name doesn't mislead.  All uses changed.

13 years agoAdd Bug#.
Paul Eggert [Mon, 29 Aug 2011 00:27:35 +0000 (17:27 -0700)]
Add Bug#.

13 years ago* update-game-score.c: Include <limits.h>
Paul Eggert [Sun, 28 Aug 2011 23:59:14 +0000 (16:59 -0700)]
* update-game-score.c: Include <limits.h>

(get_user_id): Do not assume uid fits in 'int'.  Simplify.

13 years ago* movemail.c (main): Do not use sprintf when its result might not fit
Paul Eggert [Sun, 28 Aug 2011 23:57:19 +0000 (16:57 -0700)]
* movemail.c (main): Do not use sprintf when its result might not fit

in 'int'.  Instead, put the possibly-long file name into the
output of pfatal_with_name.

13 years ago* etags.c (xmalloc, xrealloc): Accept size_t, not unsigned int,
Paul Eggert [Sun, 28 Aug 2011 23:55:41 +0000 (16:55 -0700)]
* etags.c (xmalloc, xrealloc): Accept size_t, not unsigned int,

to avoid potential buffer overflow issues on typical 64-bit hosts.
(whatlen_max): New static var.
(main): Avoid buffer overflow if subsidiary command length is
greater than BUFSIZ or 2*BUFSIZ + 20. Do not use sprintf when its
result might not fit in 'int'.

13 years agoInteger and memory overflow issues.
Paul Eggert [Sun, 28 Aug 2011 23:52:34 +0000 (16:52 -0700)]
Integer and memory overflow issues.

* emacsclient.c (xmalloc): Accept size_t, not unsigned int, to
avoid potential buffer overflow issues on typical 64-bit hosts.
Return void *, not long *.
(get_current_dir_name): Report a failure, instead of looping
forever, if buffer size calculation overflows.  Treat malloc
failures like realloc failures, as that has better behavior and is
more consistent.  Do not check whether xmalloc returns NULL, as
that's not possible.
(message): Do not arbitrarily truncate message to 2048 bytes when
sending it to stderr; use vfprintf instead.
(get_server_config, set_local_socket)
(start_daemon_and_retry_set_socket): Do not alloca
arbitrarily-large buffers; that's not safe.
(get_server_config, set_local_socket): Do not use sprintf when its
result might not fit in 'int'.
(set_local_socket): Do not assume uid fits in 'int'.

13 years agoMerge changes made in Gnus trunk.
Daiki Ueno [Sun, 28 Aug 2011 22:04:32 +0000 (22:04 +0000)]
Merge changes made in Gnus trunk.

mml-smime.el (mml-smime-epg-verify): Don't use the 4th arg of mm-replace-in-string for compatibility issues.
mml2015.el (mml2015-epg-verify): Ditto.

13 years agoFix package menu bug in marking obsolete packages for deletion.
Chong Yidong [Sun, 28 Aug 2011 21:32:50 +0000 (17:32 -0400)]
Fix package menu bug in marking obsolete packages for deletion.

* lisp/emacs-lisp/package.el (package-menu-mark-delete): Allow marking
obsolete packages for deletion.

13 years agoAdd xrefs to View Mode node to Emacs manual.
Chong Yidong [Sun, 28 Aug 2011 21:15:20 +0000 (17:15 -0400)]
Add xrefs to View Mode node to Emacs manual.

* doc/emacs/files.texi (File Archives):
* doc/emacs/cal-xtra.texi (Diary Display):
* doc/emacs/help.texi (Help Mode): Add xref to View Mode.

13 years agoDocument copy-directory and related changes in manuals.
Chong Yidong [Sun, 28 Aug 2011 21:07:10 +0000 (17:07 -0400)]
Document copy-directory and related changes in manuals.

* doc/emacs/buffers.texi (Misc Buffer): Move view-buffer to View Mode.

* doc/emacs/display.texi (View Mode): New node.  Move view-file here from
Misc File Ops.  Move view-buffer here from Misc Buffer.

* doc/emacs/files.texi (Misc File Ops): Document new
delete-by-moving-to-trash behavior.  Remove view-file.

* doc/lispref/files.texi (Changing Files, Create/Delete Dirs): Document new
arguments for delete-file, delete-directory, and copy-directory.

13 years ago* src/term.c (init_tty) [HAVE_GPM]: Move mouse settings after set_tty_hooks.
Johan Bockgård [Sun, 28 Aug 2011 20:45:55 +0000 (22:45 +0200)]
* src/term.c (init_tty) [HAVE_GPM]: Move mouse settings after set_tty_hooks.

13 years agoDocument trash changes in manual.
Chong Yidong [Sun, 28 Aug 2011 20:22:10 +0000 (16:22 -0400)]
Document trash changes in manual.

* doc/emacs/dired.texi (Dired Deletion): Shorten description of Trash.

* doc/emacs/files.texi (Misc File Ops): Document new
delete-by-moving-to-trash behavior.

* doc/lispref/files.texi (Changing Files, Create/Delete Dirs): Document TRASH
argument.

13 years ago* dic/lispref/lists.texi (Building Lists): Fix typo.
Dani Moncayo [Sun, 28 Aug 2011 19:08:45 +0000 (15:08 -0400)]
* dic/lispref/lists.texi (Building Lists): Fix typo.

13 years agoMake custom-theme-choose-mode inherit from special-mode.
Chong Yidong [Sun, 28 Aug 2011 19:05:26 +0000 (15:05 -0400)]
Make custom-theme-choose-mode inherit from special-mode.

* lisp/cus-theme.el (custom-theme-choose-mode): Inherit from special-mode.
(custom-theme-choose-mode-map): Add special-mode to parent.

Fixes: debbugs:9124
13 years agoMake Help mode inherit from special-mode.
Christoph Scholtes [Sun, 28 Aug 2011 18:58:16 +0000 (14:58 -0400)]
Make Help mode inherit from special-mode.

* help-mode.el (help-mode-map): Add special-mode-map to parent.
(help-mode): Derive help-mode from special-mode. Don't invoke
view-mode from help-mode.
(help-xref-override-view-map): Remove.
(help-make-xrefs): Remove minor-mode-overriding-map-alist since
view-mode is not used anymore.

13 years agoUpdate manuals for some Emacs 24 changes.
Chong Yidong [Sun, 28 Aug 2011 18:49:59 +0000 (14:49 -0400)]
Update manuals for some Emacs 24 changes.

* doc/emacs/misc.texi (emacsclient Options): Document server-port.

* doc/lispref/display.texi (Progress): Document spinner functionality.

* doc/lispref/frames.texi (Layout Parameters): The defaults for the
menu-bar-lines and tool-bar-lines parameters depend on the mode.

* doc/lispref/objects.texi (Symbol Type): Document ## print representation.

* doc/lispref/os.texi (Killing Emacs): Note that kill-emacs can be called by
operating system signals.  Refer to save-buffers-kill-terminal
instead of save-buffers-kill-emacs.

13 years ago* lisp/server.el (server-port): Doc fix.
Chong Yidong [Sun, 28 Aug 2011 18:46:38 +0000 (14:46 -0400)]
* lisp/server.el (server-port): Doc fix.

13 years agoFix - typing on a C++ inher-intro or inher-cont line should preserve the
Alan Mackenzie [Sun, 28 Aug 2011 11:42:33 +0000 (11:42 +0000)]
Fix - typing on a C++ inher-intro or inher-cont line should preserve the
fontification of the inherited class names.  Analogously for namespace
names and Java import, extends, etc.

(cc-fonts.el): (c-make-font-lock-BO-decl-search-function): New function.
(c-basic-matchers-after - "Fontify the clauses after various keywords"):
Extract the three keyword lists for the 3 erroneous constructs from the
list of four, and use the new function above in place of an old one.

13 years agoA few cosmetic fixes in lisp/org/ChangeLog.
Bastien Guerry [Sun, 28 Aug 2011 08:31:04 +0000 (10:31 +0200)]
A few cosmetic fixes in lisp/org/ChangeLog.

13 years ago* lisp/net/rcirc.el (rcirc-insert-prev-input)
Deniz Dogan [Sun, 28 Aug 2011 06:07:14 +0000 (08:07 +0200)]
* lisp/net/rcirc.el (rcirc-insert-prev-input)
(rcirc-insert-next-input): Remove unused argument.

13 years ago* lisp/shell.el (shell-parse-pcomplete-arguments): Unquote args.
Stefan Monnier [Sun, 28 Aug 2011 05:15:17 +0000 (01:15 -0400)]
* lisp/shell.el (shell-parse-pcomplete-arguments): Unquote args.

Fixes: debbugs:9160
13 years agoFix vertical cursor motion from start of R2L lines in L2R paragraphs.
Eli Zaretskii [Sat, 27 Aug 2011 18:11:49 +0000 (21:11 +0300)]
Fix vertical cursor motion from start of R2L lines in L2R paragraphs.

 src/xdisp.c (move_it_to): Don't bail out early when reaching
 position beyond to_charpos, if we are scanning backwards.
 (move_it_vertically_backward): When DY == 0, make sure we get to
 the first character in the line after the newline.

13 years agosrc/bidi.c: Rearrange commentary to bidi_fetch_char.
Eli Zaretskii [Sat, 27 Aug 2011 12:18:27 +0000 (15:18 +0300)]
src/bidi.c: Rearrange commentary to bidi_fetch_char.

13 years agoMinor fix of documenting for focus-follows-mouse.
Eli Zaretskii [Sat, 27 Aug 2011 12:10:24 +0000 (15:10 +0300)]
Minor fix of documenting for focus-follows-mouse.

 doc/emacs/frames.texi (Frame Commands): Advise setting focus-follows-mouse
 even on MS-Windows.  Fix a typo.

13 years agotextmodes/paragraphs.el. Undo previous accidental patch.
Alan Mackenzie [Sat, 27 Aug 2011 11:14:50 +0000 (11:14 +0000)]
textmodes/paragraphs.el.  Undo previous accidental patch.

13 years agoprogmodes/cc-menus.el (cc-imenu-c++-generic-expression): Make it handle
Alan Mackenzie [Sat, 27 Aug 2011 08:41:23 +0000 (08:41 +0000)]
progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Make it handle
function pointer parameters properly.

13 years agoFix bug in display-buffer-reuse-window (Bug#9381).
Martin Rudalics [Sat, 27 Aug 2011 08:38:33 +0000 (10:38 +0200)]
Fix bug in display-buffer-reuse-window (Bug#9381).

* window.el (display-buffer-reuse-window): Fix case where
selected window was reused with non-nil OTHER-WINDOW argument.
(Bug#9381)

13 years agoetc/NEWS: Fix entries related to bidirectional support.
Eli Zaretskii [Sat, 27 Aug 2011 08:36:56 +0000 (11:36 +0300)]
etc/NEWS: Fix entries related to bidirectional support.

13 years ago* net/rcirc.el (rcirc-check-auth-status): Adding support for oftc's NickServ messages.
Deniz Dogan [Sat, 27 Aug 2011 08:28:46 +0000 (10:28 +0200)]
* net/rcirc.el (rcirc-check-auth-status): Adding support for oftc's NickServ messages.

13 years agoTUTORIAL.he: Use LRE instead of LRO.
Eli Zaretskii [Sat, 27 Aug 2011 08:22:29 +0000 (11:22 +0300)]
TUTORIAL.he: Use LRE instead of LRO.

13 years ago* ccl.c: Improve and simplify overflow checking (Bug#9196).
Paul Eggert [Sat, 27 Aug 2011 07:07:32 +0000 (00:07 -0700)]
* ccl.c: Improve and simplify overflow checking (Bug#9196).

(ccl_driver): Do not generate an out-of-range pointer.
(Fccl_execute_on_string): Remove unnecessary check for
integer overflow, noted by Stefan Monnier in
<http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
Remove a FIXME that didn't need fixing.
Simplify the newly-introduced buffer reallocation code.

13 years agosrc/makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
Juanma Barranquero [Sat, 27 Aug 2011 01:42:00 +0000 (03:42 +0200)]
src/makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.

13 years ago* lisp/saveplace.el (save-place-limit): Make it finite. (Bug#9352)
Glenn Morris [Sat, 27 Aug 2011 00:52:47 +0000 (20:52 -0400)]
* lisp/saveplace.el (save-place-limit): Make it finite.  (Bug#9352)

13 years agoRe-order NEWS items.
Chong Yidong [Fri, 26 Aug 2011 19:10:19 +0000 (15:10 -0400)]
Re-order NEWS items.

13 years agoMerge from trunk.
Paul Eggert [Fri, 26 Aug 2011 16:13:07 +0000 (09:13 -0700)]
Merge from trunk.

13 years ago* package.el (package-install): Call package-initialize if called interactively.
Chong Yidong [Fri, 26 Aug 2011 15:53:50 +0000 (11:53 -0400)]
* package.el (package-install): Call package-initialize if called interactively.

13 years agoDocument package manager in Emacs manual.
Chong Yidong [Fri, 26 Aug 2011 15:48:19 +0000 (11:48 -0400)]
Document package manager in Emacs manual.

* doc/emacs/package.texi: New file, documenting the package manager.

* doc/emacs/emacs.texi: Include it.

* doc/emacs/help.texi (Help Summary): Add describe-package.

13 years agoAuto-commit of generated files.
Glenn Morris [Fri, 26 Aug 2011 10:19:08 +0000 (06:19 -0400)]
Auto-commit of generated files.

13 years agoFix bug #9324 with unwarranted repositioning of point.
Eli Zaretskii [Fri, 26 Aug 2011 10:07:06 +0000 (13:07 +0300)]
Fix bug #9324 with unwarranted repositioning of point.

 src/xdisp.c (redisplay_window): Don't force window start if point
 will be invisible in the resulting window.

13 years agoFix format bug in defstruct
Leo Liu [Fri, 26 Aug 2011 09:52:07 +0000 (17:52 +0800)]
Fix format bug in defstruct

http://debbugs.gnu.org/9357