1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-10 01:34:36 -08:00
Commit graph

12013 commits

Author SHA1 Message Date
Dmitry Antipov
2014308a5d * alloc.c (allocate_string_data): Remove dead code.
* xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
avoid GCC warning about unused macro.
2012-06-27 19:46:48 +04:00
Dmitry Antipov
246155ebec * alloc.c (allocate_string): Omit intervals initialization.
* alloc.c (make_uninit_multibyte_string): Initialize intervals
as in make_pure_string and make_pure_c_string.
2012-06-27 18:35:51 +04:00
Dmitry Antipov
43184b7b88 * alloc.c (allocate_string): Fix last change. 2012-06-27 15:25:56 +04:00
Dmitry Antipov
3fe6dd74d0 * alloc.c (allocate_string): Remove two redundant calls
to memset, add explicit initialization where appropriate.
2012-06-27 15:19:54 +04:00
Glenn Morris
1ba6038a1d Remove paths.el
* lisp/info.el (Info-default-directory-list): Move here from paths.el.
* lisp/paths.el: Remove file, which is now empty.
* lisp/loadup.el: No longer load "paths".

* src/lisp.mk (lisp): Remove paths.elc.

* lib-src/makefile.w32-in (lisp2): Remove paths.el.

* INSTALL: Remove references to paths.el.
2012-06-27 00:47:56 -07:00
Glenn Morris
7983050d18 Fix ChangeLog entry from trunk 2012-06-27T03:52:02Z!jwiegley@gmail.com.
For some reason, this included an extraneous entry from the emacs-24
branch.
2012-06-26 23:55:01 -07:00
Chong Yidong
c89926a5f1 Let C-h f do autoloading, and report if a function was previously autoloaded.
* lisp/help-fns.el (help-fns--autoloaded-p): New function.
(describe-function-1): Refer to a function as "autoloaded" if it
was autoloaded at any time in the past.  Perform autoloading if
help-enable-auto-load is non-nil.

* lisp/help.el (help-enable-auto-load): New variable.

* src/doc.c (Fsubstitute_command_keys): Fix punctuation.
2012-06-27 13:47:14 +08:00
John Wiegley
157e99e428 unexmacosx.c (copy_data_segment): Added two section names used on Mac
OS X Lion: __mod_init_func and __mod_term_func.
2012-06-26 22:52:02 -05:00
John Wiegley
ed6b351065 alloc.c (mark_memory): Do not check with -faddress-sanitizer when
building with Clang.
2012-06-26 22:49:35 -05:00
Stefan Monnier
8edd4a2b64 * src/eval.c (Fapply): Allow calling it with a single argument. 2012-06-26 19:09:09 -04:00
Eli Zaretskii
f6f62d1bee Define HAVE_STRCASECMP and HAVE_STRNCASECMP on MS-Windows.
src/s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
 _stricmp and _strnicmp.
 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
