1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-18 19:06:18 -07:00
Commit graph

101168 commits

Author SHA1 Message Date
Paul Eggert
3de73e5ee5 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int. 2011-06-21 13:43:08 -07:00
Paul Eggert
2606c57bbf * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
(x_session_initialize): Do not assume string length fits in int.
2011-06-21 13:32:19 -07:00
Paul Eggert
2674ddc8af * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font): Avoid need for strlen. 2011-06-21 10:52:14 -07:00
Paul Eggert
aaafe47af1 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
This is unlikely, but can occur if DPI is outlandish.
2011-06-21 10:49:46 -07:00
Paul Eggert
da3f12b238 * font.c (font_intern_prop): Don't use string_to_number, since the string isn't null-terminated. 2011-06-20 23:47:52 -07:00
Paul Eggert
3a5077c52b * xselect.c (Fx_get_atom_name): Avoid need for strlen. 2011-06-20 19:16:54 -07:00
Paul Eggert
281549626c * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
* xrdb.c (magic_file_p, search_magic_path):
Omit last arg SUFFIX; it was always 0.  All callers changed.
(magic_file_p): Use ptrdiff_t, not int.  Check for size overflow.
2011-06-20 19:15:16 -07:00
Paul Eggert
7de51af53b * xfont.c (xfont_match): Avoid need for strlen. 2011-06-20 18:40:45 -07:00
Paul Eggert
25ed6cc397 * xfns.c: Don't assume strlen fits in int.
(xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
2011-06-20 18:38:04 -07:00
Paul Eggert
df1f27af9e * xdisp.c (display_mode_element): Don't assume strlen fits in int. 2011-06-20 18:30:32 -07:00
Paul Eggert
4eab31dd61 * xdisp.c (message_log_check_duplicate): Return intmax_t,
not unsigned long, as we prefer signed integers.  All callers changed.
Detect integer overflow in repeat count.
(message_dolog): Don't assume print length fits in 39 bytes.
2011-06-20 18:21:44 -07:00
Paul Eggert
25c7e41fc6 * callproc.c (egetenv): Adjust to getenv_internal API change. 2011-06-20 18:06:45 -07:00
Paul Eggert
51cab52b05 Merge from trunk. 2011-06-20 17:59:02 -07:00
Jan Djärv
ca5307394f * x-dnd.el (x-dnd-version-from-flags)
(x-dnd-more-than-3-from-flags): New functions that handle long-as-cons
and long as number.
(x-dnd-handle-xdnd): Call functions above.

Fixes: debbugs:8899
2011-06-20 22:49:12 +02:00
Stefan Monnier
4cb3bfa09c * lisp/minibuffer.el (completion-metadata): Prepend the alist with `metadata'.
(completion-try-completion, completion-all-completions): Compute the
metadata argument if it's missing; make it optional.

Fixes: debbugs:8795
2011-06-20 16:16:20 -04:00
Stefan Monnier
0c7efc0884 * doc/misc/eshell.texi (Known problems): Fix typo. 2011-06-20 12:14:01 -04:00
Stefan Monnier
bcd70d976f Use completion-at-point rather than completion-in-region.
* lisp/wid-edit.el: Use lexical scoping and move towards completion-at-point.
(widget-complete): Use new :completion-function property.
(widget-completions-at-point): New function.
(default): Use :completion-function instead of :complete.
(widget-default-completions): Rename from widget-default-complete, rewrite.
(widget-string-complete, widget-file-complete, widget-color-complete):
Remove functions.
(file, symbol, function, variable, coding-system, color):
* lisp/international/mule-cmds.el (default-input-method, charset)
(language-info-custom-alist):
* lisp/cus-edit.el (face): Use new property :completions.

* lisp/progmodes/pascal.el (pascal-completions-at-point): New function.
(pascal-mode): Use it.
(pascal-mode-map): Use completion-at-point.
(pascal-toggle-completions): Make obsolete.
(pascal-complete-word, pascal-show-completions):
* lisp/progmodes/octave-mod.el (octave-complete-symbol):
Redefine as obsolete alias.
* lisp/progmodes/octave-inf.el (inferior-octave-completion-at-point):
Signal absence of completion info for old Octave,
(inferior-octave-complete): Redefine as obsolete alias.
* lisp/progmodes/meta-mode.el: Use lexical-binding and completion-at-point.
(meta-completions-at-point): Rename from meta-complete-symbol and
adapt it for use on completion-at-point-functions.
(meta-common-mode): Use it.
(meta-looking-at-backward, meta-match-buffer): Remove.
(meta-complete-symbol): Redefine as obsolete alias.
(meta-common-mode-map): Use completion-at-point.
* lisp/progmodes/make-mode.el: Use lexical-binding and completion-at-point.
(makefile-mode-map): Use completion-at-point.
(makefile-completions-at-point): Rename from makefile-complete and
adapt it for use on completion-at-point-functions.
(makefile-mode): Use it.
(makefile-complete): Redefine as obsolete alias.
2011-06-20 12:02:31 -04:00
Deniz Dogan
aebf69c8b3 * lisp/net/rcirc.el: Delete trailing whitespaces once and for all. 2011-06-20 14:55:24 +02:00
Deniz Dogan
76147d94eb * src/process.c (Fset_process_buffer): Clarify return value in docstring. 2011-06-20 14:54:05 +02:00
Martin Rudalics
4c43d97b5c Restore old behavior of get-window-with-predicate and get-buffer-window-list.
* window.el (get-window-with-predicate): Start scanning with
window following selected window to restore Emacs 23 behavior.
Clarify doc-string.
(get-buffer-window-list): Start scanning with selected window to
restore Emacs 23 behavior.  Clarify doc-string.
2011-06-20 10:41:57 +02:00
Paul Eggert
171e2a582e * termcap.c: Don't assume sizes fit in int and never overflow.
(struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
(gobble_line): Check for size-calculation overflow.
2011-06-20 00:21:06 -07:00
Paul Eggert
ad39facaee * minibuf.c (Fread_buffer): Don't assume strlen fits in int. 2011-06-19 23:14:57 -07:00
Paul Eggert
6e5bb2dc82 * lread.c (intern, intern_c_string): Don't assume strlen fits in int. 2011-06-19 23:11:36 -07:00
Paul Eggert
52c61c22ee * keyboard.c (parse_tool_bar_item): Avoid need for strlen. 2011-06-19 23:07:16 -07:00
Paul Eggert
74ca2eb34b * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
Don't assume string length fits in int.
2011-06-19 23:03:10 -07:00
Paul Eggert
9bda3520ff * gtkutil.c (style_changed_cb): Avoid need for strlen. 2011-06-19 22:54:33 -07:00
Paul Eggert
ccd6111c24 * font.c (font_intern_prop): Don't assume string length fits in int.
Don't assume integer property fits in fixnum.
* font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
2011-06-19 22:51:47 -07:00
Daniel Colascione
bfbbb27d92 * emacs-lisp/syntax.el (syntax-ppss): Further improve docstring. 2011-06-19 20:36:16 -07:00
Paul Eggert
b5b8c9e5d3 * font.c: Don't assume string length fits in int.
(font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
Use ptrdiff_t, not int.
2011-06-19 20:21:35 -07:00
Paul Eggert
882f0d8119 * filelock.c: Fix some buffer overrun and integer overflow issues.
(get_boot_time): Don't assume that gzip command string fits in 100 bytes.
Reformulate so as not to need the command string.
Invoke gzip -cd rather than gunzip, as it's more portable.
(lock_info_type, lock_file_1, lock_file):
Don't assume pid_t and time_t fit in unsigned long.
(LOCK_PID_MAX): Remove; we now use more-reliable bounds.
(current_lock_owner): Prefer signed type for sizes.
Use memcpy, not strncpy, where memcpy is what is really wanted.
Don't assume (via atoi) that time_t and pid_t fit in int.
Check for time_t and/or pid_t out of range, e.g., via a network share.
Don't alloca where an auto var works fine.
2011-06-19 20:11:40 -07:00
Paul Eggert
93f4cf8895 * fileio.c: Fix some integer overflow issues.
(file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
Don't assume string length fits in int.
(directory_file_name): Don't assume string length fits in long.
(make_temp_name): Don't assume pid fits in int, or that its print
length is less than 20.
2011-06-19 12:06:16 -07:00
Chong Yidong
56f9dcc930 Fix last change. 2011-06-19 14:59:58 -04:00
Chong Yidong
4ca009e5a8 * lisp/files.el (auto-mode-alist): Entry for m2-mode (Bug#8852). 2011-06-19 14:53:49 -04:00
Paul Eggert
f3e92b69d2 * data.c (Fsubr_name): Rewrite to avoid a strlen call. 2011-06-19 11:44:58 -07:00
Paul Eggert
1bfdaf108f * coding.c (make_subsidiaries): Don't assume string length fits in int. 2011-06-19 11:44:09 -07:00
Chong Yidong
d264a46ba2 * info.el (Info-apropos-toc-nodes): Minor doc fix (Bug#8833). 2011-06-19 14:42:06 -04:00
Paul Eggert
35016e9a4e * callproc.c (child_setup): Rewrite to avoid two strlen calls. 2011-06-19 11:40:02 -07:00
Glenn Morris
affa9d2b30 Auto-commit of loaddefs files. 2011-06-19 14:39:24 -04:00
Paul Eggert
3d1e65a18a * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
We prefer signed integers, even for size calculations.
2011-06-19 11:38:58 -07:00
Paul Eggert
0b963a931c * emacs.c: Don't assume string length fits in 'int'.
(DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
(main): Don't invoke strlen when not needed.
2011-06-19 11:37:51 -07:00
Glenn Morris
34119902fd Auto-commit of generated files. 2011-06-19 14:33:17 -04:00
Paul Eggert
573f4b5407 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
(XD_DEBUG_MESSAGE): Don't waste a byte.
2011-06-19 11:32:55 -07:00
Paul Eggert
989f33ba6b * callproc.c: Don't assume string length fits in 'int.' 2011-06-19 11:30:19 -07:00
Paul Eggert
965d34ebb3 * buffer.c (init_buffer): Don't assume string length fits in 'int'. 2011-06-19 11:27:58 -07:00
Paul Eggert
add3f04996 * lib/unistd.in.h, m4/getloadavg.m4: Merge from gnulib. 2011-06-19 11:22:16 -07:00
Martin Rudalics
9a028c23fb Regroup clauses in display-buffer-normalize-options (Bug#8851) and (Bug#8856).
* window.el (display-buffer-normalize-options): Move special-display-p
group after pop-up-frame group (Bug#8851) and (Bug#8856).
2011-06-19 16:32:12 +02:00
Martin Rudalics
9d89fec745 Provide functions for saving window configurations as Lisp objects.
* window.el (window-list-no-nils, window-state-ignored-parameters)
(window-state-get-1, window-state-get, window-state-put-list)
(window-state-put-1, window-state-put-2, window-state-put): New
functions.
2011-06-19 12:17:56 +02:00
Martin Rudalics
fbf5b3ce9d Sanitize processing of display specifiers; new option frame-auto-delete.
* window.el (display-buffer-other-window-means-other-frame):
Call display-buffer-normalize-alist.
(display-buffer-normalize-specifiers-1): Rename to
display-buffer-normalize-argument.  New argument other-frame.
Rewrite.
(display-buffer-normalize-specifiers-2): Rename to
display-buffer-normalize-options.
(display-buffer-normalize-alist-1): New function.
(display-buffer-normalize-specifiers-3): Rename to
display-buffer-normalize-alist.  Call
display-buffer-normalize-alist-1.
(display-buffer-normalize-options-inhibit): New variable.
(display-buffer-normalize-specifiers): Rewrite calling
display-buffer-normalize-alist,
display-buffer-normalize-argument, and
display-buffer-normalize-options.  Don't call the latter if
display-buffer-normalize-options-inhibit is non-nil.
(frame-auto-delete): New option.
(window-deletable-p): Use frame-auto-delete.
2011-06-19 11:59:58 +02:00
Paul Eggert
f14ed477b8 * lread.c (string_to_number): Simplify the 2011-04-26 change by invoking xsignal1. 2011-06-18 18:35:03 -07:00
Paul Eggert
e4d29b3382 * lread.c (invalid_syntax): Omit length argument.
All uses changed.  This doesn't fix a bug, but it simplifies the
code away from its former Hollerith-constant appearance, and it's
one less 'int' to worry about when looking at integer-overflow issues.
2011-06-18 18:31:41 -07:00