Stefan Monnier [Wed, 24 Oct 2012 03:18:32 +0000 (23:18 -0400)]
* lisp/minibuffer.el (completion--all-sorted-completions-location): New var.
(completion--cache-all-sorted-completions)
(completion--flush-all-sorted-completions): Use it.
(completion-in-region, completion-in-region--postch)
(completion-at-point, completion-help-at-point): Use markers in
completion-in-region--data.
Michael Albinus [Tue, 23 Oct 2012 14:26:30 +0000 (16:26 +0200)]
* net/tramp-smb.el (tramp-smb-maybe-open-connection): Set
`tramp-chunksize' to 1. This improves the performance.
(tramp-smb-wait-for-output): Add timeout to
`tramp-accept-process-output' calls.
Paul Eggert [Tue, 23 Oct 2012 07:57:42 +0000 (00:57 -0700)]
Fix outdated timestamp documentation in Elisp manual.
* doc/lispref/files.texi (File Attributes):
* doc/lispref/text.texi (Undo):
Time stamp resolution is now 1 picosecond, not 1 second.
* etc/NEWS: Document increased precision in undo list.
Glenn Morris [Tue, 23 Oct 2012 07:43:39 +0000 (00:43 -0700)]
Start updating cl.texi for cl-lib changes
* doc/misc/cl.texi: Include emacsver.texi.
Use Emacs version number rather than unchanging cl.el version number.
End all menu descriptions with a period.
Do not use @dfn{CL} for every instance of "CL".
(Overview): Remove no-runtime caveat, and note about foo* names.
(Usage): Use cl-lib rather than cl.
(Organization, Naming Conventions): Update for cl-lib.el.
(Installation): Remove long-irrelevant node.
(Program Structure, Predicates, Control Structure):
Start updating for cl-lib namespace.
* doc/misc/Makefile.in ($(buildinfodir)/cl$(INFO_EXT), cl.dvi, cl.pdf):
Depend on emacsver.texi.
Stefan Monnier [Mon, 22 Oct 2012 12:43:54 +0000 (08:43 -0400)]
Rework the last delsel/electric fix.
* lisp/delsel.el (delete-selection-helper): Use a function instead of a hook.
(delete-selection-pre-hook): Use use-region-p.
(delete-selection-self-insert-function): Remove.
(self-insert-command): Obey self-insert-uses-region-functions.
(self-insert-iso): Revert to previous setting, since we don't actually
know what that command does.
(delete-selection-self-insert-hooks): Remove.
* lisp/electric.el (electric-pair-delete-selection-self-insert-function):
Rename to electric-pair-will-use-region, return a boolean.
(electric-pair-mode): Adjust accordingly. Don't require delsel.
Simon Law [Mon, 22 Oct 2012 03:15:44 +0000 (23:15 -0400)]
* lisp/delsel.el (delete-selection-helper): New function, extracted from
delete-selection-pre-hook.
(delete-selection-pre-hook): Use it.
(delete-selection-self-insert-function): New function.
(delete-selection-self-insert-hooks): New hook.
(self-insert-command, self-insert-iso): Use it.
* lisp/electric.el (electric-pair-syntax): New function, extracted from
electric-pair-post-self-insert-function.
(electric-pair-post-self-insert-function): Use it.
(electric-pair-delete-selection-self-insert-function): New function.
(electric-pair-mode): Require delsel and setup
delete-selection-self-insert-hooks.
Paul Eggert [Sat, 20 Oct 2012 21:30:51 +0000 (14:30 -0700)]
Port to OpenBSD 5.1.
* frame.c (Fmouse_position, Fmouse_pixel_position):
* xdisp.c (produce_stretch_glyph):
Declare local vars only when they're needed.
This is clearer and avoids a warning on OpenBSD about unused vars.
* frame.h (FRAME_WINDOW_P): Always evaluate its argument.
This is safer, and avoids OpenBSD warnings about unused vars.
* keyboard.c (record_menu_key): Remove unnecessary decl.
(poll_timer): Define only if POLL_FOR_INPUT is defined.
* unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
as our definition clashes with OpenBSD's.
* xfaces.c (load_face_colors, check_lface_attrs)
(get_lface_attributes_no_remap, get_lface_attributes)
(lface_fully_specified_p, x_supports_face_attributes_p)
(tty_supports_face_attributes_p, face_fontset, realize_face)
(realize_x_face, realize_tty_face):
Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
merely Lisp_Object *. This is more informative and avoids
a warning on OpenBSD about accessing beyond an object's size.
Eli Zaretskii [Sat, 20 Oct 2012 15:26:10 +0000 (17:26 +0200)]
Fix last changes in make-docfile.c.
lib-src/make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros.
(scan_lisp_file): Only pass a .el file if its basename matches a
known file in its entirety. Use IS_SLASH and DEF_ELISP_FILE.
Eli Zaretskii [Sat, 20 Oct 2012 10:01:19 +0000 (12:01 +0200)]
Fix bug #12395 with doc strings silently omitted from DOC on MS-Windows.
lib-src/make-docfile.c (scan_lisp_file): Barf if called with a .el file
other than one of a small list of supported un-compiled files.
lib-src/makefile.w32-in (lisp1, lisp2): Name .elc files wherever they
exist.
lisp/loadup.el: Update comment about uncompiled Lisp files.
Paul Eggert [Fri, 19 Oct 2012 16:52:02 +0000 (09:52 -0700)]
Use faccessat, not access, when checking file permissions.
* .bzrignore: Add lib/fcntl.h.
* configure.ac (euidaccess): Remove check; gnulib does this for us now.
(gl_FCNTL_O_FLAGS): Define a dummy version.
* lib/at-func.c, lib/euidaccess.c, lib/faccessat.c, lib/fcntl.in.h:
* lib/getgroups.c, lib/group-member.c, lib/root-uid.h:
* lib/xalloc-oversized.h, m4/euidaccess.m4, m4/faccessat.m4:
* m4/fcntl_h.m4, m4/getgroups.m4, m4/group-member.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Add faccessat.
(GNULIB_TOOL_FLAGS): Avoid at-internal, fchdir, malloc-posix,
openat-die, openat-h, save-cwd. Do not avoid fcntl-h.
Omit gnulib's m4/fcntl-o.m4.
* nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS): New symbols.
(access): Remove.
(faccessat): New macro.
* src/Makefile.in (LIB_EACCESS): New macro.
(LIBES): Use it.
* src/callproc.c (init_callproc):
* src/charset.c (init_charset):
* src/fileio.c (check_existing, check_executable):
* src/lread.c (openp, load_path_check):
* src/process.c (allocate_pty):
* src/xrdb.c (file_p):
Use faccessat, not access or euidaccess. Use symbolic names
instead of integers for the flags, as they're portable now.
* src/charset.c, src/xrdb.c: Include <fcntl.h>, for the new flags used.
* src/fileio.c (Ffile_readable_p):
Use faccessat, not stat + open + close.
(file_directory_p): New function, which uses 'stat' on most places
but 'access' (for efficiency) if WINDOWSNT.
* src/fileio.c (Ffile_directory_p, Fset_file_times):
* src/xrdb.c (file_p): Use file_directory_p.
* src/lisp.h (file_directory_p): New decl.
* src/lread.c (openp): When opening a file, use fstat rather than
stat, as that avoids a permissions race. When not opening a file,
use file_directory_p rather than stat.
* src/process.c, src/sysdep.c, src/term.c: All uses of '#ifdef O_NONBLOCK'
changed to '#if O_NONBLOCK', to accommodate gnulib O_* tyle.
* src/w32.c (sys_faccessat): Rename from sys_access and switch to
faccessat's API. All uses changed.
Eli Zaretskii [Fri, 19 Oct 2012 10:05:09 +0000 (12:05 +0200)]
Increase the value of BASE_PURESIZE to avoid pure space overflow.
src/puresize.h (BASE_PURESIZE): Bump the base value to 1700000. See
http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
for the reasons.
Stefan Monnier [Thu, 18 Oct 2012 15:37:57 +0000 (11:37 -0400)]
* lisp/emacs-lisp/advice.el: Clean up commentary a bit.
(ad-do-advised-functions, ad-with-originals): Use `declare'.
(byte-code-function-p): Never redefine.
Kenichi Handa [Wed, 17 Oct 2012 23:59:24 +0000 (08:59 +0900)]
international/mule.el (set-keyboard-coding-system): Recover input meta mode when the new coding system doesn not use 8-bit. Supply TERMINAL arg to set-input-meta-mode.
Eli Zaretskii [Wed, 17 Oct 2012 15:37:55 +0000 (17:37 +0200)]
Fix bug #12661 with w32 and cygw32 builds under --enable-check-lisp-object-type.
src/cygw32.c (Fcygwin_convert_path_to_windows)
(Fcygwin_convert_path_from_windows): Use EQ to compare 2
Lisp_Object values.
src/w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
to Lisp_Object.
When renaming a file with wdired move point with file and don't lose mark status (Bug#11795).
* wdired.el (wdired-old-marks): New variable.
(wdired-change-to-wdired-mode): Locally set wdired-old-marks.
(wdired-do-renames): Move point with renamed file and don't lose
mark status (Bug#11795).
Dmitry Antipov [Wed, 17 Oct 2012 04:58:15 +0000 (08:58 +0400)]
Do not verify indirection counters of killed buffers (Bug#12579).
* buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
* buffer.c (compact_buffer, set_buffer_internal_1): Use it.
Dmitry Antipov [Tue, 16 Oct 2012 07:56:44 +0000 (11:56 +0400)]
* alloc.c (Fmake_byte_code): Fix typo in comment.
* print.c (print_interval): Define as static to match prototype.
* indent.c (disptab_matches_widthtab, recompute_width_table):
Convert to eassert.
Stefan Monnier [Mon, 15 Oct 2012 16:49:57 +0000 (12:49 -0400)]
* lisp/erc/erc.el (erc-log): Make it into a defsubst.
(erc-with-server-buffer, define-erc-module, erc-with-buffer)
(erc-with-all-buffers-of-server): Use `declare'.
* lisp/erc/erc-backend.el (erc-log): Adjust autoload accordingly.
Martin Rudalics [Mon, 15 Oct 2012 09:03:56 +0000 (11:03 +0200)]
Fix Fwindow_end's handling of cached position (Bug#12600).
* window.c (Fwindow_end): Rewrite check whether cached position
can be used (Bug#12600).
(resize_frame_windows, grow_mini_window, shrink_mini_window):
Set windows_or_buffers_changed.
Chong Yidong [Mon, 15 Oct 2012 04:03:04 +0000 (12:03 +0800)]
More documentation fixes for changes to defun, defmacro, etc.
* doc/lispref/functions.texi (Anonymous Functions): Explicitly list the
docstring, declare, and interactive arguments to lambda.
(Defining Functions): Likewise for defun.
(Inline Functions): Likewise for defsubst.
(Declare Form): Tweak description.
* doc/lispref/macros.texi (Defining Macros): defmacro is now a macro.
Explicitly list the docstring and declare arguments.