1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00
Commit graph

102431 commits

Author SHA1 Message Date
Paul Eggert
2be7d70206 * dbusbind.c (signature_cat): New function. 2011-08-30 09:27:26 -07:00
Paul Eggert
f00b626d88 Merge from trunk. 2011-08-29 23:19:35 -07:00
Paul Eggert
393aa9d403 * MACHINES: Remove obsolete info and update a bit (Bug#9404). 2011-08-29 22:52:05 -07:00
Paul Eggert
f9453fcbeb * PROBLEMS: Remove obsolete comment re Yellow Dog (Bug#9403). 2011-08-29 19:05:43 -07:00
Chong Yidong
3fd50d5c65 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.
2011-08-29 18:02:21 -04:00
Paul Eggert
6e1a67fbe9 * font.c, gtkutil.c: Include <float.h>. 2011-08-29 13:57:42 -07:00
Juri Linkov
9a45d6c331 * 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.
2011-08-29 23:22:44 +03:00
Paul Eggert
1a091fbc08 Merge from trunk. 2011-08-29 13:06:52 -07:00
Paul Eggert
c43c8a6af9 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF. 2011-08-29 13:04:46 -07:00
Paul Eggert
ae58ff1fbc * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer. 2011-08-29 13:03:30 -07:00
Paul Eggert
b7163a504a * xfns.c (x_window): Make sprintf buffer a bit bigger
to avoid potential buffer overrun.
2011-08-29 12:59:51 -07:00
Paul Eggert
670741ab04 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
if X resource line is longer than 512 bytes.
2011-08-29 12:58:56 -07:00
Paul Eggert
80f2e268a3 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
to avoid potential buffer overrun.
2011-08-29 12:47:44 -07:00
Paul Eggert
31c286f79d * process.c (make_process): Use printmax_t, not int, to format
process-name gensyms.
2011-08-29 12:46:15 -07:00
Paul Eggert
aca216ff01 * 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'.
2011-08-29 12:14:47 -07:00
Paul Eggert
a66ff6d8b7 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
in case result does not fit in int.
2011-08-29 12:09:16 -07:00
Paul Eggert
48e3079369 * 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.
2011-08-29 12:07:18 -07:00
Paul Eggert
0df02bf3e9 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
Use esprintf, not sprintf, in case result does not fit in int.
2011-08-29 11:55:58 -07:00
Paul Eggert
84722b3d57 * gtkutil.c (xg_check_special_colors, xg_set_geometry):
Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
2011-08-29 11:54:11 -07:00
Paul Eggert
8a4014344e * 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.
2011-08-29 11:52:26 -07:00
Paul Eggert
c57b67fcf0 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
(fontset_from_font): Print it.
2011-08-29 11:48:24 -07:00
Stefan Monnier
b31b81a53a * leim/quail/latin-ltx.el: Complete the super and subscript letters. 2011-08-29 14:48:01 -04:00
Paul Eggert
c21721cc39 * 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.
2011-08-29 11:46:42 -07:00
Paul Eggert
b5cd190546 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
use SAFE_ALLOCA instead.  Use esprintf to avoid int-overflow issues.
2011-08-29 09:48:19 -07:00
Paul Eggert
d749b01b0c * eval.c (verror): Simplify by rewriting in terms of evxprintf,
which has the guts of the old verror function.
2011-08-29 09:01:33 -07:00
Paul Eggert
66c6fdd52e * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
when creating daemon; the previous buffer-overflow check was incorrect.
2011-08-29 08:56:20 -07:00
Paul Eggert
33ef5c6437 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
even if the time zone offset is outlandishly large.
Don't mishandle offset == INT_MIN.
2011-08-29 08:53:21 -07:00
Paul Eggert
9d1df220c5 * dispnew.c (add_window_display_history): Don't overrun buffer.
Truncate instead; this is OK since it's just a log.
2011-08-29 08:51:23 -07:00
Paul Eggert
2ea16b8969 * dbusbind.c (xd_signature, Fdbus_register_signal):
Do not overrun buffer; instead, report string overflow.
2011-08-29 08:49:19 -07:00
Paul Eggert
62f19c197d 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.
2011-08-29 08:43:34 -07:00
Paul Eggert
c4a07a4ce7 * 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.
2011-08-28 20:34:25 -07:00
Paul Eggert
005d87bd23 Add Bug#. 2011-08-28 17:27:35 -07:00
Paul Eggert
0c6d656d26 * update-game-score.c: Include <limits.h>
(get_user_id): Do not assume uid fits in 'int'.  Simplify.
2011-08-28 16:59:14 -07:00
Paul Eggert
644a0faa36 * 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.
2011-08-28 16:57:19 -07:00
Paul Eggert
9250f75825 * 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'.
2011-08-28 16:55:41 -07:00
Paul Eggert
17107bb698 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'.
2011-08-28 16:52:34 -07:00
Daiki Ueno
0f3de88f02 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.
2011-08-28 22:04:32 +00:00
Chong Yidong
fb87e0fb94 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.
2011-08-28 17:32:50 -04:00
Chong Yidong
e2aeef63a6 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.
2011-08-28 17:15:20 -04:00
Chong Yidong
a632608298 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.
2011-08-28 17:07:10 -04:00
Johan Bockgård
6bc8cd6546 * src/term.c (init_tty) [HAVE_GPM]: Move mouse settings after set_tty_hooks. 2011-08-28 22:45:55 +02:00
Chong Yidong
04e2ce72d0 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.
2011-08-28 16:22:10 -04:00
Chong Yidong
b9696605a3 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
2011-08-28 15:05:26 -04:00
Christoph Scholtes
09ac1c2ac0 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.
2011-08-28 14:58:16 -04:00
Chong Yidong
ddb54206dd 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.
2011-08-28 14:49:59 -04:00
Chong Yidong
7a1ff57fac * lisp/server.el (server-port): Doc fix. 2011-08-28 14:46:38 -04:00
Alan Mackenzie
ef8cdf8c2a 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.
2011-08-28 11:42:33 +00:00
Bastien Guerry
d6b9407c0c A few cosmetic fixes in lisp/org/ChangeLog. 2011-08-28 10:31:04 +02:00
Deniz Dogan
27de4e2048 * lisp/net/rcirc.el (rcirc-insert-prev-input)
(rcirc-insert-next-input): Remove unused argument.
2011-08-28 08:07:14 +02:00
Stefan Monnier
356a368181 * lisp/shell.el (shell-parse-pcomplete-arguments): Unquote args.
Fixes: debbugs:9160
2011-08-28 01:15:17 -04:00