bpt/emacs.git
13 years ago* lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
Paul Eggert [Fri, 29 Apr 2011 17:56:27 +0000 (10:56 -0700)]
* lisp.h (EMACS_INTPTR): Remove.  All uses changed to intptr_t.
(EMACS_UINTPTR): Likewise, with uintptr_t.

13 years ago* lisp.h: Prefer 64-bit EMACS_INT if available.
Paul Eggert [Fri, 29 Apr 2011 08:51:24 +0000 (01:51 -0700)]
* lisp.h: Prefer 64-bit EMACS_INT if available.

(EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
on 32-bit hosts that have 64-bit int, so that they can access
large files.

13 years ago* configure.in (BITS_PER_LONG_LONG): New macro.
Paul Eggert [Fri, 29 Apr 2011 07:55:57 +0000 (00:55 -0700)]
* configure.in (BITS_PER_LONG_LONG): New macro.

13 years ago* lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
Paul Eggert [Fri, 29 Apr 2011 07:55:25 +0000 (00:55 -0700)]
* lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.

13 years agoPrefer intptr_t/uintptr_t for integers the same widths as pointers.
Paul Eggert [Fri, 29 Apr 2011 07:54:43 +0000 (00:54 -0700)]
Prefer intptr_t/uintptr_t for integers the same widths as pointers.

This removes an assumption that EMACS_INT and long are the same
width as pointers.  The assumption is true for Emacs porting targets
now, but we want to make other targets possible.
* lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
(EMACS_INTPTR, EMACS_UINTPTR): New macros.
In the rest of the code, change types of integers that hold casted
pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
(XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
(XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
No need to cast type when ORing.
(XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
* alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
* doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
assume EMACS_INT is the same width as char *.
* gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
(xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
Remove no-longer-needed casts.
(xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
(xg_tool_bar_help_callback, xg_make_tool_item):
Use EMACS_INTPTR to hold an integer
that will be cast to void *; this can avoid a GCC warning
if EMACS_INT is not the same width as void *.
* menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
* xdisp.c (display_echo_area_1, resize_mini_window_1):
(current_message_1, set_message_1):
Use a local to convert to proper width without a cast.
* xmenu.c (dialog_selection_callback): Likewise.

13 years agoMerge from mainline.
Paul Eggert [Thu, 28 Apr 2011 22:28:58 +0000 (15:28 -0700)]
Merge from mainline.

13 years agoMerge: doprnt: Omit useless test; int overflow check (Bug#8545).
Paul Eggert [Thu, 28 Apr 2011 22:06:00 +0000 (15:06 -0700)]
Merge: doprnt: Omit useless test; int overflow check (Bug#8545).

13 years agoDocument doprnt's behavior a bit better.
Paul Eggert [Thu, 28 Apr 2011 22:02:15 +0000 (15:02 -0700)]
Document doprnt's behavior a bit better.

13 years agoRemove confusing word from comment.
Paul Eggert [Thu, 28 Apr 2011 21:41:39 +0000 (14:41 -0700)]
Remove confusing word from comment.

13 years agont/gmake.defs (ARCH): Fix error message in case of unknown architecture.
Eli Zaretskii [Thu, 28 Apr 2011 20:43:23 +0000 (23:43 +0300)]
nt/gmake.defs (ARCH): Fix error message in case of unknown architecture.

13 years agont/INSTALL: More details about problems with MSYS Bash.
Eli Zaretskii [Thu, 28 Apr 2011 20:28:51 +0000 (23:28 +0300)]
nt/INSTALL: More details about problems with MSYS Bash.

Fixes: debbugs:8564

13 years agoImprove comment.
Paul Eggert [Thu, 28 Apr 2011 20:27:52 +0000 (13:27 -0700)]
Improve comment.

13 years ago* lisp/net/rcirc.el (rcirc-handler-353): Fix bug for channels which the
Deniz Dogan [Thu, 28 Apr 2011 20:22:51 +0000 (22:22 +0200)]
* lisp/net/rcirc.el (rcirc-handler-353): Fix bug for channels which the
user has not joined.

13 years ago* doprnt.c (SIZE_MAX): Move defn after all includes, as they might #define it.
Paul Eggert [Thu, 28 Apr 2011 20:11:17 +0000 (13:11 -0700)]
* doprnt.c (SIZE_MAX): Move defn after all includes, as they might #define it.

13 years ago* doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
Paul Eggert [Thu, 28 Apr 2011 20:09:37 +0000 (13:09 -0700)]
* doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).

13 years agosrc/w32.c (init_environment): Warn about defaulting HOME to C:\.
Juanma Barranquero [Thu, 28 Apr 2011 19:51:12 +0000 (21:51 +0200)]
src/w32.c (init_environment): Warn about defaulting HOME to C:\.

13 years ago* lisp/pcomplete.el (pcomplete-completions-at-point): Return nil if there
Stefan Monnier [Thu, 28 Apr 2011 19:39:11 +0000 (16:39 -0300)]
* lisp/pcomplete.el (pcomplete-completions-at-point): Return nil if there
aren't any completions at point.

13 years agoAdd delayed warnings support.
Juanma Barranquero [Thu, 28 Apr 2011 19:35:20 +0000 (21:35 +0200)]
Add delayed warnings support.

* etc/NEWS: Document `delayed-warnings-list' and `delayed-warnings-hook'.

* lisp/subr.el (display-delayed-warnings): New function.
  (delayed-warnings-hook): New variable.

* src/keyboard.c (Qdelayed_warnings_hook): Define.
  (command_loop_1): Run `delayed-warnings-hook' if Vdelayed_warnings_list
  is non-nil.
  (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
  (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.

13 years agoetc/NEWS: Fix typos.
Juanma Barranquero [Thu, 28 Apr 2011 19:07:08 +0000 (21:07 +0200)]
etc/NEWS: Fix typos.

13 years agont/INSTALL: Mention problems with MSYS/Cygwin Bash right at the beginning.
Eli Zaretskii [Thu, 28 Apr 2011 17:25:14 +0000 (20:25 +0300)]
nt/INSTALL: Mention problems with MSYS/Cygwin Bash right at the beginning.

Fixes: debbugs:8564

13 years agoMerge from mainline.
Paul Eggert [Thu, 28 Apr 2011 16:11:49 +0000 (09:11 -0700)]
Merge from mainline.

13 years agoMake MH-E use completion-at-point
Stefan Monnier [Thu, 28 Apr 2011 15:32:28 +0000 (12:32 -0300)]
Make MH-E use completion-at-point
* lisp/mh-e/mh-letter.el (mh-letter-completion-at-point): New function,
extracted from mh-letter-complete
(mh-letter-mode, mh-letter-complete, mh-letter-complete-or-space): Use it.
(mh-complete-word): Only use the common-substring arg when it works.
(mh-folder-expand-at-point):
* lisp/mh-e/mh-alias.el (mh-alias-letter-expand-alias): Return data suitable
for completion-at-point-functions.
* lisp/mh-e/mh-utils.el (mh-folder-completion-function): Make it work like
file-name completion, so partial-completion can do its job.
* lisp/minibuffer.el (completion-at-point, completion-help-at-point):
Don't presume that a given completion-at-point-function will always
use the same calling convention.

13 years agoFix return value from doprnt when message is truncated at non-ASCII character.
Eli Zaretskii [Thu, 28 Apr 2011 11:46:40 +0000 (07:46 -0400)]
Fix return value from doprnt when message is truncated at non-ASCII character.

 src/doprnt.c (doprnt): Don't return value smaller than the buffer
 size if the message was truncated.  (Bug#8545).

13 years ago* sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
Paul Eggert [Thu, 28 Apr 2011 08:18:53 +0000 (01:18 -0700)]
* sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.

Also, don't assume VALBITS / RAND_BITS is less than 5,
and don't rely on undefined behavior when shifting a 1 left into
the sign bit.
* lisp.h (get_random): Change signature to match.

13 years ago* lread.c (hash_string): Use size_t, not int, for hash computation.
Paul Eggert [Thu, 28 Apr 2011 05:15:35 +0000 (22:15 -0700)]
* lread.c (hash_string): Use size_t, not int, for hash computation.

Normally we prefer signed values; but hashing is special, because
it's better to use unsigned division on hash table sizes so that
the remainder is nonnegative.  Also, size_t is the natural width
for hashing into memory.  The previous code used 'int', which doesn't
retain enough info to hash well into very large tables.
(oblookup, oblookup_last_bucket_number, Funintern): Likewise.

13 years agosrc/w32fns.c: #if-0 some functions entirely, not just the bodies.
Juanma Barranquero [Thu, 28 Apr 2011 02:01:33 +0000 (04:01 +0200)]
src/w32fns.c: #if-0 some functions entirely, not just the bodies.

13 years ago* dbusbind.c: Don't possibly lose pointer info when converting.
Paul Eggert [Thu, 28 Apr 2011 00:48:19 +0000 (17:48 -0700)]
* dbusbind.c: Don't possibly lose pointer info when converting.

(xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
Use XPNTR rather than XHASH, so that the high-order bits of
the pointer aren't lost when converting through void *.

13 years ago* eval.c (Fautoload): Don't double-shift a pointer.
Paul Eggert [Thu, 28 Apr 2011 00:45:40 +0000 (17:45 -0700)]
* eval.c (Fautoload): Don't double-shift a pointer.

13 years ago* fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
Paul Eggert [Thu, 28 Apr 2011 00:43:18 +0000 (17:43 -0700)]
* fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.

13 years ago* lisp/pcomplete.el (pcomplete-completions-at-point):
Stefan Monnier [Thu, 28 Apr 2011 00:18:12 +0000 (21:18 -0300)]
* lisp/pcomplete.el (pcomplete-completions-at-point):
Obey pcomplete-ignore-case.  Don't call pcomplete-norm-func unless
pcomplete-seen is non-nil.
(pcomplete-comint-setup): Also recognize the new comint/shell
completion functions.
(pcomplete-do-complete): Don't call pcomplete-norm-func unless
pcomplete-seen is non-nil.

13 years agoMerge: * doprnt.c (doprnt): Support "ll" length modifier, for long long.
Paul Eggert [Wed, 27 Apr 2011 23:48:43 +0000 (16:48 -0700)]
Merge: * doprnt.c (doprnt): Support "ll" length modifier, for long long.

13 years agosrc/makefile.w32-in: Update dependencies.
Juanma Barranquero [Wed, 27 Apr 2011 23:35:33 +0000 (01:35 +0200)]
src/makefile.w32-in: Update dependencies.

13 years agoFix comments.
Paul Eggert [Wed, 27 Apr 2011 23:04:20 +0000 (16:04 -0700)]
Fix comments.

13 years ago* doprnt.c (doprnt): Fix two typos for long long.
Paul Eggert [Wed, 27 Apr 2011 22:59:09 +0000 (15:59 -0700)]
* doprnt.c (doprnt): Fix two typos for long long.

13 years agoMerge from mainline.
Paul Eggert [Wed, 27 Apr 2011 22:29:33 +0000 (15:29 -0700)]
Merge from mainline.

13 years agoSupport inttypes.h and strtoumax in non-MinGW builds on Windows.
Eli Zaretskii [Wed, 27 Apr 2011 21:14:34 +0000 (00:14 +0300)]
Support inttypes.h and strtoumax in non-MinGW builds on Windows.

 nt/inc/inttypes.h: New file.
 nt/config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX)
 (HAVE_STRTOULL, HAVE_STRTOUMAX): New macros.

13 years agoFix ChangeLog typos.
Juanma Barranquero [Wed, 27 Apr 2011 19:51:19 +0000 (21:51 +0200)]
Fix ChangeLog typos.

13 years agoAdd FIXME comment.
Paul Eggert [Wed, 27 Apr 2011 19:05:21 +0000 (12:05 -0700)]
Add FIXME comment.

13 years ago* doprnt.c (doprnt): Support "ll" length modifier, for long long.
Paul Eggert [Wed, 27 Apr 2011 18:22:21 +0000 (11:22 -0700)]
* doprnt.c (doprnt): Support "ll" length modifier, for long long.

13 years agoImprove `doprnt' and its usage. (Bug#8545)
Eli Zaretskii [Wed, 27 Apr 2011 18:15:29 +0000 (21:15 +0300)]
Improve `doprnt' and its usage.  (Bug#8545)

 src/doprnt.c (doprnt): Make sure `format' is never accessed beyond
 `format_end'.  Remove support for %l as a conversion specifier.
 Don't use xrealloc.  Improve diagnostics when the %l size modifier
 is used.  Update the commentary.
 src/eval.c (verror): Simplify calculation of size_t.
 src/coding.c (Ffind_operation_coding_system): Fix diagnostic error
 messages.

13 years agoApplied icalendar patches from Niels Giesen.
Ulf Jasper [Wed, 27 Apr 2011 17:48:35 +0000 (19:48 +0200)]
Applied icalendar patches from Niels Giesen.

lisp/ChangeLog:

2011-04-27  Niels Giesen <niels.giesen@gmail.com>

* calendar/icalendar.el (diary-lib): Added require statement.
(icalendar--create-uid): Read out a uid from a text-property on
the first character in the entry. This allows for code to add its
own uid to the entry.
(icalendar--convert-float-to-ical): Add export of
`diary-float'-entries save for those with the optional DAY

13 years ago* subr.el (shell-quote-argument): Use alternate escaping strategy
Daniel Colascione [Wed, 27 Apr 2011 07:56:55 +0000 (00:56 -0700)]
* subr.el (shell-quote-argument): Use alternate escaping strategy
when we spot a variable reference in a string.

13 years ago* buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing change
Paul Eggert [Wed, 27 Apr 2011 08:06:26 +0000 (01:06 -0700)]
* buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing change

13 years agoAuto-commit of generated files.
Glenn Morris [Wed, 27 Apr 2011 06:48:35 +0000 (02:48 -0400)]
Auto-commit of generated files.

13 years agoMerge: nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
Paul Eggert [Wed, 27 Apr 2011 06:03:54 +0000 (23:03 -0700)]
Merge: nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.

13 years ago* nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
Paul Eggert [Wed, 27 Apr 2011 06:01:43 +0000 (23:01 -0700)]
* nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.

This makes this file independent of the recent pseudovector change.

13 years ago* cmdproxy.c (try_dequote_cmdline): Notice variable substitutions in
Daniel Colascione [Wed, 27 Apr 2011 04:19:15 +0000 (21:19 -0700)]
* cmdproxy.c (try_dequote_cmdline): Notice variable substitutions in
quoted strings and bail out.

13 years agoFixed a bug that caused configure with --enable-checking=stringoverrun to have no...
Ben Key [Wed, 27 Apr 2011 02:17:44 +0000 (21:17 -0500)]
Fixed a bug that caused configure with --enable-checking=stringoverrun to have no effect.

13 years agoUpdate from gnulib.
Paul Eggert [Tue, 26 Apr 2011 19:29:47 +0000 (12:29 -0700)]
Update from gnulib.

13 years ago* lisp.h: Add comments about struct vectorlike_header.
Paul Eggert [Tue, 26 Apr 2011 19:14:07 +0000 (12:14 -0700)]
* lisp.h: Add comments about struct vectorlike_header.

13 years ago* keyboard.c (handle_user_signal): Fix pointer signedness problem.
Paul Eggert [Tue, 26 Apr 2011 18:02:10 +0000 (11:02 -0700)]
* keyboard.c (handle_user_signal): Fix pointer signedness problem.

13 years agoMerge from mainline.
Paul Eggert [Tue, 26 Apr 2011 17:50:51 +0000 (10:50 -0700)]
Merge from mainline.

13 years agoFix typos in ChangeLogs.
Juanma Barranquero [Tue, 26 Apr 2011 14:07:29 +0000 (16:07 +0200)]
Fix typos in ChangeLogs.

13 years agosrc/keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
Juanma Barranquero [Tue, 26 Apr 2011 14:02:55 +0000 (16:02 +0200)]
src/keyboard.c (QCrtl): Rename from Qrtl.  All uses changed.

13 years agoMake ERC use completion-at-point
Stefan Monnier [Tue, 26 Apr 2011 13:50:09 +0000 (10:50 -0300)]
Make ERC use completion-at-point
* lisp/erc/erc.el (erc-mode-map): Use completion-at-point.
(erc-mode): Tell completion-at-point to obey erc-complete-functions.
(erc-complete-word-at-point): New function.
(erc-complete-word): Make it obsolete.
* lisp/erc/erc-pcomplete.el (erc-pcompletions-at-point): New function.
(pcomplete): Use it.
* lisp/erc/erc-dcc.el (erc-dcc-chat-mode-map): Use completion-at-point.
(erc-dcc-chat-mode): Tell completion-at-point to obey
erc-complete-functions.
* lisp/erc/erc-button.el (erc-button-next-function): New function extracted from
erc-button-next.
(button, erc-button-next): Use it.

13 years agoDon't return in emacs_gnutls_handshake without an explicit value.
Ted Zlatanov [Tue, 26 Apr 2011 12:59:12 +0000 (07:59 -0500)]
Don't return in emacs_gnutls_handshake without an explicit value.

* gnutls.c (emacs_gnutls_handshake): Return an error if we're not
supposed to be handshaking.
Reported by Paul Eggert <eggert@cs.ucla.edu>.

13 years agoFix verb tense in ChangeLog message.
Ted Zlatanov [Tue, 26 Apr 2011 12:49:53 +0000 (07:49 -0500)]
Fix verb tense in ChangeLog message.

13 years agoImplement debug-on-event
Daniel Colascione [Tue, 26 Apr 2011 11:26:05 +0000 (04:26 -0700)]
Implement debug-on-event

13 years agoImprove Windows quoting robustness
Daniel Colascione [Tue, 26 Apr 2011 10:44:03 +0000 (03:44 -0700)]
Improve Windows quoting robustness

13 years agoAdd bug numbers.
Paul Eggert [Tue, 26 Apr 2011 07:52:52 +0000 (00:52 -0700)]
Add bug numbers.

13 years ago* gnutls.c (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
Paul Eggert [Tue, 26 Apr 2011 07:35:23 +0000 (00:35 -0700)]
* gnutls.c (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.

13 years ago* gnutls.c: Remove unused local.
Paul Eggert [Tue, 26 Apr 2011 07:26:02 +0000 (00:26 -0700)]
* gnutls.c: Remove unused local.

13 years ago* gnutls.c (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
Paul Eggert [Tue, 26 Apr 2011 07:23:56 +0000 (00:23 -0700)]
* gnutls.c (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.

13 years ago* gnutls.c (emacs_gnutls_handle_error): Remove unused local.
Paul Eggert [Tue, 26 Apr 2011 07:20:51 +0000 (00:20 -0700)]
* gnutls.c (emacs_gnutls_handle_error): Remove unused local.

13 years ago* gnutls.c (emacs_gnutls_handshake): Don't return a garbage value.
Paul Eggert [Tue, 26 Apr 2011 07:12:16 +0000 (00:12 -0700)]
* gnutls.c (emacs_gnutls_handshake): Don't return a garbage value.

Expect the caller to check whether GNUTLS_STAGE_HANDSHAKE_CANDO <=
proc->gnutls_initstage, if the check is needed.  The check isn't
needed for one caller, Fgnutls_boot.
(emacs_gnutls_read): Do that check.  This is the other caller.

13 years agoMerge from mainline.
Paul Eggert [Tue, 26 Apr 2011 06:17:52 +0000 (23:17 -0700)]
Merge from mainline.

13 years ago* admin/notes/bzr: Small updates.
Glenn Morris [Tue, 26 Apr 2011 04:50:33 +0000 (21:50 -0700)]
* admin/notes/bzr: Small updates.

13 years ago* admin/notes/years: Small updates.
Glenn Morris [Tue, 26 Apr 2011 04:45:37 +0000 (21:45 -0700)]
* admin/notes/years: Small updates.

13 years agoCombine changelog entries.
Paul Eggert [Mon, 25 Apr 2011 21:50:24 +0000 (14:50 -0700)]
Combine changelog entries.

13 years ago* lisp.h (XVECTORLIKE_HEADER_SIZE): Remove. The only use is now expanded.
Paul Eggert [Mon, 25 Apr 2011 21:38:32 +0000 (14:38 -0700)]
* lisp.h (XVECTORLIKE_HEADER_SIZE): Remove.  The only use is now expanded.

13 years agoConvert some function definitions to standard C.
Dan Nicolaescu [Mon, 25 Apr 2011 21:36:06 +0000 (14:36 -0700)]
Convert some function definitions to standard C.

* src/alloc.c (check_sblock, check_string_bytes)
(check_string_free_list): Convert to standard C.

13 years ago* lisp.h: (XVECTOR_SIZE): Remove. All uses replaced with ASIZE.
Paul Eggert [Mon, 25 Apr 2011 21:34:39 +0000 (14:34 -0700)]
* lisp.h: (XVECTOR_SIZE): Remove.  All uses replaced with ASIZE.
(ASIZE): Now contains previous implementation of XVECTOR_SIZE
instead of invoking XVECTOR_SIZE.

13 years ago* lisp.h: Say "vectorlike header" rather than "vector header.
Paul Eggert [Mon, 25 Apr 2011 19:40:22 +0000 (12:40 -0700)]
* lisp.h: Say "vectorlike header" rather than "vector header.

(struct vectorlike_header): Rename from struct vector_header.
(XVECTORLIKE_HEADER_SIZE): Renamed from XVECTOR_HEADER_SIZE.
All uses changed.

13 years ago* lisp/emulation/cua-base.el (cua-selection-mode): Make it toggle again.
Stefan Monnier [Mon, 25 Apr 2011 18:17:17 +0000 (15:17 -0300)]
* lisp/emulation/cua-base.el (cua-selection-mode): Make it toggle again.

13 years ago* trampver.texi: Update release number.
Michael Albinus [Mon, 25 Apr 2011 18:14:38 +0000 (20:14 +0200)]
* trampver.texi: Update release number.

13 years ago* net/tramp.el (tramp-process-actions): Add POS argument. Delete
Michael Albinus [Mon, 25 Apr 2011 18:10:17 +0000 (20:10 +0200)]
* net/tramp.el (tramp-process-actions): Add POS argument.  Delete
region between POS and (pos).

* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use
`nil' position in `tramp-process-actions' call.
(tramp-maybe-open-connection): Call `tramp-process-actions' with pos.

* net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `nil'
position in `tramp-process-actions' call.

* net/trampver.el: Update release number.

13 years ago* lisp/custom.el (defcustom): Obey lexical-binding.
Stefan Monnier [Mon, 25 Apr 2011 16:52:51 +0000 (13:52 -0300)]
* lisp/custom.el (defcustom): Obey lexical-binding.

13 years agoFix octave-inf completion problems reported by Alexander Klimov.
Stefan Monnier [Mon, 25 Apr 2011 16:29:31 +0000 (13:29 -0300)]
Fix octave-inf completion problems reported by Alexander Klimov.
* lisp/progmodes/octave-inf.el (inferior-octave-mode-syntax-table):
Inherit from octave-mode-syntax-table.
(inferior-octave-mode): Set info-lookup-mode.
(inferior-octave-completion-at-point): New function.
(inferior-octave-complete): Use it and completion-in-region.
(inferior-octave-dynamic-complete-functions): Use it as well, and use
comint-filename-completion.
* lisp/progmodes/octave-mod.el (octave-mode-syntax-table): Use _ syntax for
symbol elements which shouldn't be word elements.
(octave-font-lock-keywords, octave-beginning-of-defun)
(octave-function-header-regexp): Adjust regexps accordingly.
(octave-mode-map): Also use info-lookup-symbol for C-c C-h.

13 years agolisp/net/gnutls.el (gnutls-errorp): Declare before first use.
Juanma Barranquero [Mon, 25 Apr 2011 13:47:23 +0000 (15:47 +0200)]
lisp/net/gnutls.el (gnutls-errorp): Declare before first use.

13 years agoFix typo in GnuTLS W32 support.
Ted Zlatanov [Mon, 25 Apr 2011 12:48:24 +0000 (07:48 -0500)]
Fix typo in GnuTLS W32 support.

* w32.c (emacs_gnutls_push): Fix typo.

13 years agoAvoid compilation warnings in gnutls.c on 64-bit hosts.
Eli Zaretskii [Mon, 25 Apr 2011 10:42:57 +0000 (13:42 +0300)]
Avoid compilation warnings in gnutls.c on 64-bit hosts.

 src/gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
 "cast to pointer from integer of different size".

13 years agoAuto-commit of generated files.
Glenn Morris [Mon, 25 Apr 2011 10:18:22 +0000 (06:18 -0400)]
Auto-commit of generated files.

13 years agoImprove doprnt and its use in verror. (Bug#8545)
Eli Zaretskii [Mon, 25 Apr 2011 08:04:22 +0000 (11:04 +0300)]
Improve doprnt and its use in verror.  (Bug#8545)

 src/doprnt.c (doprnt): Document the set of format control sequences
 supported by the function.  Use SAFE_ALLOCA instead of always
 using `alloca'.
 src/eval.c (verror): Don't limit the buffer size at size_max-1, that
 is one byte too soon.  Don't use xrealloc; instead xfree and
 xmalloc anew.

13 years agoFix minor typos in previous change.
Paul Eggert [Mon, 25 Apr 2011 07:33:57 +0000 (00:33 -0700)]
Fix minor typos in previous change.

13 years agolisp.h: Fix a problem with aliasing and vector headers.
Paul Eggert [Mon, 25 Apr 2011 07:14:46 +0000 (00:14 -0700)]
lisp.h: Fix a problem with aliasing and vector headers.

GCC 4.6.0 optimizes based on type-based alias analysis.  For
example, if b is of type struct buffer * and v of type struct
Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
!= &v->size, and therefore "v->size = 1; b->size = 2; return
v->size;" must therefore return 1.  This assumption is incorrect
for Emacs, since it type-puns struct Lisp_Vector * with many other
types.  To fix this problem, this patch adds a new type struct
vector_header that documents the constraints on layout of vectors
and pseudovectors, and helps optimizing compilers not get fooled
by Emacs's type punning.  It also adds the macros XSETTYPED_PVECTYPE
XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
* lisp.h (XVECTOR_SIZE): New convenience macro.  All previous uses of
XVECTOR (foo)->size replaced to use this macro, to avoid the hassle
of writing XVECTOR (foo)->header.size.
(XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR.
(XSETTYPED_PVECTYPE): New macro, specifying the name of the size
member.
(XSETPVECTYPE): Rewrite in terms of new macro.
(XSETPVECTYPESIZE): New macro, specifying both type and size.
This is a bit clearer, and further avoids the possibility of
undesirable aliasing.
(XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
(XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR
and XVECTOR_HEADER_SIZE.
(XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
since Lisp_Subr is a special case (no "next" field).
(ASIZE): Rewrite in terms of XVECTOR_SIZE.
(struct vector_header): New type.
(TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
object, to help avoid aliasing.
(PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
(SUBRP): Likewise, since Lisp_Subr is a special case.
* lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
(struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
(struct Lisp_Hash_Table): Combine first two members into a single
struct vector_header member.  All uses of "size" and "next" members
changed to be "header.size" and "header.next".
* buffer.h (struct buffer): Likewise.
* font.h (struct font_spec, struct font_entity, struct font): Likewise.
* frame.h (struct frame): Likewise.
* process.h (struct Lisp_Process): Likewise.
* termhooks.h (struct terminal): Likewise.
* window.c (struct save_window_data, struct saved_window): Likewise.
* window.h (struct window): Likewise.
* alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
* buffer.c (init_buffer_once): Likewise.
* lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
special case.
* process.c (Fformat_network_address): Use local var for size,
for brevity.

13 years agognus-registry.el (gnus-registry-ignore-group-p): Don't call `gnus-parameter-registry...
Teodor Zlatanov [Mon, 25 Apr 2011 04:32:07 +0000 (04:32 +0000)]
gnus-registry.el (gnus-registry-ignore-group-p): Don't call `gnus-parameter-registry-ignore' if the *Group* buffer doesn't exist.

13 years agoBug fixes and certificate and hostname verification for the Emacs GnuTLS support.
Ted Zlatanov [Mon, 25 Apr 2011 01:31:45 +0000 (20:31 -0500)]
Bug fixes and certificate and hostname verification for the Emacs GnuTLS support.

* lisp/net/gnutls.el (gnutls-negotiate): Add hostname, verify-flags,
verify-error, and verify-hostname-error parameters.  Check whether
default trustfile exists before going to use it. Add missing
argument to gnutls-message-maybe call. Return return value.
Reported by Claudio Bley <claudio.bley@gmail.com>.
(open-gnutls-stream): Add usage example.

* lisp/net/network-stream.el (network-stream-open-starttls): Give host
parameter to `gnutls-negotiate'.
(gnutls-negotiate): Adjust `gnutls-negotiate' declaration.

13 years agoAdd GnuTLS support for W32 and certificate and hostname verification in GnuTLS.
Ted Zlatanov [Mon, 25 Apr 2011 01:30:51 +0000 (20:30 -0500)]
Add GnuTLS support for W32 and certificate and hostname verification in GnuTLS.

* src/gnutls.c: Renamed global_initialized to
gnutls_global_initialized.  Added internals for the
:verify-hostname-error, :verify-error, and :verify-flags
parameters of `gnutls-boot' and documented those parameters in the
docstring.  Start callback support.
(emacs_gnutls_handshake): Add Woe32 support. Retry handshake
unless a fatal error occured. Call gnutls_alert_send_appropriate
on error. Return error code.
(emacs_gnutls_write): Call emacs_gnutls_handle_error.
(emacs_gnutls_read): Likewise.
(Fgnutls_boot): Return handshake error code.
(emacs_gnutls_handle_error): New function.
(wsaerror_to_errno): Likewise.

* src/gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
callbacks stage.

* src/w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
(emacs_gnutls_push): Likewise.

* src/w32.h (emacs_gnutls_pull): Add prototype.
(emacs_gnutls_push): Likewise.

13 years agoAdd certificate verify callback check for GnuTLS.
Ted Zlatanov [Mon, 25 Apr 2011 01:30:05 +0000 (20:30 -0500)]
Add certificate verify callback check for GnuTLS.

* configure.in: Check for GnuTLS certificate verify callbacks.

13 years agoAdd GnuTLS support for W32.
Ted Zlatanov [Mon, 25 Apr 2011 01:29:31 +0000 (20:29 -0500)]
Add GnuTLS support for W32.

* nt/configure.bat: New options --without-gnutls and --lib, new build
variable USER_LIBS, automatically detect GnuTLS.  Copies the PNG
library setup with trivial modifications.
* nt/INSTALL: Add instructions for GnuTLS support.
* nt/gmake.defs: Prefix USER_LIBS with -l.

13 years agoAdd GnuTLS support for W32.
Ted Zlatanov [Mon, 25 Apr 2011 01:28:55 +0000 (20:28 -0500)]
Add GnuTLS support for W32.

* lib-src/makefile.w32-in (obj): Added gnutls.o.

13 years ago* progmodes/cc-engine.el (c-forward-decl-or-cast-1): Use
Daniel Colascione [Mon, 25 Apr 2011 00:31:41 +0000 (17:31 -0700)]
* progmodes/cc-engine.el (c-forward-decl-or-cast-1): Use
correct match group (bug#8438).

13 years agoshr.el (shr-tag-sup, shr-tag-sub): New functions.
Lars Magne Ingebrigtsen [Sun, 24 Apr 2011 22:12:21 +0000 (22:12 +0000)]
shr.el (shr-tag-sup, shr-tag-sub): New functions.

13 years agoRestore ability to show a restricted list of packages in Package Menu.
Chong Yidong [Sun, 24 Apr 2011 20:32:23 +0000 (16:32 -0400)]
Restore ability to show a restricted list of packages in Package Menu.

* emacs-lisp/package.el (package-built-in-p): Fix typo.
(package-menu--generate): New arg specifying packages to show.
(package-menu-refresh, package-menu-execute, list-packages):
Callers changed.
(package-show-package-list): New function.

* finder.el (finder-list-matches): Use package-show-package-list
instead of deleted package--list-packages.

13 years agoAdd vc-annotate-goto-line.
Chong Yidong [Sun, 24 Apr 2011 19:37:47 +0000 (15:37 -0400)]
Add vc-annotate-goto-line.
* vc/vc-annotate.el (vc-annotate-goto-line): New command.  Based
on a previous implementation by Juanma Barranquero (Bug#8366).
(vc-annotate-mode-map): Bind it to RET.

13 years agoFix next-file command in etags.el.
Uday S Reddy [Sun, 24 Apr 2011 18:47:17 +0000 (14:47 -0400)]
Fix next-file command in etags.el.

* lisp/progmodes/etags.el (next-file): Don't use set-buffer to change
buffers (Bug#8478).

* doc/lisp/maintaining.texi (List Tags): Document next-file.

13 years agoRevert undocumented change to .dir-locals.el in 2011-04-01T17:19:52Z!monnier@iro...
Chong Yidong [Sun, 24 Apr 2011 18:34:57 +0000 (14:34 -0400)]
Revert undocumented change to .dir-locals.el in 2011-04-01T17:19:52Z!monnier@iro.umontreal.ca.

This bumped fill-column from 70 to 79, but was not documented in the
commit log, and appears to be a mistake.

13 years agoMinor cleanup in src/xdisp.c.
Eli Zaretskii [Sun, 24 Apr 2011 16:59:37 +0000 (19:59 +0300)]
Minor cleanup in src/xdisp.c.

 src/xdisp.c (handle_single_display_spec): Rename the
 display_replaced_before_p argument into display_replaced_p, to
 make it consistent with the commentary.  Fix typos in the
 commentary.

13 years agoMinor cleanup in src/textprop.c.
Eli Zaretskii [Sun, 24 Apr 2011 16:28:57 +0000 (19:28 +0300)]
Minor cleanup in src/textprop.c.

 src/textprop.c (syms_of_textprop): Remove dead code.
 (copy_text_properties): Delete obsolete commentary about an
 interface that was deleted long ago.  Fix typos in the description
 of arguments.

13 years agoRepair the MSDOS build following latest changes.
Eli Zaretskii [Sun, 24 Apr 2011 12:48:30 +0000 (15:48 +0300)]
Repair the MSDOS build following latest changes.

 msdos/sedlibmk.inp (am_libgnu_a_OBJECTS): Edit out
 allocator.$(OBJEXT).  Add editing for the new GNULIB_* and
 REPLACE_* variables.
 src/msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
 to changes in oldXMenu/XMenu.h from 2011-04-16.
 <menu_help_message, prev_menu_help_message>: Constify.
 (IT_menu_make_room): menu->help_text is now `const char **';
 adjust.
 src/msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
 to changes in oldXMenu/XMenu.h from 2011-04-16.
 (struct XMenu): Declare `help_text' `const char **'.
 src/xfaces.c <Qunspecified>: Make extern again.
 src/syntax.c: Include sys/types.h before including regex.h, as
 required by Posix.