Glenn Morris [Sun, 18 Nov 2012 01:52:36 +0000 (17:52 -0800)]
Merge from emacs-24; up to 2012-11-15T23:31:37Z!dancol@dancol.org
Glenn Morris [Sun, 18 Nov 2012 01:45:44 +0000 (17:45 -0800)]
NEWS tweak
Glenn Morris [Sun, 18 Nov 2012 01:43:32 +0000 (17:43 -0800)]
* lisp/image.el (insert-image, insert-sliced-image): Doc fix.
Glenn Morris [Sun, 18 Nov 2012 01:38:42 +0000 (17:38 -0800)]
Document eager macro expansion
* doc/lispref/loading.texi (How Programs Do Loading): Add eager macro expansion.
* doc/lispref/macros.texi (Expansion): Mention eager macro expansion.
* etc/NEWS: Related edit.
Juanma Barranquero [Sun, 18 Nov 2012 01:20:04 +0000 (02:20 +0100)]
Silence some warnings.
lisp/woman.el (woman-non-underline-faces): Use `set-face-underline'.
lisp/calc/calc.el (math-format-date-cache): Declare.
Juanma Barranquero [Sun, 18 Nov 2012 01:12:17 +0000 (02:12 +0100)]
src/w32proc.c (waitpid): Remove unused label get_result.
Juanma Barranquero [Sat, 17 Nov 2012 23:58:56 +0000 (00:58 +0100)]
nt/config.nt: Sync with autogen/config.in.
(HAVE_FPATHCONF): Remove.
Glenn Morris [Sat, 17 Nov 2012 23:29:29 +0000 (15:29 -0800)]
* minibuf.texi (Basic Completion): Mention completion-table-with-quoting
Glenn Morris [Sat, 17 Nov 2012 23:24:36 +0000 (15:24 -0800)]
Add some cindex entries for previous change
Juanma Barranquero [Sat, 17 Nov 2012 23:16:24 +0000 (00:16 +0100)]
lib-src/makefile.w32-in, src/makefile.w32-in: Update dependencies.
* lib-src/makefile.w32-in (SYSWAIT_H): New macro.
($(BLD)/movemail.$(O)): Update dependencies.
* src/makefile.w32-in (SYSWAIT_H): New macro.
($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
($(BLD)/sysdep.$(O)): Update dependencies.
Glenn Morris [Sat, 17 Nov 2012 22:45:24 +0000 (14:45 -0800)]
* minibuf.texi (Basic Completion): Mention misc completion-table funcs.
* etc/NEWS: Related edit.
Paul Eggert [Sat, 17 Nov 2012 22:12:47 +0000 (14:12 -0800)]
Assume POSIX 1003.1-1988 or later for fcntl.h.
* admin/CPP-DEFINES (O_RDONLY, O_RDWR, HAVE_FCNTL_H): Remove.
* admin/merge-gnulib (GNULIB_MODULES): Add fcntl-h.
* configure.ac: Do not check for fcntl.h.
* lib/gnulib.mk: Regenerate.
* lib-src/movemail.c, lib-src/update-game-score.c: Assume <fcntl.h> exists.
* nt/inc/sys/socket.h (O_NONBLOCK): Rename from O_NDELAY, since the
POSIX name for this flag is O_NONBLOCK. All uses changed.
* nt/inc/unistd.h (O_RDWR, O_NOCTTY): New macros. Like AT_FDCWD etc.
these really should be moved to a replacement <fcntl.h> if and
when that gets implemented. In the meantime, include <fcntl.h>
to make sure we don't override its definitions.
* src/callproc.c (relocate_fd): Assume F_DUPFD.
* src/emacs.c, src/term.c (O_RDWR): Remove.
* src/keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
O_NDELAY, since O_NONBLOCK is the standard name for this flag.
* src/nsterm.m: Assume <fcntl.h> exists.
* src/process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
(create_pty, Fmake_network_process, server_accept_connection)
(wait_reading_process_output, init_process_emacs):
Assume O_NONBLOCK.
(wait_reading_process_output): Put in a special case for WINDOWSNT
to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
It's not clear this is needed, but it's a more-conservative change.
(create_process): Assume FD_CLOEXEC.
(create_process, create_pty): Assume O_NOCTTY.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
(reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
Omit if not DOS_NT, since F_GETFL is not defined there.
(serial_open): Assume O_NONBLOCK and O_NOCTTY.
* src/term.c: Include <fcntl.h>, for flags like O_NOCTTY.
(O_NOCTTY): Remove.
(init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
lack it, since gnulib guarantees this.
* src/w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
Fixes: debbugs:12881
Paul Eggert [Sat, 17 Nov 2012 22:01:59 +0000 (16:01 -0600)]
Calc now uses the Gregorian calendar for all dates,
and uses January 1, 1 AD as its day number 1.
* doc/misc/calc.texi (Date Forms): Document this.
* lisp/calc/calc-forms.el (math-julian-date-beginning)
(math-julian-date-beginning-int): Implement this.
Juanma Barranquero [Sat, 17 Nov 2012 21:52:12 +0000 (22:52 +0100)]
lisp/*.el: Add missing declarations.
* descr-text.el (quail-find-key):
* dired.el (desktop-file-name):
* dirtrack.el (shell-prefixed-directory-name, shell-process-cd):
* generic-x.el (comint-mode, comint-exec):
* image-dired.el (widget-forward):
* info.el (speedbar-add-expansion-list, speedbar-center-buffer-smartly)
(speedbar-change-expand-button-char)
(speedbar-change-initial-expansion-list, speedbar-delete-subblock)
(speedbar-make-specialized-keymap, speedbar-make-tag-line):
* printing.el (easy-menu-add-item, easy-menu-remove-item)
(widget-field-action, widget-value-set):
* speedbar.el (imenu--make-index-alist):
* term.el (ring-empty-p, ring-ref, ring-insert-at-beginning)
(ring-length, ring-insert):
* vcursor.el (compare-windows-skip-whitespace):
* woman.el (dired-get-filename):
Declare functions.
* term/w32-win.el (cygwin-convert-path-from-windows): Fix declaration.
Jay Belanger [Sat, 17 Nov 2012 21:34:09 +0000 (15:34 -0600)]
* calc/calc-forms.el (calc-gregorian-switch): Declare.
Jay Belanger [Sat, 17 Nov 2012 21:30:43 +0000 (15:30 -0600)]
* calc/calc.el (calc-gregorian-switch): New variable.
* calc/calc-forms.el (math-day-in-year, math-dt-before-p)
(math-absolute-from-gregorian-dt, math-absolute-from-julian-dt)
(math-date-to-julian-dt, math-date-to-gregorian-dt): New functions.
(math-leap-year-p): Add option to distinguish between Julian
and Gregorian calendars.
(math-day-number): Use `math-day-in-year' to do the computations.
(math-absolute-from-dt): Rename from `math-absolute-from-date'.
Use `math-absolute-from-gregorian' and `math-absolute-from-julian'
to do the computations.
(math-date-to-dt): Use `math-date-to-julian-dt' and `math-date-to-gregorian-dt'
to do the computations.
(calcFunc-weekday, math-format-date-part): Use the new version of the DATE to
determine the weekday.
(calcFunc-newmonth, calcFunc-newyear): Use `calc-gregorian-switch' when necessary.
Eli Zaretskii [Sat, 17 Nov 2012 20:41:21 +0000 (22:41 +0200)]
Fix bug #12914 with drag-n-drop in native MS-Windows build.
lisp/term/w32-win.el (w32-handle-dropped-file): Use 'file://' only on
Cygwin; otherwise use 'file:'.
(cygwin-convert-path-from-windows): Declare, to avoid
byte-compiler warnings.
Glenn Morris [Sat, 17 Nov 2012 19:01:09 +0000 (11:01 -0800)]
Relocate NEWS entry to correct section
Eli Zaretskii [Sat, 17 Nov 2012 18:51:06 +0000 (20:51 +0200)]
Fix bug #12878 with compilation failure with Visual C++ 11.0.
src/w32select.c: Include w32common.h before w32term.h, so that
windows.h gets included before w32term.h uses some of its
features, see below.
src/w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]: New
typedefs.
(EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]: New
prototypes.
(EnumSystemLocales) [_MSC_VER]: Define if undefined.
Paul Eggert [Sat, 17 Nov 2012 18:30:16 +0000 (10:30 -0800)]
Update comment to match recent change.
Eli Zaretskii [Sat, 17 Nov 2012 16:52:48 +0000 (18:52 +0200)]
Fix MS-Windows emulation of 'faccessat' wrt directories.
src/w32.c (faccessat): Pretend that directories have the execute bit
set. Emacs expects that, e.g., in files.el:cd-absolute.
Eli Zaretskii [Sat, 17 Nov 2012 16:46:45 +0000 (18:46 +0200)]
Fix bug #12829 with aborts on MS-Windows when several child processes die.
nt/inc/sys/wait.h: New file, with prototype of waitpid and
definitions of macros it needs.
nt/inc/ms-w32.h (wait): Don't define, 'wait' is not used anymore.
(sys_wait): Remove prototype.
nt/config.nt (HAVE_SYS_WAIT_H): Define to 1.
src/w32proc.c (create_child): Don't clip the PID of the child
process to fit into an Emacs integer, as this is no longer a
restriction.
(waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
reaping only the process specified by PID argument, if that is
positive. Use PID instead of dead_child to know which process to
reap. Wait for the child to die only if WNOHANG is not in
OPTIONS.
(sys_select): Don't set dead_child.
src/sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
as it is no longer needed.
src/process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
no longer needed.
(record_child_status_change): Remove the setting of
record_at_most_one_child for the !WNOHANG case.
Jan Djärv [Sat, 17 Nov 2012 15:28:56 +0000 (16:28 +0100)]
* nsterm.m (hold_event): Set send_appdefined to YES.
(ns_select): Return at once if events are held (Bug#12834).
Paul Eggert [Sat, 17 Nov 2012 15:15:49 +0000 (07:15 -0800)]
Fix problems in ns port found by static checking.
* nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
(hold_event, setPosition:portion:whole:): Send SIGIO only to self,
not to process group.
(ns_select): Use emacs_write, not write, as that's more robust
in the presence of signals.
(fd_handler:): Check for read errors.
Glenn Morris [Sat, 17 Nov 2012 11:20:58 +0000 (06:20 -0500)]
Auto-commit of loaddefs files.
Glenn Morris [Sat, 17 Nov 2012 11:17:40 +0000 (06:17 -0500)]
Auto-commit of generated files.
Dani Moncayo [Sat, 17 Nov 2012 08:55:07 +0000 (10:55 +0200)]
Don't produce "barebin" zip file as part of MS-Windows distributions.
nt/zipdist.bat (ZIP_CHECK): Remove unused label. When invoking 7z
to check if it's installed, redirect standard output and standard
error to the null device.
(ZIP_DIST): Don't build the "barebin" distribution.
Leo Liu [Sat, 17 Nov 2012 07:45:52 +0000 (15:45 +0800)]
* minibuf.texi (Programmed Completion): Doc fix for metadata request.
Fixes: debbugs:12850
Chong Yidong [Sat, 17 Nov 2012 07:33:01 +0000 (15:33 +0800)]
* lisp/emacs-lisp/syntax.el (syntax-propertize-function): Doc fix.
Fixes: debbugs:12810
Andreas Politz [Sat, 17 Nov 2012 07:15:23 +0000 (15:15 +0800)]
Fix prefix arg handling in ibuffer marking commands.
* ibuffer.el (ibuffer-mark-forward, ibuffer-unmark-forward)
(ibuffer-unmark-backward, ibuffer-mark-interactive): Support plain
prefix and negative numeric prefix args.
Fixes: debbugs:12795
Chong Yidong [Sat, 17 Nov 2012 07:06:57 +0000 (15:06 +0800)]
Fix for vc-svn-merge-news.
* vc/vc-svn.el (vc-svn-merge-news): Properly parse the merge
response when the target file is in a subdirectory.
Fixes: debbugs:12757
Stephen Berman [Sat, 17 Nov 2012 07:00:35 +0000 (15:00 +0800)]
Fix for gamegrid-add-score-with-update-game-score-1.
* lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score-1):
Don't signal an error with a score that is too low to add to the list
of top scores.
Fixes: debbugs:12779
Chong Yidong [Sat, 17 Nov 2012 06:48:51 +0000 (14:48 +0800)]
* url-parse.el (url-path-and-query): Minor doc fix.
Chong Yidong [Sat, 17 Nov 2012 06:48:10 +0000 (14:48 +0800)]
* help-mode.el (help-xref-interned): End on point-min.
Fixes: debbugs:12737
Dani Moncayo [Sat, 17 Nov 2012 06:38:05 +0000 (14:38 +0800)]
* mark.texi (Disabled Transient Mark): Doc fixes.
Fixes: debbugs:12746
Chong Yidong [Sat, 17 Nov 2012 06:16:46 +0000 (14:16 +0800)]
* filecache.el (file-cache-add-file): Handle relative file name in the argument.
Fixes: debbugs:12694
Chong Yidong [Sat, 17 Nov 2012 06:09:49 +0000 (14:09 +0800)]
* filecache.el (file-cache-add-file-list): Doc fix.
Fixes: debbugs:12694
Glenn Morris [Sat, 17 Nov 2012 03:33:34 +0000 (19:33 -0800)]
* frames.texi (Display Action Functions): Mention pop-up-frame-parameters.
* etc/NEWS: Related markup.
Glenn Morris [Sat, 17 Nov 2012 02:29:58 +0000 (21:29 -0500)]
* display.texi (Temporary Displays): Document with-temp-buffer-window.
* etc/NEWS: Related edit.
Glenn Morris [Sat, 17 Nov 2012 02:03:58 +0000 (21:03 -0500)]
Reword previous with-temp-buffer-window doc fixes
* lisp/window.el (with-temp-buffer-window):
Reword the doc to be more similar to with-output-to-temp-buffer.
* lisp/subr.el (with-output-to-temp-buffer):
Add doc xref to with-temp-buffer-window.
Glenn Morris [Sat, 17 Nov 2012 01:33:26 +0000 (20:33 -0500)]
Document fit-frame-to-buffer
* doc/lispref/frames.texi (Size and Position): Add fit-frame-to-buffer command.
* doc/lispref/windows.texi (Resizing Windows): Add fit-frame-to-buffer option.
(Window Sizes): Add vindex for window-min-height, window-min-width.
* etc/NEWS: Related markup.
Glenn Morris [Sat, 17 Nov 2012 01:29:24 +0000 (20:29 -0500)]
Use set-face-underline rather than the alias set-face-underline-p
* lisp/woman.el (woman-non-underline-faces):
* lisp/emacs-lisp/cl-lib.el (face-underline-p):
Use set-face-underline rather than the alias set-face-underline-p.
Glenn Morris [Sat, 17 Nov 2012 01:26:24 +0000 (20:26 -0500)]
* lisp/window.el (with-temp-buffer-window): Doc fix.
Eli Zaretskii [Fri, 16 Nov 2012 18:54:42 +0000 (20:54 +0200)]
Fix bug #12908 with documentation of emacs_backtrace.txt on MS-Windows.
doc/emacs/trouble.texi (Crashing): Add information about MS-Windows and
the emacs_backtrace.txt file.
etc/NEWS: Mention emacs_backtrace.txt.
enami tsugutomo [Fri, 16 Nov 2012 18:41:00 +0000 (13:41 -0500)]
* src/unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64
Needed following 2012-10-20 change.
Fixes: debbugs:12902
Jürgen Hötzel [Fri, 16 Nov 2012 18:18:07 +0000 (13:18 -0500)]
* lisp/eshell/em-unix.el (eshell/mkdir): Handle "--parents".
Fixes: debbugs:12897
Stefan Monnier [Fri, 16 Nov 2012 18:02:39 +0000 (13:02 -0500)]
* lisp/emacs-lisp/advice.el (ad-make-advised-definition): Improve last fix.
Glenn Morris [Fri, 16 Nov 2012 17:20:23 +0000 (09:20 -0800)]
Merge from emacs-24; up to 2012-11-13T18:57:26Z!dgutov@yandex.ru
Stefan Monnier [Fri, 16 Nov 2012 15:59:40 +0000 (10:59 -0500)]
* lisp/emacs-lisp/cl-lib.el: Set more meaningful version number.
Paul Eggert [Fri, 16 Nov 2012 15:29:22 +0000 (07:29 -0800)]
Remove no-longer-used pty_max_bytes variable.
* configure.ac (fpathconf): Remove unnecessary check.
* admin/CPP-DEFINES (HAVE_FPATHCONF): Remove.
* src/process.c (pty_max_bytes): Remove; unused.
(send_process): Do not set it.
Glenn Morris [Fri, 16 Nov 2012 12:17:47 +0000 (07:17 -0500)]
Auto-commit of loaddefs files.
Martin Rudalics [Fri, 16 Nov 2012 10:29:48 +0000 (11:29 +0100)]
Fix some display-buffer related issues.
* window.el (enlarge-window, shrink-window): Don't mention return
value in doc-string (Bug#12896).
(window--display-buffer): Don't resize frames - it won't work
with all window managers and defeat pop-up-frame-alist.
(display-buffer-alist): In doc-string explain that CONDITION can
be a function and which arguments are passed to it (Bug#12854).
(display-buffer-assq-regexp): New argument ACTION. Handle lambda
expressions (Bug#12854).
(display-buffer): Pass ACTION argument to
display-buffer-assq-regexp.
* windows.texi (Choosing Window): Rewrite description of
display-buffer-alist (Bug#12167).
(Display Action Functions): Mention inhibit-switch-frame. Fix
description of display-buffer-below-selected. Reorder actions.
Add example (Bug#12848).
Jan Tatarik [Fri, 16 Nov 2012 09:44:35 +0000 (10:44 +0100)]
[Gnus] Don't score by headers when scoring by body
* gnus-score.el (gnus-score-body):
* gnus-logic.el (gnus-advanced-body): Don't score by headers when
scoring by body.
Glenn Morris [Fri, 16 Nov 2012 08:31:20 +0000 (00:31 -0800)]
Doc fixes related to fit-frame-to-buffer
* lisp/window.el (fit-frame-to-buffer-bottom-margin)
(fit-frame-to-buffer, fit-window-to-buffer): Doc fixes.
* etc/NEWS: Related edit.
Glenn Morris [Fri, 16 Nov 2012 08:00:15 +0000 (00:00 -0800)]
NEWS potential FIXME
Glenn Morris [Fri, 16 Nov 2012 07:43:24 +0000 (23:43 -0800)]
cl.texi flet clarification
* doc/misc/cl.texi (Function Bindings): Clarify that cl-flet is lexical.
(Obsolete Macros): Move example here from Function Bindings.
* etc/NEWS: Related edit.
Glenn Morris [Fri, 16 Nov 2012 02:44:02 +0000 (21:44 -0500)]
* lisp/faces.el (face-underline-p): Use face-attribute-specified-or.
Glenn Morris [Fri, 16 Nov 2012 02:40:54 +0000 (21:40 -0500)]
* src/editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
Daniel Colascione [Thu, 15 Nov 2012 23:31:37 +0000 (15:31 -0800)]
Merge from cygw32 branch
Daniel Colascione [Thu, 15 Nov 2012 23:28:27 +0000 (15:28 -0800)]
Use right url-handler for drag-and-dropped files under Windows
Juanma Barranquero [Thu, 15 Nov 2012 21:01:25 +0000 (22:01 +0100)]
lisp/emacs-lisp/cl-macs.el (cl-loop, cl-do, cl-do*): Doc fixes.
Stefan Monnier [Thu, 15 Nov 2012 18:35:05 +0000 (13:35 -0500)]
* lisp/emacs-lisp/cl-macs.el (cl-flet, cl-flet*): Fix docstring.
Fixes: debbugs:12895
Stefan Monnier [Thu, 15 Nov 2012 17:17:23 +0000 (12:17 -0500)]
* src/eval.c (Finteractive_p): Revert lexbind-merge mishap.
Juanma Barranquero [Thu, 15 Nov 2012 16:21:50 +0000 (17:21 +0100)]
src/makefile.w32-in: Update dependencies.
Juanma Barranquero [Thu, 15 Nov 2012 14:47:31 +0000 (15:47 +0100)]
nt/config.nt: Sync with autogen/config.in.
(GETGROUPS_T, GETGROUPS_ZERO_BUG, GNULIB_FACCESSAT, HAVE_ACCESS)
(HAVE_EACCESS, HAVE_FACCESSAT, HAVE_GETGROUPS, HAVE_LIBGEN_H):
New macros.
Stefan Monnier [Thu, 15 Nov 2012 14:20:45 +0000 (09:20 -0500)]
* doc/lispref/keymaps.texi (Translation Keymaps): Backport subsection
"Interaction with normal keymaps".
Fixes: debbugs:12868
Stefan Monnier [Thu, 15 Nov 2012 14:17:11 +0000 (09:17 -0500)]
* doc/lispref/keymaps.texi (Translation Keymaps): Add a subsection "Interaction
with normal keymaps" (bug#12868).
Glenn Morris [Thu, 15 Nov 2012 07:59:46 +0000 (23:59 -0800)]
* lisp/eshell/em-cmpl.el (eshell-pcomplete): New command.
(eshell-cmpl-initialize): Bind eshell-pcomplete to TAB, C-i.
Fixes: debbugs:12838
Glenn Morris [Thu, 15 Nov 2012 07:30:46 +0000 (23:30 -0800)]
Fixes related to face underlining
* lisp/faces.el (face-underline-p): Doc fix. Handle :underline being
things other than `t' (a string, a list).
(face-inverse-video-p): Doc fix.
(set-face-underline): Rename it back from set-face-underline-p.
Doc fix. Allow interactive input of values other than t.
(read-face-attribute): Apply formatting to :underline,
since like :box and :stipple it can take list values.
* doc/lispref/display.texi (Face Attributes): Fix :underline COLOR description.
(Attribute Functions): Update for set-face-underline rename.
Tweak descriptions of face-underline-p, face-inverse-video-p.
* etc/NEWS: Related edit.
Glenn Morris [Thu, 15 Nov 2012 06:17:56 +0000 (22:17 -0800)]
ansi-term escape-char fix
* lisp/term.el (ansi-term): Don't let C-x escape-char binding
clobber the more standard C-c binding.
Fixes: debbugs:12842
Glenn Morris [Thu, 15 Nov 2012 06:13:46 +0000 (22:13 -0800)]
* display.texi (Face Attributes): Fix :underline COLOR description.
Glenn Morris [Thu, 15 Nov 2012 06:12:46 +0000 (22:12 -0800)]
* subr.el (set-temporary-overlay-map): Fix previous doc fix (don't quote `t')
Dmitry Antipov [Thu, 15 Nov 2012 05:25:05 +0000 (09:25 +0400)]
* internals.texi (Garbage Collection): Update descriptions
of vectorlike_header, garbage-collect and gc-cons-threshold.
(Object Internals): Explain Lisp_Object layout and the basics
of an internal type system.
(Buffer Internals): Update description of struct buffer.
Stefan Monnier [Thu, 15 Nov 2012 04:42:14 +0000 (23:42 -0500)]
* lisp/emacs-lisp/advice.el (ad-definition-type): Make sure we don't use
a preactivated advice from an old advice.el; they're not compatible!
Katsumi Yamaoka [Thu, 15 Nov 2012 03:30:25 +0000 (22:30 -0500)]
* lisp/emacs-lisp/advice.el (ad-make-advised-definition): Fix undefined case.
* lisp/emacs-lisp/nadvice.el (advice--make-interactive-form):
Fix string-spec case.
Stefan Monnier [Thu, 15 Nov 2012 03:20:49 +0000 (22:20 -0500)]
* lisp/emacs-lisp/nadvice.el: Add buffer-local support to add-function.
(advice--buffer-local-function-sample): New var.
(advice--set-buffer-local, advice--buffer-local): New functions.
(add-function, remove-function): Use them.
Drew Adams [Thu, 15 Nov 2012 02:02:00 +0000 (21:02 -0500)]
* lisp/imenu.el (imenu--split-submenus): Use imenu--subalist-p.
Fixes: debbugs:12717
Stefan Monnier [Thu, 15 Nov 2012 01:27:52 +0000 (20:27 -0500)]
Backport fix for bug#12879 from trunk
* lisp/emacs-lisp/gv.el (setf): Fix debug spec for multiple assignments
Stefan Monnier [Thu, 15 Nov 2012 01:26:52 +0000 (20:26 -0500)]
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Defend against
potential binding of print-gensym to t, and prettify (back)quotes in
case they appear in args's default values.
Fixes: debbugs:12884
Paul Eggert [Thu, 15 Nov 2012 00:41:32 +0000 (16:41 -0800)]
* eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
This follows up on the 2012-09-29 patch that removed indirection
for the 'function' field. Reported by Sergey Vinokurov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
Stefan Monnier [Wed, 14 Nov 2012 20:27:42 +0000 (15:27 -0500)]
* lisp/emacs-lisp/nadvice.el: Add around advice for interactive specs.
(advice-eval-interactive-spec): New function.
(advice--make-interactive-form): Support around advice.
Fixes: debbugs:12844
David Engster [Wed, 14 Nov 2012 20:20:20 +0000 (21:20 +0100)]
Merge bug fixes from CEDET upstream.
* semantic/symref/list.el (semantic-symref-symbol): Use
`semantic-complete-read-tag-project' instead of
`semantic-complete-read-tag-buffer-deep', since the latter is not
working correctly.
* semantic/symref.el (semantic-symref-result-get-tags): Use
`find-buffer-visiting' to follow symbolic links.
* semantic/fw.el (semantic-find-file-noselect): Always set
`enable-local-variables' to `:safe' when loading files.
Eli Zaretskii [Wed, 14 Nov 2012 17:22:55 +0000 (19:22 +0200)]
MS-Windows followup for 2012-11-14T04:55:41Z!eggert@cs.ucla.edu, regarding faccessat.
nt/inc/unistd.h (faccessat): Add prototype.
(AT_FDCWD, AT_EACCESS, AT_SYMLINK_NOFOLLOW): New macros; the first
2 moved from ms-w32.h.
nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS, faccessat): Remove macros.
src/w32.c (faccessat): Rename from sys_faccessat. (No need to use a
different name, as the MS runtime does not have such a function,
and probably never will.) All callers changed. Ignore DIRFD
value if PATH is an absolute file name, to match Posix spec
better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
symlinks.
Fixes: debbugs:12632
Eli Zaretskii [Wed, 14 Nov 2012 16:41:43 +0000 (18:41 +0200)]
Clean up w32 timer thread code in the hope of solving bug #12832.
src/w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
use the same value of thread handle.
(start_timer_thread): If the timer thread exited (due to error),
clean up by closing the two handles it used. Duplicate the caller
thread's handle here, so it gets duplicated only once, when
launching the timer thread. Set priority of the timer thread, not
the caller thread.
(getitimer): Don't duplicate the caller thread's handle here.
Dmitry Gutov [Wed, 14 Nov 2012 12:17:21 +0000 (16:17 +0400)]
* lisp/progmodes/ruby-mode.el
(ruby-syntax-propertize-function): After everything else, search
for expansions in string literals, mark their insides as
whitespace syntax and save match data for font-lock.
(ruby-font-lock-keywords): Highlight just the 2nd group from
expression expansion matches.
(ruby-match-expression-expansion): Use the match data saved to the
text property in ruby-syntax-propertize-function.
* test/automated/ruby-mode-tests.el
Change direct font-lock face references to var references.
(ruby-interpolation-suppresses-syntax-inside): New test.
(ruby-interpolation-inside-percent-literal-with-paren): New
failing test.
Glenn Morris [Wed, 14 Nov 2012 11:17:36 +0000 (06:17 -0500)]
Auto-commit of generated files.
Dmitry Antipov [Wed, 14 Nov 2012 11:13:33 +0000 (15:13 +0400)]
* xdisp.c (echo_area_display, redisplay_internal):
Omit redundant check whether frame_garbaged is set.
Glenn Morris [Wed, 14 Nov 2012 08:45:50 +0000 (00:45 -0800)]
Document set-temporary-overlay-map
* doc/lispref/keymaps.texi (Active Keymaps, Searching Keymaps)
(Controlling Active Maps): Document set-temporary-overlay-map.
* etc/NEWS: Related markup.
Glenn Morris [Wed, 14 Nov 2012 08:29:25 +0000 (00:29 -0800)]
* lisp/subr.el (set-temporary-overlay-map): Doc fix.
* etc/NEWS: Related edit.
Glenn Morris [Wed, 14 Nov 2012 08:18:12 +0000 (00:18 -0800)]
* doc/lispref/keymaps.texi (Searching Keymaps, Tool Bar): Untabify examples
so they align better in info.
Dmitry Gutov [Wed, 14 Nov 2012 06:34:17 +0000 (10:34 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-expr-beg): Make heredoc detection
more strict. Add docstring.
* test/automated/ruby-mode-tests.el (ruby-indent-singleton-class): Pass.
(ruby-indent-inside-heredoc-after-operator)
(ruby-indent-inside-heredoc-after-space): New tests.
Paul Eggert [Wed, 14 Nov 2012 05:29:54 +0000 (21:29 -0800)]
Use trunk version of gnulib lib/fcntl.in.h.
This corrects a recent checkin, which used an experimental
version of this file by mistake. Stick with the standard version.
Paul Eggert [Wed, 14 Nov 2012 05:07:33 +0000 (21:07 -0800)]
Spelling fixes.
Paul Eggert [Wed, 14 Nov 2012 04:55:41 +0000 (20:55 -0800)]
Use faccessat, not access, when checking file permissions.
This fixes a bug that has been present in Emacs since its creation.
It was reported by Chris Torek in 1983 even before GNU Emacs existed,
which must set some sort of record. (Torek's bug report was against
a predecessor of GNU Emacs, but GNU Emacs happened to have the
same common flaw.) See Torek's Usenet posting
"setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
Posted: Fri Apr 8 14:18:56 1983.
* .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, check_writable)
(Ffile_readable_p):
* src/lread.c (openp, load_path_check):
* src/process.c (allocate_pty):
* src/xrdb.c (file_p):
Use effective UID when checking permissions, not real UID.
* src/callproc.c (init_callproc):
* src/charset.c (init_charset):
* src/lread.c (load_path_check, init_lread):
Test whether directories are accessible, not merely whether they exist.
* src/conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
* src/fileio.c (check_existing, check_executable, check_writable)
(Ffile_readable_p):
Use symbolic names instead of integers for the flags, as they're
portable now.
(check_writable): New arg AMODE. All uses changed.
Set errno on failure.
(Ffile_readable_p): Use faccessat, not stat + open + close.
(Ffile_writable_p): No need to call check_existing + check_writable.
Just call check_writable and then look at errno. This saves a syscall.
dir should never be nil; replace an unnecessary runtime check
with an eassert. When checking the parent directory of a nonexistent
file, check that the directory is searchable as well as writable, as
we can't create files in unsearchable directories.
(file_directory_p): New function, which uses 'stat' on most platforms
but faccessat with D_OK (for efficiency) if WINDOWSNT.
(Ffile_directory_p, Fset_file_times): Use it.
(file_accessible_directory_p): New function, which uses a single
syscall for efficiency.
(Ffile_accessible_directory_p): Use it.
* src/xrdb.c (file_p): Use file_directory_p.
* src/lisp.h (file_directory_p, file_accessible_directory_p): New decls.
* 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.
(dir_warning): First arg is now a usage string, not a format.
Use errno. All uses changed.
* src/nsterm.m (ns_term_init): Remove unnecessary call to file-readable
that merely introduced a race.
* src/process.c, src/sysdep.c, src/term.c: All uses of '#ifdef O_NONBLOCK'
changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
and similarly for the other O_* flags.
* src/w32.c (sys_faccessat): Rename from sys_access and switch to
faccessat's API. All uses changed.
* src/xrdb.c: Do not include <sys/stat.h>; no longer needed.
(magic_db): Rename from magic_file_p.
(magic_db, search_magic_path): Return an XrmDatabase rather than a
char *, so that we don't have to test for file existence
separately from opening the file for reading. This removes a race
fixes a permission-checking problem, and simplifies the code.
All uses changed.
(file_p): Remove; no longer needed.
Fixes: debbugs:12632
Stefan Monnier [Wed, 14 Nov 2012 01:12:52 +0000 (20:12 -0500)]
* lisp/emacs-lisp/gv.el (setf): Fix debug spec for multiple assignments.
Fixes: debbugs:12879
Dmitry Gutov [Tue, 13 Nov 2012 18:57:26 +0000 (22:57 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-move-to-block): Looks for a block
start/end keyword a bit harder. Works with different values of N.
Add more comments.
(ruby-end-of-block): Update accordingly.
* test/automated/ruby-mode-tests.el (ruby-heredoc-font-lock)
(ruby-singleton-class-no-heredoc-font-lock)
(ruby-add-log-current-method-examples): New tests.
(ruby-test-string): Extract from ruby-should-indent-buffer.
(ruby-deftest-move-to-block): New macro.
Add several move-to-block tests.
Tsuyoshi Kitamoto [Tue, 13 Nov 2012 18:09:20 +0000 (13:09 -0500)]
* emacs-lisp/advice.el: Fix typos in comment.
Stefan Monnier [Tue, 13 Nov 2012 16:59:34 +0000 (11:59 -0500)]
* lisp/woman.el (woman-file-name): Don't mess with unread-command-events.
Fixes: debbugs:12861
Stefan Monnier [Tue, 13 Nov 2012 14:12:46 +0000 (09:12 -0500)]
* lisp/emacs-lisp/advice.el: Layer on top of nadvice.el.
Remove out of date self-require hack.
(ad-do-advised-functions): Use simple `dolist'.
(ad-advice-name, ad-advice-protected, ad-advice-enabled)
(ad-advice-definition): Redefine as functions.
(ad-advice-classes): Move before first use.
(ad-make-origname, ad-set-orig-definition, ad-clear-orig-definition)
(ad-make-mapped-call, ad-make-advised-docstring, ad-make-plain-docstring)
(ad--defalias-fset): Remove functions.
(ad-make-advicefunname, ad-clear-advicefunname-definition): New functions.
(ad-get-orig-definition): Rewrite.
(ad-make-advised-definition-docstring): Change base docstring.
(ad-real-orig-definition): Rewrite.
(ad-map-arglists): Change name of called function.
(ad--make-advised-docstring): Redirect `function' from ad-Advice-...
(ad-make-advised-definition): Simplify.
(ad-assemble-advised-definition): Tweak for new calling context.
(ad-activate-advised-definition): Setup ad-Advice-* instead of ad-Orig-*.
(ad--defalias-fset): Rename from ad-handle-definition. Make it set the
function and call ad-activate if needed.
(ad-activate, ad-deactivate): Don't call ad-handle-definition any more.
(ad-recover): Clear ad-Advice-* instead of ad-Orig-*.
(ad-compile-function): Compile ad-Advice-*.
(ad-activate-on-top-level, ad-with-auto-activation-disabled): Remove.
(ad-start-advice, ad-stop-advice): Remove.
Eli Zaretskii [Tue, 13 Nov 2012 13:50:58 +0000 (15:50 +0200)]
Fix a typo in src/ChangeLog.