Paul Eggert [Thu, 12 Jul 2012 16:58:37 +0000 (09:58 -0700)]
Fix typos that broke OS X build.
Reported by Randal L. Schwartz in
<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
* nsterm.m (ns_timeout): Add missing local decl.
(ns_get_color): snprintf -> sprintf, to fix typo.
Paul Eggert [Wed, 11 Jul 2012 22:44:07 +0000 (15:44 -0700)]
Port 'movemail' again to Solaris and similar hosts.
See Susan Cragin's report in
<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00199.html>.
* movemail.c (xmalloc): Also define if !DISABLE_DIRECT_ACCESS &&
!MAIL_USE_MMDF && !MAIL_USE_SYSTEM_LOCK. Move up, so it doesn't
need a forward declaration.
(main): Rewrite to avoid no-longer-present function 'concat', if
!DISABLE_DIRECT_ACCESS && !MAIL_USE_MMDF && !MAIL_USE_SYSTEM_LOCK.
* lisp/vc/vc-dispatcher.el (vc-log-edit): New args. Use PARAMS
argument of log-edit to set up all local variables.
(vc-start-logentry): New optional arg specifying VC backend.
* lisp/vc/vc.el (vc-checkin): Use it.
(vc-deduce-fileset): Handle Log Edit buffers.
(vc-diff): Make first argument optional too.
Paul Eggert [Wed, 11 Jul 2012 00:01:21 +0000 (17:01 -0700)]
Remove "#define unix" that is no longer needed (Bug#11905).
Merge from gnulib to make "#define unix" unnecessary, incorporating:
2012-07-10 getloadavg: clean out old Emacs and Autoconf cruft
2012-07-09 getopt: Simplify after Emacs changed.
* src/s/aix4-2.h (unix): Remove; no longer needed.
Paul Eggert [Tue, 10 Jul 2012 23:24:36 +0000 (16:24 -0700)]
EMACS_TIME simplification (Bug#11875).
This replaces macros (which typically do not work in GDB)
with functions, typedefs and enums, making the code easier to debug.
The functional style also makes code easier to read and maintain.
* lib-src/profile.c (TV2): Remove no-longer-needed static var.
* src/systime.h: Include <sys/time.h> on all hosts, not just if
WINDOWSNT, since 'struct timeval' is needed in general.
(EMACS_TIME): Now a typedef, not a macro.
(EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
not macros.
(EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
(EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
(EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
(EMACS_TIME_LE): Now functions, not macros.
(EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
(EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
which are not functions. All uses rewritten to use:
(make_emacs_time): New function.
(EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
(EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
not functions. All uses rewritten to use the following, respectively:
(emacs_secs_addr, invalid_emacs_time, get_emacs_time)
(add_emacs_time, sub_emacs_time): New functions.
* src/atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
* src/fileio.c (Fcopy_file):
* src/xterm.c (XTflash): Get the current time closer to when it's used.
* src/makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
Use XCAR and XCDR instead of Fcar and Fcdr where possible.
* admin/coccinelle/list_loop.cocci: Semantic patch to convert from Fcdr
to XCDR and consistently use CONSP in the list iteration loops.
* admin/coccinelle/vector_contents.cocci: Fix indentation.
* src/callint.c, src/coding.c, src/doc.c, src/editfns.c, src/eval.c,
* src/font.c, src/fontset.c, src/frame.c, src/gnutls.c, src/minibuf.c,
* src/msdos.c, src/textprop.c, src/w32fns.c, src/w32menu.c, src/window.c,
* src/xmenu.c: Changed to use XCAR and XCDR where argument type is known
to be a Lisp_Cons.
Tom Tromey [Tue, 10 Jul 2012 14:25:22 +0000 (08:25 -0600)]
Implement token threading
* bytecode.c (BYTE_CODE_THREADED): New macro.
(BYTE_CODES): New macro. Replaces all old byte-code defines.
(enum byte_code_op): New type.
(CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
(exec_byte_code): Use them. Use token threading when applicable.
Michael Albinus [Tue, 10 Jul 2012 12:16:40 +0000 (14:16 +0200)]
* eshell/esh-ext.el (eshell-remote-command): Remove remote part of
command, just in case. The function is not needed anymore.
(eshell-external-command): Do not call `eshell-remote-command'
Optimize pure C strings initialization.
* lisp.h (make_pure_string): Fix prototype.
(build_pure_c_string): New function, defined as static inline. This
provides a better opportunity to optimize away calls to strlen when
the function is called with compile-time constant argument.
* alloc.c (make_pure_c_string): Fix comment. Change to add nchars
argument, adjust users accordingly. Use build_pure_c_string where
appropriate.
* buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
* keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
* xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
Avoid calls to strlen in path processing functions.
* fileio.c (file_name_as_directory): Add comment. Change to add
srclen argument and return the length of result. Adjust users
accordingly.
(directory_file_name): Fix comment. Change to add srclen argument,
swap 1nd and 2st arguments to obey the common convention. Adjust
users accordingly.
* filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
* src/s/gnu.h: Don't include fcntl.h
(every file in Emacs that uses O_RDONLY already includes it; and this
does not seem like the problem a src/s file should be trying to solve).
Stop ns builds setting the EMACSLOADPATH environment variable
Ref bugs 4309, 6401, etc.
This is the last environment variable (ab)used by the ns port in this way.
* src/nsterm.m (ns_load_path): Rename from ns_init_paths.
Now it does not set EMACSLOADPATH, just returns the load-path string.
* src/nsterm.h: Update accordingly.
* src/lread.c [HAVE_NS]: Include nsterm.h.
(init_lread) [HAVE_NS]: Use ns_load_path.
* src/emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
2012-07-09 Tassilo Horn <tassilo@member.fsf.org>
* gnus-sum.el (gnus-summary-limit-to-author): Use default value instead
of initial input when reading the author to restrict the summary to.
2012-04-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-select-newsgroup): Don't assume that the group
buffer exists, which it doesn't if we haven't started Gnus.
Paul Eggert [Mon, 9 Jul 2012 16:06:19 +0000 (09:06 -0700)]
Minor improvements to make_formatted_string.
* alloc.c (make_formatted_string): Prefer int to ptrdiff_t
where int is good enough, as vsprintf returns an int.
* lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
Stop ns builds polluting the environment with EMACSDATA, EMACSDOC
It's bad form for one part of a program to communicate with another
part by making persistent changes to the environment of all subsequent
child processes. For example, it can cause odd bugs when building
Emacs from within Emacs (eg bug#6401, maybe).
* nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
(ns_init_paths): Do not set EMACSDATA, EMACSDOC.
* nsterm.h (ns_etc_directory): Add it.
* callproc.c [HAVE_NS]: Include nsterm.h.
(init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
lib-src/makefile.w32-in: Rework dependencies.
($(BLD)/test-distrib.exe): Use LIB_SRC, not SRC.
(LIB_SRC, NT_INC, GNU_LIB, MS_W32_H, CONFIG_H, INTTYPES_H, NTLIB_H)
(SYSTIME_H): New macros.
(SRC): Redefine to point to src/, not current directory.
($(BLD)/ctags.$(O), $(BLD)/ebrowse.$(O), $(BLD)/emacsclient.$(O))
($(BLD)/etags.$(O), $(BLD)/hexl.$(O), $(BLD)/make-docfile.$(O))
($(BLD)/movemail.$(O), $(BLD)/ntlib.$(O), $(BLD)/pop.$(O))
($(BLD)/profile.$(O), $(BLD)/test-distrib.$(O)): Update dependencies.
($(BLD)/regex.$(O)): New dependency.
Move marker debugging code under MARKER_DEBUG.
* marker.c (MARKER_DEBUG): Move marker debugging code under
#ifdef MARKER_DEBUG because byte_char_debug_check is too slow
for bootstrap with --enable-checking (~3x slowdown reported
by Juanma Barranquero <lekktu@gmail.com>).
(verify_bytepos): Move under #ifdef MARKER_DEBUG.
Paul Eggert [Sun, 8 Jul 2012 20:03:56 +0000 (13:03 -0700)]
Restore deprecation warnings, except for older libpng.
* configure.in (WARN_CFLAGS): Remove -Wno-deprecated-declarations.
(HAVE_LIBPNG_PNG_H): Don't bother checking for this if we have png.h.
(PNG_DEPRECATED): Define when compiling with older PNG versions.