bpt/emacs.git
11 years agoSet a minimum automake version
Glenn Morris [Tue, 7 Aug 2012 01:03:44 +0000 (21:03 -0400)]
Set a minimum automake version

* configure.ac: Require automake 1.11 (fairly arbitrarily).
* autogen.sh (automake_min): Get it from configure.ac.

11 years agosrc/w32.c: Silence compiler warnings.
Juanma Barranquero [Mon, 6 Aug 2012 22:07:01 +0000 (00:07 +0200)]
src/w32.c: Silence compiler warnings.
(map_w32_filename): Remove unused variable `is_fat'.
(chase_symlinks): Add parentheses around expression.

11 years ago* lisp/help-fns.el (help-fns--key-bindings, help-fns--signature)
Stefan Monnier [Mon, 6 Aug 2012 21:05:48 +0000 (17:05 -0400)]
* lisp/help-fns.el (help-fns--key-bindings, help-fns--signature)
(help-fns--parent-mode, help-fns--obsolete): New funs, extracted from
describe-function-1.
(describe-function-1): Use them.  Move compiler macro after sig.
(help-fns--compiler-macro): Use function-get.  Assume we're already in
standard-output.  Adjust layout to new call order.

11 years agoGrammar fixes
Glenn Morris [Mon, 6 Aug 2012 21:05:25 +0000 (17:05 -0400)]
Grammar fixes

11 years agoGuard against potential configure bug wrt HAVE_GETWD
Glenn Morris [Mon, 6 Aug 2012 20:29:45 +0000 (16:29 -0400)]
Guard against potential configure bug wrt HAVE_GETWD

* configure.ac (BROKEN_GETWD) [unixware]: New define.

* src/sysdep.c: Respect BROKEN_GETWD.

11 years agoRemove GNU_LIBRARY_PENDING_OUTPUT_COUNT
Glenn Morris [Mon, 6 Aug 2012 20:22:22 +0000 (16:22 -0400)]
Remove GNU_LIBRARY_PENDING_OUTPUT_COUNT

* configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
(PENDING_OUTPUT_COUNT): Absorb GNU_LIBRARY_PENDING_OUTPUT_COUNT.
(DISPNEW_NEEDS_STDIO_EXT): New define.

* src/dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
Let configure handle it.
(stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.

* nt/config.nt (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.
(PENDING_OUTPUT_COUNT): Define it as dispnew.c used to.

* admin/CPP-DEFINES (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Remove.

11 years ago* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Fix handling of
Stefan Monnier [Mon, 6 Aug 2012 19:53:45 +0000 (15:53 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Fix handling of
re-binding a symbol that has a symbol-macro.

Fixes: debbugs:12119

11 years agoUse GCALIGNMENT where appropriate.
Dmitry Antipov [Mon, 6 Aug 2012 16:55:46 +0000 (20:55 +0400)]
Use GCALIGNMENT where appropriate.
* alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
(union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
(mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.

11 years agoFix usage of FRAME_MENU_BAR_ITEMS in w32menu.c.
Eli Zaretskii [Mon, 6 Aug 2012 16:36:47 +0000 (19:36 +0300)]
Fix usage of FRAME_MENU_BAR_ITEMS in w32menu.c.

 src/w32menu.c (set_frame_menubar, initialize_frame_menubar): Don't
 use FRAME_MENU_BAR_ITEMS as an lvalue.

11 years ago* src/buffer.h (struct buffer): Revert `indirections' to a simple int;
Stefan Monnier [Mon, 6 Aug 2012 16:22:43 +0000 (12:22 -0400)]
* src/buffer.h (struct buffer): Revert `indirections' to a simple int;
that should be sufficient for everyone.

11 years ago* keyboard.c (timer_check_2): Add break so timer_check returns next timeout.
Jan Djärv [Mon, 6 Aug 2012 16:09:02 +0000 (18:09 +0200)]
* keyboard.c (timer_check_2): Add break so timer_check returns next timeout.

11 years agoFix Windows build errors introduced after converting to WGET and WSET.
Dmitry Antipov [Mon, 6 Aug 2012 15:45:27 +0000 (19:45 +0400)]
Fix Windows build errors introduced after converting to WGET and WSET.
* w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
Reported by Andy Moreton <andrewjmoreton@gmail.com>.

11 years agoUse FSET.
Jan Djärv [Mon, 6 Aug 2012 12:54:54 +0000 (14:54 +0200)]
Use FSET.

* nsmenu.m (ns_update_menubar): Use FSET.

* nsterm.m (ns_frame_rehighlight): Use FSET.

11 years agognus-demon.el (gnus-demon-add-handler, gnus-demon-remove-handler): Remove autoload
Julien Danjou [Mon, 6 Aug 2012 11:56:36 +0000 (11:56 +0000)]
gnus-demon.el (gnus-demon-add-handler, gnus-demon-remove-handler): Remove autoload

11 years agoSeparate read and write access to Lisp_Object slots of Lisp_Process.
Dmitry Antipov [Mon, 6 Aug 2012 11:16:07 +0000 (15:16 +0400)]
Separate read and write access to Lisp_Object slots of Lisp_Process.
* process.h (PGET, PSET): New macros similar to AREF and ASET.
* gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.

11 years agoSeparate read and write access to Lisp_Object slots of struct window.
Dmitry Antipov [Mon, 6 Aug 2012 10:24:26 +0000 (14:24 +0400)]
Separate read and write access to Lisp_Object slots of struct window.
* window.h (WGET, WSET): New macros similar to AREF and ASET.
* alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
* fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
* insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
* nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
* w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Adjust users.

11 years agoFix Windows build errors introduced after converting to FGET and FSET.
Dmitry Antipov [Mon, 6 Aug 2012 09:28:17 +0000 (13:28 +0400)]
Fix Windows build errors introduced after converting to FGET and FSET.
* w32term.c (x_frame_rehighlight, x_scroll_bar_create):
(w32_condemn_scroll_bars, w32_redeem_scroll_bar):
(w32_judge_scroll_bars): Change to use FSET.
Reported by Andy Moreton <andrewjmoreton@gmail.com>.

11 years agoFix replacement typo.
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>.

11 years ago* src/lisp.mk (lisp): Add language/persian.elc.
Glenn Morris [Mon, 6 Aug 2012 07:37:26 +0000 (00:37 -0700)]
* src/lisp.mk (lisp): Add language/persian.elc.

11 years agoAdd NEWS for language/persian.el.
Glenn Morris [Mon, 6 Aug 2012 07:36:35 +0000 (00:36 -0700)]
Add NEWS for language/persian.el.

11 years ago* leim/quail/persian.el: Add some mappings.
Mohsen BANAN [Mon, 6 Aug 2012 07:34:35 +0000 (00:34 -0700)]
* leim/quail/persian.el: Add some mappings.
(farsi-isiri-9147, farsi-transliterate-banan): Doc fixes.

Fixes: debbugs:11812

11 years ago* lisp/language/persian.el: New file.
Mohsen BANAN [Mon, 6 Aug 2012 07:31:31 +0000 (00:31 -0700)]
* lisp/language/persian.el: New file.
* lisp/loadup.el: Add language/persian.el.

Fixes: debbugs:11812

11 years ago* lisp/eshell/esh-ext.el (eshell/addpath): Use mapconcat.
Glenn Morris [Mon, 6 Aug 2012 07:10:27 +0000 (00:10 -0700)]
* lisp/eshell/esh-ext.el (eshell/addpath): Use mapconcat.

11 years agoAdd inhibit-switch-frame parameter for display-buffer, and use it in occur-edit.
Chong Yidong [Mon, 6 Aug 2012 05:33:39 +0000 (13:33 +0800)]
Add inhibit-switch-frame parameter for display-buffer, and use it in occur-edit.

* replace.el (occur-after-change-function): Avoid losing focus by
using the inhibit-switch-frame display action option.

* window.el (window--maybe-raise-frame): New function.
(window--display-buffer): Split off from here.
(display-buffer-reuse-window, display-buffer-pop-up-frame)
(display-buffer-pop-up-window, display-buffer-use-some-window):
Obey an inhibit-switch-frame action alist entry.
(display-buffer): Update doc.

Fixes: debbugs:12139

11 years agoSeparate read and write access to Lisp_Object slots of struct frame.
Dmitry Antipov [Mon, 6 Aug 2012 05:27:54 +0000 (09:27 +0400)]
Separate read and write access to Lisp_Object slots of struct frame.
* frame.h (FGET, FSET): New macros similar to AREF and ASET.
* buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
* fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
* print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
* xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.

11 years agoMake internal shell process buffer names start with space.
Fabián Ezequiel Gallina [Mon, 6 Aug 2012 03:27:43 +0000 (00:27 -0300)]
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.

11 years agoTweak previous esh-ext.el change
Glenn Morris [Mon, 6 Aug 2012 01:23:37 +0000 (18:23 -0700)]
Tweak previous esh-ext.el change

* lisp/eshell/esh-ext.el (eshell/addpath): Use dolist.
Do less getting and setting of environment variables.

11 years agoerc-match: add option to exclude server buffer
Julien Danjou [Mon, 6 Aug 2012 00:15:34 +0000 (02:15 +0200)]
erc-match: add option to exclude server buffer

* erc-match.el (erc-match-exclude-server-buffer)
(erc-match-message): Add new option to exclude server buffer from
matching.

11 years agognus-demon.el (gnus-demon-add-handler, gnus-demon-remove-handler): Add autoload
Julien Danjou [Sun, 5 Aug 2012 22:02:24 +0000 (22:02 +0000)]
gnus-demon.el (gnus-demon-add-handler, gnus-demon-remove-handler): Add autoload

11 years agoIgnore stamp-h.in
Andreas Schwab [Sun, 5 Aug 2012 21:44:21 +0000 (23:44 +0200)]
Ignore stamp-h.in

11 years ago* emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
Andreas Schwab [Sun, 5 Aug 2012 21:44:21 +0000 (23:44 +0200)]
* emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.

11 years agoGeneralize common compile-time constants.
Dmitry Antipov [Sun, 5 Aug 2012 15:47:28 +0000 (19:47 +0400)]
Generalize common compile-time constants.
* lisp.h (header_size, bool_header_size, word_size): Now here.
(struct Lisp_Vector): Add comment.
(struct Lisp_Bool_Vector): Move up to define handy constants.
(VECSIZE, PSEUDOVECSIZE): Simplify.
(SAFE_ALLOCA_LISP): Use new constant.  Adjust indentation.
* buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
* font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
* msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
* xfont.c, xmenu.c: Use word_size where appropriate.

11 years agoTweak proced docstring to trigger autoloading.
Chong Yidong [Sun, 5 Aug 2012 14:22:05 +0000 (22:22 +0800)]
Tweak proced docstring to trigger autoloading.

* lisp/proced.el (proced): Add substitution string to docstring to
trigger autoloading of the proced library on C-h f.

Fixes: debbugs:1768

11 years agoIn Imenu, don't show defvars with no second argument.
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.

Fixes: debbugs:8638

11 years ago* search.c (Freplace_match): Treat \? in the replacement text literally.
Lawrence Mitchell [Sun, 5 Aug 2012 13:30:15 +0000 (21:30 +0800)]
* search.c (Freplace_match): Treat \? in the replacement text literally.

Fixes: debbugs:8161

11 years ago* INSTALL: Explain, how to disable D-Bus at all. (Bug#12112)
Michael Albinus [Sun, 5 Aug 2012 12:53:48 +0000 (14:53 +0200)]
* INSTALL: Explain, how to disable D-Bus at all.  (Bug#12112)

11 years agoAuto-commit of generated files.
Glenn Morris [Sun, 5 Aug 2012 10:19:01 +0000 (06:19 -0400)]
Auto-commit of generated files.

11 years agoManual fixes for frame-background-mode.
Chong Yidong [Sun, 5 Aug 2012 09:24:55 +0000 (17:24 +0800)]
Manual fixes for frame-background-mode.

* doc/custom.texi (Face Customization): Move discussion of face
inheritance here, from Faces section.

* doc/display.texi (Faces): Document frame-background-mode.

* doc/lispref/display.texi (Defining Faces): Move documentation of
frame-background-mode to the Emacs manual (Bug#7774).

11 years agoMark last change as tiny.
Chong Yidong [Sun, 5 Aug 2012 08:52:45 +0000 (16:52 +0800)]
Mark last change as tiny.

11 years agoAdd declares for viper-deflocalvar and viper-loop.
Vegard Øye [Sun, 5 Aug 2012 08:51:59 +0000 (16:51 +0800)]
Add declares for viper-deflocalvar and viper-loop.

* lisp/emulation/viper-init.el (viper-deflocalvar): Add docstring and
indentation declaration.
(viper-loop): Add indentation declaration.

Fixes: debbugs:7025

11 years agoImprovements to local-variable reporting in `describe-variable'.
Chong Yidong [Sun, 5 Aug 2012 08:41:12 +0000 (16:41 +0800)]
Improvements to local-variable reporting in `describe-variable'.

* lisp/help-fns.el (describe-variable): Add hyperlink for
directory-local variables files.  Improve buffer-local and
permanent-local reporting; suggested by MON KEY.

* lisp/help-mode.el (help-dir-local-var-def): New button type.

Fixes: debbugs:6644

11 years agoDocfix for kill-buffer-hook and others.
Chong Yidong [Sun, 5 Aug 2012 07:45:12 +0000 (15:45 +0800)]
Docfix for kill-buffer-hook and others.

* lisp/files.el (kill-buffer-hook): Provide a defvar.

* src/term.c (Vsuspend_tty_functions, Vresume_tty_functions):
* src/frame.c (Vdelete_frame_functions):
* src/emacs.c (Vkill_emacs_hook): Doc fix.

11 years ago* lisp/eshell/esh-ext.el (eshell/addpath): Also update eshell-path-env.
Glenn Morris [Sun, 5 Aug 2012 05:24:50 +0000 (22:24 -0700)]
* lisp/eshell/esh-ext.el (eshell/addpath): Also update eshell-path-env.

Fixes: debbugs:12013

11 years ago* configure.ac: Disable paxctl if binaries don't have a PT_PAX_FLAGS header.
Ulrich Müller [Sun, 5 Aug 2012 05:00:52 +0000 (22:00 -0700)]
* configure.ac: Disable paxctl if binaries don't have a PT_PAX_FLAGS header.

Fixes: debbugs:11979

11 years ago* wdired.el (wdired-mode, wdired-change-to-wdired-mode): Doc fixes.
Chong Yidong [Sun, 5 Aug 2012 04:19:21 +0000 (12:19 +0800)]
* wdired.el (wdired-mode, wdired-change-to-wdired-mode): Doc fixes.

11 years ago* fringe.el: Docstring and minor code improvements.
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.

Fixes: debbugs:6480

11 years ago* files.el (set-auto-mode): Fix invalid setq call.
Chong Yidong [Sun, 5 Aug 2012 03:03:31 +0000 (11:03 +0800)]
* files.el (set-auto-mode): Fix invalid setq call.

11 years ago* lisp/isearch.el: Misc simplification; use defstruct.
Stefan Monnier [Sat, 4 Aug 2012 22:31:04 +0000 (18:31 -0400)]
* lisp/isearch.el: Misc simplification; use defstruct.
(isearch-mode-map): Dense maps now work like sparse ones.
(isearch--state): New defstruct.
(isearch-string-state, isearch-message-state, isearch-point-state)
(isearch-success-state, isearch-forward-state)
(isearch-other-end-state, isearch-word-state, isearch-error-state)
(isearch-wrapped-state, isearch-barrier-state)
(isearch-case-fold-search-state, isearch-pop-fun-state): Remove,
replaced by defstruct's accessors.
(isearch--set-state): Rename from isearch-top-state and change
calling convention.
(isearch-push-state): Use new isearch--get-state.
(isearch-toggle-word): Disable regexp when enabling word.
(isearch-message-prefix): Remove unused arg _c-q-hack.
(isearch-message-suffix): Remove unused arg _ellipsis.

11 years agoTODO trivia
Glenn Morris [Sat, 4 Aug 2012 18:07:50 +0000 (11:07 -0700)]
TODO trivia

11 years agoFix compilation --with-x-toolkit=no.
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>.

11 years agoDoc fixes and improvements for syntax tables.
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.

11 years agoFix bug #11959 with startup warnings on MS-Windows about ../site-lisp.
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.

11 years agoAuto-commit of generated files.
Glenn Morris [Sat, 4 Aug 2012 10:17:29 +0000 (06:17 -0400)]
Auto-commit of generated files.

11 years agoFix the MSDOS build as fallout of latest changes.
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.

11 years agoFix Sed scripts and msdos.c as fallout of latest changes.
Eli Zaretskii [Sat, 4 Aug 2012 08:58:33 +0000 (11:58 +0300)]
Fix Sed scripts and msdos.c as fallout of latest changes.

11 years ago* simple.el (list-processes): Doc fix.
Andreas Schwab [Sat, 4 Aug 2012 08:09:24 +0000 (10:09 +0200)]
* simple.el (list-processes): Doc fix.

11 years ago* simple.el (list-processes--refresh): For a server use :host or
Andreas Schwab [Sat, 4 Aug 2012 08:08:11 +0000 (10:08 +0200)]
* simple.el (list-processes--refresh): For a server use :host or
:local as the address.

11 years ago* lisp/mpc.el: Support password in host argument.
Michal Nazarewicz [Sat, 4 Aug 2012 07:37:27 +0000 (03:37 -0400)]
* 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.

11 years agoExport DEFAULT_REHASH_* to GDB.
Paul Eggert [Sat, 4 Aug 2012 00:52:10 +0000 (17:52 -0700)]
Export DEFAULT_REHASH_* to GDB.

* lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
Now constants, not macros.

11 years agoComment why gc_aset can be triggered during GC.
Paul Eggert [Fri, 3 Aug 2012 23:40:20 +0000 (16:40 -0700)]
Comment why gc_aset can be triggered during GC.

11 years agoRemove unnecessary casts involving pointers.
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.

11 years agoImprove fix for macroexp crash with debugging.
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.

11 years agoconfigure.ac whitespace trivia
Glenn Morris [Fri, 3 Aug 2012 20:34:35 +0000 (16:34 -0400)]
configure.ac whitespace trivia
(Avoids some trailing whitespace in generated config.h.)

11 years ago* nt/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Fri, 3 Aug 2012 12:16:40 +0000 (14:16 +0200)]
* nt/config.nt: Sync with autogen/config.in.
(DOS_NT, MSDOS): New macros.
(WRETCODE, wait3): Remove.

* nt/inc/ms-w32.h (DOS_NT): Remove; defined in config.nt.

* lib-src/makefile.w32-in (LOCAL_FLAGS): Remove WINDOWSNT and DOS_NT,
they are always defined in config.h.

11 years agoFix whitespace-display-mappings.
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.

11 years agoSupport symlinks on latest versions of MS-Windows.
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.

11 years agoAuto-commit of generated files.
Glenn Morris [Fri, 3 Aug 2012 10:17:23 +0000 (06:17 -0400)]
Auto-commit of generated files.

11 years agoAdapt lib/makefile.w32-in to latest gnulib imports.
Eli Zaretskii [Fri, 3 Aug 2012 10:02:48 +0000 (13:02 +0300)]
Adapt lib/makefile.w32-in to latest gnulib imports.

 lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/stat-time.$(O),
 $(BLD)/timespec.$(O), and $(BLD)/u64.$(O).
 (SHA512_H): Don't mention u64.h twice.
 ($(BLD)/stat-time.$(O), ($(BLD)/timespec.$(O), ($(BLD)/u64.$(O)):
 New targets.

11 years agoFix a typo in top-level ChangeLog.
Eli Zaretskii [Fri, 3 Aug 2012 09:00:42 +0000 (12:00 +0300)]
Fix a typo in top-level ChangeLog.

11 years agoAdd NEWS entry for last change.
Chong Yidong [Fri, 3 Aug 2012 08:30:48 +0000 (16:30 +0800)]
Add NEWS entry for last change.

11 years ago* menu-bar.el (menu-bar-tools-menu): Remove PCL-CVS.
Chong Yidong [Fri, 3 Aug 2012 08:25:42 +0000 (16:25 +0800)]
* menu-bar.el (menu-bar-tools-menu): Remove PCL-CVS.

11 years ago* sort.el (sort-regexp-fields): Doc fix.
Chong Yidong [Fri, 3 Aug 2012 08:15:24 +0000 (16:15 +0800)]
* sort.el (sort-regexp-fields): Doc fix.

11 years ago* textmodes/reftex.el (reftex-compile-variables): Make keyvals
Tassilo Horn [Fri, 3 Aug 2012 06:47:32 +0000 (08:47 +0200)]
* textmodes/reftex.el (reftex-compile-variables): Make keyvals
labels regex position point at the expected place.

11 years agoDoc fixes for imap.el.
MON KEY [Fri, 3 Aug 2012 02:49:51 +0000 (10:49 +0800)]
Doc fixes for imap.el.

* net/imap.el (imap-interactive-login, imap-authenticate)
(imap-mailbox-lsub, imap-mailbox-list)
(imap-mailbox-status-asynch, imap-mailbox-acl-delete)
(imap-fetch, imap-message-flag-permanent-p, imap-envelope-from)
(imap-parse-response): Doc fix.

11 years agoWorkaround for latex-forward-sexp slowness.
João Távora [Fri, 3 Aug 2012 02:29:59 +0000 (10:29 +0800)]
Workaround for latex-forward-sexp slowness.

* textmodes/tex-mode.el (latex-forward-sexp): Terminate the loop if
sexp scanning does not move point.

Fixes: debbugs:5734

11 years agoMerge from gnulib.
Paul Eggert [Fri, 3 Aug 2012 00:42:11 +0000 (17:42 -0700)]
Merge from gnulib.

2012-08-02 stat-time, timespec, u64: support naive out-of-dir builds

11 years agoFix macroexp crash on Windows with debugging.
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.

Fixes: debbugs:12118

11 years agofixup ChangeLog
Tassilo Horn [Thu, 2 Aug 2012 19:04:53 +0000 (21:04 +0200)]
fixup ChangeLog

11 years ago* textmodes/reftex-vars.el (reftex-label-alist): Docfix.
Tassilo Horn [Thu, 2 Aug 2012 18:54:36 +0000 (20:54 +0200)]
* textmodes/reftex-vars.el (reftex-label-alist): Docfix.

11 years ago* textmodes/reftex-vars.el (reftex-default-label-alist-entries):
Tassilo Horn [Thu, 2 Aug 2012 18:24:11 +0000 (20:24 +0200)]
* textmodes/reftex-vars.el (reftex-default-label-alist-entries):
Add listings, minted, and ctable packages.
(reftex-label-alist-builtin): Move listings, minted, and ctable
entries before LaTeX.

11 years agoFix typo in docstring. Bug #12122.
Bastien Guerry [Thu, 2 Aug 2012 16:54:42 +0000 (18:54 +0200)]
Fix typo in docstring.  Bug #12122.

11 years ago* lisp.h (VALMASK) [!USE_LSB_TAG]: Now a macro
Paul Eggert [Thu, 2 Aug 2012 10:49:19 +0000 (03:49 -0700)]
* lisp.h (VALMASK) [!USE_LSB_TAG]: Now a macro

as well as a constant, since it's used in non-static inline functions now.

11 years ago* lib/Makefile.am (DEFAULT_INCLUDES): Add -I$(top_srcdir)/lib for out-of-tree build.
YAMAMOTO Mitsuharu [Thu, 2 Aug 2012 10:39:47 +0000 (19:39 +0900)]
* lib/Makefile.am (DEFAULT_INCLUDES): Add -I$(top_srcdir)/lib for out-of-tree build.

11 years agoAuto-commit of generated files.
Glenn Morris [Thu, 2 Aug 2012 10:17:32 +0000 (06:17 -0400)]
Auto-commit of generated files.

11 years ago* xfaces.c (face_for_overlay_string): Remove unused local.
Paul Eggert [Thu, 2 Aug 2012 09:33:13 +0000 (02:33 -0700)]
* xfaces.c (face_for_overlay_string): Remove unused local.

11 years ago* xfaces.c: Don't assume buffer size fits in 'int'.
Paul Eggert [Thu, 2 Aug 2012 09:20:01 +0000 (02:20 -0700)]
* xfaces.c: Don't assume buffer size fits in 'int'.

11 years ago* xfaces.c (face_at_buffer_position): Remove unused local.
Paul Eggert [Thu, 2 Aug 2012 08:47:07 +0000 (01:47 -0700)]
* xfaces.c (face_at_buffer_position): Remove unused local.

11 years agolisp/emacs-lisp/rx.el: Remove dead URL from commentary.
Chong Yidong [Thu, 2 Aug 2012 08:12:36 +0000 (16:12 +0800)]
lisp/emacs-lisp/rx.el: Remove dead URL from commentary.

11 years agoUse C99-style 'extern inline' if available.
Paul Eggert [Thu, 2 Aug 2012 07:31:34 +0000 (00:31 -0700)]
Use C99-style 'extern inline' if available.

* lib-src/profile.c (SYSTIME_INLINE): Define.
* nt/config.nt: Sync with autogen/config.in.
(_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN)
(_GL_INLINE_HEADER_END): New macros.
* src/buffer.h (BUFFER_INLINE):
* src/category.h (CATEGORY_INLINE):
* src/character.h (CHARACTER_INLINE):
* src/charset.h (CHARSET_INLINE):
* src/composite.h (COMPOSITE_INLINE):
* src/dispextern.h (DISPEXTERN_INLINE):
* src/lisp.h (LISP_INLINE):
* src/systime.h (SYSTIME_INLINE):
New macro, replacing 'static inline' in this header.
* src/buffer.h, src/category.h, src/character.h, src/charset.h:
* src/composite.h, src/dispextern.h, lisp.h, systime.h:
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
* src/alloc.c (LISP_INLINE):
* src/buffer.c (BUFFER_INLINE):
* src/category.c (CATEGORY_INLINE):
* src/character.c (CHARACTER_INLINE):
* src/charset.c (CHARSET_INLINE):
* src/composite.c (COMPOSITE_INLINE):
* src/dispnew.c (DISPEXTERN_INLINE):
* src/sysdep.c (SYSTIME_INLINE):
Define to EXTERN_INLINE, so that the corresponding functions
are compiled into code.
* src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
(INLINE_HEADER_END): New macros.
* src/lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
since it's used in non-static inline functions now.

11 years agoMisc updates for CPP-DEFINES
Glenn Morris [Thu, 2 Aug 2012 06:47:17 +0000 (23:47 -0700)]
Misc updates for CPP-DEFINES

11 years agoComment
Glenn Morris [Thu, 2 Aug 2012 06:43:13 +0000 (23:43 -0700)]
Comment

11 years ago* src/s/: Remove empty directory.
Glenn Morris [Thu, 2 Aug 2012 06:21:48 +0000 (23:21 -0700)]
* src/s/: Remove empty directory.

* make-dist: Remove src/s.

11 years agoMove NT-specific include file to the NT include directory
Glenn Morris [Thu, 2 Aug 2012 06:19:48 +0000 (23:19 -0700)]
Move NT-specific include file to the NT include directory

* nt/inc/ms-w32.h: Move here from ../src/s.
* nt/config.nt (config_opsysfile): Change to <ms-w32.h>.

* s/ms-w32.h: Move to ../nt/inc.
* src/makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
Update for new ms-w32.h location.

* lib-src/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.

* lib/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.

* lisp/emacs-lisp/authors.el (authors-renamed-files-alist): Add ms-w32.h.

11 years agoRemove files that no longer exist
Glenn Morris [Thu, 2 Aug 2012 06:17:21 +0000 (23:17 -0700)]
Remove files that no longer exist

11 years agoMerge from gnulib, for extern-inline.
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.

Fixes: debbugs:12116

11 years agoPort to Solaris 8.
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.

11 years ago* src/nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR
Glenn Morris [Thu, 2 Aug 2012 04:06:38 +0000 (21:06 -0700)]
* src/nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR
(rather than hard-coding the path separator).

11 years agoAvoid needless autoheader after autogen.sh.
Paul Eggert [Thu, 2 Aug 2012 01:59:19 +0000 (18:59 -0700)]
Avoid needless autoheader after autogen.sh.

* src/stamp-h.in: Remove from bzr repository; no longer needed there.
* .bzrignore: Add it.
* autogen.sh: Create it.

11 years agoObsolete alias inactivate-current-input-method-function.
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>.

11 years agocalc.texi (Simplification modes, Conversions)
Jay Belanger [Wed, 1 Aug 2012 23:42:29 +0000 (18:42 -0500)]
calc.texi (Simplification modes, Conversions)
(Operating on Selections, Basic Simplifications)
(Algebraic Simplifications):  Mention "basic" simplifications.
(Algebraic Entry): Remove mention of default simplifications.