2012-06-26 20:00:33 +03:00
Dmitry Antipov
62efea5e88 * alloc.c (allocate_window): Zero out non-Lisp part of newly
allocated window.
(allocate_process): Likewise for new process.
(allocate_terminal): Changed to use offsetof.
(allocate_frame): Likewise.
* frame.c (make_frame): Omit redundant initialization.
* window.c (make_parent_window): Use memset.
(make_window): Omit redundant initialization.
* process.c (make_process): Omit redundant initialization.
* terminal.c (create_terminal): Likewise.
2012-06-26 18:41:01 +04:00
Dmitry Antipov
42997f4d4f * term.c (delete_tty): Remove redundant call to memset. 2012-06-26 09:40:33 +04:00
Dmitry Antipov
1130ecfcac * src/alloc.c: Remove build_string.
* src/lisp.h: Define build_string as static inline.  This provides
a better opportunity to optimize away calls to strlen when the
function is called with compile-time constant argument.
* src/image.c (imagemagick_error): Convert to build_string.
* src/w32proc.c (sys_spawnve): Likewise.
* src/xterm.c (x_term_init): Likewise.
* admin/coccinelle/build_string.cocci: Semantic patch
to convert from make_string to build_string.
2012-06-26 09:00:30 +04:00
Paul Eggert
99027bdd81 Use sprintf return value instead of invoking strlen on result.
In the old days this wasn't portable, since some sprintf
implementations returned char *.  But they died out years ago and
Emacs already assumes sprintf returns int.
Similarly for float_to_string.
This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
* ccl.c (ccl_driver):
* character.c (string_escape_byte8):
* data.c (Fnumber_to_string):
* doprnt.c (doprnt):
* print.c (print_object):
* xdisp.c (message_dolog):
* xfns.c (syms_of_xfns):
Use sprintf or float_to_string result to avoid need to call strlen.
* data.c (Fnumber_to_string):
Use make_unibyte_string, since the string must be ASCII.
* lisp.h, print.c (float_to_string): Now returns int length.
* term.c (produce_glyphless_glyph):
Use sprintf result rather than recomputing it.
2012-06-25 19:33:51 -07:00
Paul Eggert
cf38a720e8 Clean out last vestiges of the old HAVE_CONFIG_H stuff. 2012-06-25 18:05:39 -07:00
Dmitry Antipov
0a08eb21f8 Fix misspelling dispextern.h in ChangeLog. 2012-06-25 18:28:51 +04:00
Dmitry Antipov
3511c78479 * configure.in (AC_CHECK_FUNCS): Detect library functions
strcasecmp and strncasecmp.
* lib-src/etags.c (etags_strcasecmp, etags_strncasecmp): Define to
library functions strcasecmp and strncasecmp if available.
* lwlib/lwlib.c (my_strcasecmp): Rename to lwlib_strcasecmp, which
may be defined to library function strcasecmp if available.
* src/dispextern.c (xstrcasecmp): Define to library function
strcasecmp if available.
* src/xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
2012-06-25 18:07:04 +04:00
Andreas Schwab
fb7da12e75 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
Avoid comma operator.
* menu.c (push_submenu_start, push_submenu_end)
(push_left_right_boundary, push_menu_pane): Likewise.
* msdos.c (dos_rawgetc): Likewise.
2012-06-25 12:28:47 +02:00
Dmitry Antipov
afa2ffd81e * xfns.c (xic_create_fontsetname): Remove redundant calls
to memset.
2012-06-25 14:16:11 +04:00
Paul Eggert
4495ff3898 * gtkutil.c (get_utf8_string): Remove redundant assignment.
sprintf already null-terminates its output.
2012-06-25 00:54:45 -07:00
Paul Eggert
b3b4476b09 * xfns.c (x_window): Remove redundant cast. 2012-06-25 00:45:49 -07:00
Dmitry Antipov
b00876c993 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
`const char *' to `char *' to avoid compiler warning.
2012-06-25 08:05:48 +04:00
Paul Eggert
885d1d74a7 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
instead of truncating it to 63 (admittedly a generous limit).
2012-06-24 16:14:39 -07:00
Paul Eggert
d188e26b1a * process.c: Fix spelling and caps in comments. 2012-06-24 13:34:48 -07:00
Dan Nicolaescu
e86db54bb3 * emacs.c (setpgrp): Remove definition, unused. 2012-06-24 14:22:22 -06:00
Dan Nicolaescu
e2f560b1dc * sysdep.c (setpgrp): Remove definition, not used in this file. 2012-06-24 14:13:15 -06:00
Juanma Barranquero
7583a3a10a src/makefile.w32-in: Update dependencies. 2012-06-24 19:57:06 +02:00
Paul Eggert
845ca89390 Switch from NO_RETURN to C11's _Noreturn.
Fixes: debbugs:11750
2012-06-24 10:39:14 -07:00
Eli Zaretskii
696056c280 Improve port of struct timespec to MS-Windows.
lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)):
 ($(BLD)/timespec-add.$(O)):
 ($(BLD)/timespec-sub.$(O)): Don't depend on
 $(EMACS_ROOT)/nt/inc/sys/time.h.
 lib/stat-time.h:
 lib/timespec.h:
 lib/utimens.h: Revert last change.
 src/makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
 (SYSTIME_H): Add nt/inc/sys/time.h.
 src/systime.h [WINDOWSNT]: Include sys/time.h.
 src/s/ms-w32.h (struct timespec): Definition moved from
 nt/inc/sys/time.h.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
 nt/inc/sys/time.h (struct timespec): Don't define it here, it is
 now defined in src/s/ms-w32.h.

Fixes: debbugs:9000
2012-06-24 20:21:20 +03:00
Paul Eggert
f1dd807386 Fix bug when time_t is unsigned and as wide as intmax_t.
* lisp.h (WAIT_READING_MAX): New macro.
* dispnew.c (Fsleep_for, sit_for):
* keyboard.c (kbd_buffer_get_event):
* process.c (Faccept_process_output):
Use it to avoid bogus compiler warnings with obsolescent GCC versions.
This improves on the previous patch, which introduced a bug
when time_t is unsigned and as wide as intmax_t.
See <http://bugs.gnu.org/9000#51>.
2012-06-23 21:11:19 -07:00
Eli Zaretskii
b82c175521 Avoid compiler warnings in comparing time_t.
src/dispnew.c (sit_for, Fsleep_for):
 src/keyboard.c (kbd_buffer_get_event):
 src/process.c (Faccept_process_output): Avoid compiler warnings when
 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
