Do not unconditionally define HAVE_XRMSETDATABASE on some systems
* src/s/gnu-linux.h, src/s/hpux10-20.h:
Do not unconditionally define HAVE_XRMSETDATABASE.
Maybe there was a time when this made sense, but in the current tree
it is totally illogical. This is only used in xterm.c. If it is set
we call XrmSetDatabase, if not we do something else. Configure tests
for XrmSetDatabase and sets HAVE_XRMSETDATABASE accordingly. The only
possibility that is not totally nonsensical is that the system does in
fact have XrmSetDatabase but configure failed to find it (I don't see
how this could happen though...); in which case we should fix the
configure test rather than force the results. But this is not what
the (vague) comments say was happending.
The gnu-linux piece dates from 1995, the hpux one from 2000.
https://groups.google.com/forum/?fromgroups#!topic/gnu.emacs.bug/H24wEM8Vp9A
From: rainer@displaytech.com (Rainer Malzbender)
Subject: Compiling emacs 20.4 on HP-UX 10.20 with gcc
Date: 2000/02/01
Newsgroups: gnu.emacs.bug
Eli Zaretskii [Thu, 12 Jul 2012 19:55:01 +0000 (22:55 +0300)]
Improve fix for bug #11832 with truncated/continued lines w/o margins.
src/xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
memmove call that removes glyphs covered by the left truncation
glyph. Improve commentary.
(display_line): Fix display of continuation glyphs on GUI frames
when the right fringe is turned off and variable-size fonts are
used in the window. Move the code that appends a stretch glyph to
produce_special_glyphs, so that it could be used for truncation
and continuation glyphs alike.
(produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
glyph of a suitably computed width, to align the special glyphs at
the window margin. Code moved from display_line.
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.