Dmitry Antipov [Mon, 6 Aug 2012 08:32:49 +0000 (12:32 +0400)]
Fix replacement typo.
* window.c (replace_window): Set root_window instead of
selected_window. This fixes a total window subsystem
malfunction reported by Bastien Guerry <bzg@gnu.org>.
Make internal shell process buffer names start with space.
* progmodes/python.el (python-shell-make-comint): Add optional
argument INTERNAL.
(run-python-internal): Use it.
(python-shell-internal-get-or-create-process): Check for new
internal buffer names.
Chong Yidong [Sun, 5 Aug 2012 14:14:54 +0000 (22:14 +0800)]
In Imenu, don't show defvars with no second argument.
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Don't
show defvars which have no second argument.
* lisp/imenu.el (imenu-generic-expression): Move documentation here
from imenu--generic-function.
(imenu--generic-function): Refer to imenu-generic-expression.
Chong Yidong [Sun, 5 Aug 2012 03:52:02 +0000 (11:52 +0800)]
* fringe.el: Docstring and minor code improvements.
(fringe-styles): Add docstring.
(fringe--check-style): New function.
(set-fringe-mode, set-fringe-style): Use it.
(fringe-mode, set-fringe-style): Doc fixes.
Eli Zaretskii [Sat, 4 Aug 2012 14:36:36 +0000 (17:36 +0300)]
Fix compilation --with-x-toolkit=no.
stc/xfns.c (x_set_menu_bar_lines): Fix compilation error in
--with-x-toolkit=no builds by using FVAR.
Reported by Carsten Mattner <carstenmattner@gmail.com>.
Chong Yidong [Sat, 4 Aug 2012 14:33:00 +0000 (22:33 +0800)]
Doc fixes and improvements for syntax tables.
* src/syntax.c (Fmodify_syntax_entry): Doc fix.
* doc/lispref/syntax.texi (Syntax Basics): Rearrange the text for clarity.
Fix description of syntax table inheritance.
(Syntax Table Functions): Don't refer to internal contents of
syntax table, since that is not explained yet. Copyedits.
(Standard Syntax Tables): Node deleted.
(Syntax Table Internals): Misc clarifications. Improve table
formatting.
* doc/lispref/keymaps.texi (Inheritance and Keymaps):
* doc/lispref/text.texi (Sticky Properties): Tweak index entry.
Eli Zaretskii [Sat, 4 Aug 2012 14:17:10 +0000 (17:17 +0300)]
Fix bug #11959 with startup warnings on MS-Windows about ../site-lisp.
src/w32.c (init_environment): Change the default values of many
environment variables in dflt_envvars[] to NULL, to avoid pushing
them into environment when they were not already defined. Remove
the code that deletes site-lisp subdirectories from the default
value of EMACSLOADPATH, as it is no longer needed.
(check_windows_init_file): Now external, not static. Use
Vload_path as is, without adding anything, as this function is now
called when Vload_path is already set up.
src/w32.h (check_windows_init_file): Add prototype.
src/emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
directory, ignore the /*/i386/ tail in Vinvocation_directory, for
compatibility with Posix platforms.
(main): Move the call to check_windows_init_file to here from
w32.c.
(decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
any, in the DEFALT argument into the root of the Emacs build or
installation tree, as appropriate.
src/callproc.c (init_callproc_1): Call decode_env_path instead of
doing its equivalent by hand.
(init_callproc): Replace DOS_NT condition with MSDOS, thus letting
the code that sets Vexec_path run on MS-Windows.
src/lread.c (init_lread): Add comments to #ifdef's.
nt/paths.h (PATH_LOADSEARCH, PATH_SITELOADSEARCH, PATH_EXEC)
(PATH_DATA, PATH_DOC): Replace dummy directory names with
directories relative to %emacs_dir%.
(PATH_EXEC): Add lib-src/oo-spd/i386 and lib-src/oo/i386, to cater
to the use case of running un-installed Emacs.
Eli Zaretskii [Sat, 4 Aug 2012 09:04:22 +0000 (12:04 +0300)]
Fix the MSDOS build as fallout of latest changes.
msdos/sedlibmk.inp (allocator.$(OBJEXT), careadlinkat.$(OBJEXT)): Fix
editing out.
msdos/sed2v2.inp (IS_DEVICE_SEP): Edit to match ':'.
(IS_DIRECTORY_SEP, INTERNAL_TERMINAL): Fix Sed command syntax.
(MSDOS): Define only if undefined, as MSDOS is a built-in macro,
unless some std= switch to GCC is used.
src/msdos.c (dos_set_window_size, IT_update_begin)
(IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
instead of direct references.
* lisp/mpc.el: Support password in host argument.
(mpc--proc-connect): Parse and use new password element.
Set mpc-proc variable instead of returning process.
(mpc-proc): Adjust accordingly.
Paul Eggert [Fri, 3 Aug 2012 23:36:11 +0000 (16:36 -0700)]
Remove unnecessary casts involving pointers.
These casts are no longer needed now that we assume C89 or later,
since they involve casting to or from void *.
* alloc.c (make_pure_string, make_pure_c_string, pure_cons)
(make_pure_float, make_pure_vector):
* lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
* macros.c (Fstart_kbd_macro):
* menu.c (find_and_return_menu_selection):
* minibuf.c (read_minibuf_noninteractive):
* sysdep.c (closedir):
* xdisp.c (x_produce_glyphs):
* xfaces.c (compare_fonts_by_sort_order):
* xfns.c (x_real_positions, select_visual):
* xselect.c (x_stop_queuing_selection_requests)
(x_get_window_property, x_get_window_property_as_lisp_data):
* xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
Remove unnecessary pointer casts.
* alloc.c (record_xmalloc): New function.
* lisp.h (record_xmalloc): New decl.
(SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
more like a function. This is because the pointer cast is not
needed. All uses changed.
* print.c (print_string, print_error_message): Avoid length recalc.
Paul Eggert [Fri, 3 Aug 2012 20:55:27 +0000 (13:55 -0700)]
Improve fix for macroexp crash with debugging.
* lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
ARRAY_MARK_FLAG when checking subscripts, because ASET is
not supposed to be invoked from the garbage collector.
See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
(gc_aset): New function, which is like ASET but can be
used in the garbage collector.
(set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
(set_hash_index): Use it instead of ASET.
Eli Zaretskii [Fri, 3 Aug 2012 11:51:11 +0000 (14:51 +0300)]
Fix whitespace-display-mappings.
lisp/whitespace.el (whitespace-display-mappings): Use Unicode
codepoints, instead of emacs-mule codepoints. See
http://lists.gnu.org/archive/html/help-gnu-emacs/2012-07/msg00366.html
for the details.
Eli Zaretskii [Fri, 3 Aug 2012 10:23:30 +0000 (13:23 +0300)]
Support symlinks on latest versions of MS-Windows.
src/w32.c: Include winioctl.h and aclapi.h.
(is_symlink, chase_symlinks, enable_privilege, restore_privilege)
(revert_to_self): Forward declarations of static functions.
<static BOOL g_b_init_get_security_info>:
<g_b_init_create_symbolic_link>: New static flags.
(globals_of_w32): Initialize them to zero.
(GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
(map_w32_filename): Improve commentary. Simplify switch.
(SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
headers (most versions of MinGW w32api don't).
(get_security_info, create_symbolic_link)
(get_file_security_desc_by_handle, is_symlink, chase_symlinks):
New functions.
(sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
in the argument file name.
(sys_access): Call unc_volume_file_attributes only if
GetFileAttributes fails with network-related error codes.
(sys_rename): Diagnose renaming of a symlink when the user doesn't
have the required privileges.
(get_file_security_desc_by_name): Renamed from
get_file_security_desc.
(stat_worker): New function, with most of the guts of 'stat', and
with addition of handling of symlinks and support for 'lstat'. If
possible, get file's attributes and security information by
handle, not by name. Produce S_IFLNK bit for symlinks, when
called from 'lstat'.
(stat, lstat): New functions, call 'stat_worker'.
(symlink, readlink, careadlinkat): Rewritten to create and resolve
symlinks when the underlying filesystem supports them.
lib/src/ntlib.c (lstat): New function, calls 'stat'.
nt/inc/sys/stat.h (S_IFLNK): Define.
(S_ISLNK): A non-trivial definition.
(lstat): Prototype instead of a macro that redirects to 'stat'.
lisp/files.el (file-truename): Don't skip symlink-chasing part on
windows-nt. Incorporate the resolution of 8+3 short aliases on
Windows into the loop that recursively chases symlinks. Compare
directory and its parent case-insensitively on MS-Windows and
MS-DOS.
etc/NEWS: Announce the symlink support on MS-Windows.
Paul Eggert [Thu, 2 Aug 2012 20:59:49 +0000 (13:59 -0700)]
Fix macroexp crash on Windows with debugging.
* lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
checking subscripts; problem introduced with the recent
"ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
(ARRAY_MARK_FLAG): Now a macro as well as a constant,
since it's used in non-static inline functions now.
Paul Eggert [Thu, 2 Aug 2012 04:46:10 +0000 (21:46 -0700)]
Merge from gnulib, for extern-inline.
2012-08-01 extern-inline: new module
2012-08-01 stat-time, timespec, u64, utimens: use extern-inline
* lib/stat-time.c, lib/utimespec.c, lib/u64.c, m4/extern-inline.m4:
New files. The new .c files are for instantiating extern inline
functions.
Paul Eggert [Thu, 2 Aug 2012 04:14:48 +0000 (21:14 -0700)]
Port to Solaris 8.
Without this change, 'configure' fails because the recently-added
wait3 prototype in config.h messes up later 'configure' tests.
Fix this problem by droping wait3 and WRETCODE, as they're
no longer needed on hosts that are current porting targets.
* configure.ac (wait3, WRETCODE): Remove, fixing a FIXME.
All uses changed to waitpid and WEXITSTATUS.
* src/syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
Paul Eggert [Thu, 2 Aug 2012 01:36:14 +0000 (18:36 -0700)]
Obsolete alias inactivate-current-input-method-function.
* lisp/international/mule-cmds.el: Create
inactivate-current-input-method-function as an obsolete alias for
deactivate-current-input-method-function. See Katsumi Yamaoka in
<http://bugs.gnu.org/10150#46>.
Paul Eggert [Wed, 1 Aug 2012 20:51:44 +0000 (13:51 -0700)]
Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
This how ASET and AREF are supposed to work, and makes
it easier to think about future improvements. See
<http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
* charset.h (set_charset_attr): New function.
All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
* lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
(aref_addr): New function. All uses of &AREF(...) changed.
(set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
(set_hash_index): New functions. All lvalue-style uses of
HASH_KEY etc. changed.
* keyboard.c (set_prop): New function. All lvalue-style uses
of PROP changed.
Jay Belanger [Wed, 1 Aug 2012 18:24:13 +0000 (13:24 -0500)]
calc.texi (Simplification modes): Mention "basic" simplification.
(The Calc Mode Line): Mention the mode line display for Basic
simplification mode.
(Simplify Formulas): Refer to 'algebraic' rather than 'default'
simplifications.
(Basic Simplifications): Rename from "Limited Simplifications"
Replace "limited" by "basic" throughout.
(Algebraic Simplifications): Indicate that the algebraic
simplifications are done by default.
(Unsafe Simplifications): Mention `m E'.
(Simplification of Units): Mention `m U'.
(Trigonometric/Hyperbolic Functions, Reducing and Mapping,
Kinds of Declarations, Functions for Declarations): Mention
"algebraic simplifications" instead of `a s'.