2012-06-23 22:40:50 +03:00
Juanma Barranquero
049ec95ba5 src/makefile.w32-in: Update dependencies. 2012-06-23 21:28:01 +02:00
Juanma Barranquero
ca300656a5 src/w32.c (ltime): Add return type and declare static.
(w32_get_internal_run_time): Remove usused variable `time_100ns'.
2012-06-23 18:56:47 +02:00
Paul Eggert
db7b8d066d * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
Privately reported by Herbert J. Skuhra.
(make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
All uses changed.
(system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
not make_lisp_timeval, when the argument is of type EMACS_TIME.
2012-06-23 09:44:45 -07:00
Eli Zaretskii
9651255509 Fix a bug in w32-get-locale-info.
src/w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
 last argument of make_unibyte_string.
2012-06-23 15:44:42 +03:00
Eli Zaretskii
0bd8297f9c Improve and document the language-change event on MS-Windows.
src/keyboard.c (kbd_buffer_get_event): Include the codepage and the
 language ID in the event parameters.
 src/w32term.c (w32_read_socket): Put the new keyboard codepage into
 event.code, not the obscure "character set ID".
 doc/lispref/commands.texi (Misc Events): Document the language-change event.
2012-06-23 15:39:23 +03:00
Chong Yidong
63def6b6d1 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select. 2012-06-23 18:47:00 +08:00
Eli Zaretskii
388cdec072 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
nt/inc/sys/time.h (struct timespec): Define.
 lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/dtotimespec.$(O),
 $(BLD)/gettime.$(O), $(BLD)/timespec-add.$(O), and
 $(BLD)/timespec-sub.$(O).
 ($(BLD)/dtotimespec.$(O)):
 ($(BLD)/gettime.$(O)):
 ($(BLD)/timespec-add.$(O)):
 ($(BLD)/timespec-sub.$(O)): New dependencies.
 lib/stat-time.h:
 lib/timespec.h:
 lib/utimens.h: Include sys/time.h
 src/w32.c (fdutimens): New function.
 src/w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
 src/s/ms-w32.h (pselect): Redirect to sys_select.
 src/sysselect.h [WINDOWSNT]: Don't include sys/select.h.

Fixes: debbugs:9000
2012-06-23 13:22:59 +03:00
Eli Zaretskii
e8a022046f Really fix bug #11519, by fixing the last change in ralloc.c.
src/ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
 in the logic of incrementing and decrementing the value of
 use_relocatable_buffers.
2012-06-23 12:46:33 +03:00
Paul Eggert
d054f3fb9a * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
Privately reported by Herbert J. Skuhra.
[__FreeBSD__]: Remove "*/" typo after "#include".
(timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
(TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
(TIMEVAL, system_process_attributes) [__FreeBSD__]:
Don't assume EMACS_TIME and struct timeval are the same type.
2012-06-23 01:21:48 -07:00
Paul Eggert
d35af63cd6 Support higher-resolution time stamps.
Fixes: debbugs:9000
2012-06-22 14:17:42 -07:00
Chong Yidong
b6a92dfe32 * xdisp.c (x_consider_frame_title): Revert last change. 2012-06-22 15:28:28 +08:00
Eli Zaretskii
d251c37c72 Enlarge NSTATICS to 0x650.
src/alloc.c (NSTATICS): Enlarge to 0x650.  Otherwise, Emacs compiled
 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
 aborts in staticpro during startup.  (Without -DBYTE_CODE_METER,
 staticidx goes up to 1597 out of 1600 = 0x640.)
2012-06-22 09:51:06 +03:00
Paul Eggert
f10deafb12 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
Otherwise, the umask might be mistakenly 0 while handling input signals.
2012-06-20 14:20:06 -07:00
Paul Eggert
8b5257e1d4 Fix misspelling of Dmitry's last name in ChangeLog. 2012-06-19 11:57:39 -07:00
Stefan Monnier
ec6de1e2ee * src/minibuf.c (Fread_string): Bind minibuffer-completion-table. 2012-06-19 13:05:41 -04:00
Dmitry Antipov
28be1ada0f * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
* font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
* print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.
2012-06-19 20:56:28 +04:00
Chong Yidong
c6bf302224 Preserve tty top-frames under various window-changing operations.
* subr.el (with-selected-window): Preserve the selected window's
terminal's top-frame.

* window.el (save-selected-window): Likewise.

* frame.c (delete_frame): When selecting a frame on a different
text terminal, do not alter the terminal's top-frame.

* term.c (Ftty_top_frame): New function.

* xdisp.c (format_mode_line_unwind_data): Record the target
frame's selected window and its terminal's top-frame.
(unwind_format_mode_line): Restore them.
(x_consider_frame_title, display_mode_line, Fformat_mode_line):
Callers changed.
(x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
since tty frames can be explicitly named.
(prepare_menu_bars): Likewise.

Fixes: debbugs:4702
2012-06-19 14:49:50 +08:00
Paul Eggert
defd4196e7 Port byte-code-meter to modern targets.
* bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
!CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG.  Problem with
CHECK_LISP_OBJECT_TYPE reported by Dmitry Andropov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
(METER_1, METER_2): Simplify.
2012-06-18 15:53:53 -07:00