bpt/emacs.git
11 years ago* lisp/emacs-lisp/nadvice.el: Add buffer-local support to add-function.
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.

11 years ago* lisp/imenu.el (imenu--split-submenus): Use imenu--subalist-p.
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

11 years ago* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Defend against
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

11 years ago* eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
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>.

11 years ago* lisp/emacs-lisp/nadvice.el: Add around advice for interactive specs.
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

11 years agoMS-Windows followup for 2012-11-14T04:55:41Z!eggert@cs.ucla.edu, regarding faccessat.
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

11 years ago* lisp/progmodes/ruby-mode.el
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.

11 years agoAuto-commit of generated files.
Glenn Morris [Wed, 14 Nov 2012 11:17:36 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years ago* xdisp.c (echo_area_display, redisplay_internal):
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.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-expr-beg): Make heredoc detection
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.

11 years agoUse trunk version of gnulib lib/fcntl.in.h.
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.

11 years agoSpelling fixes.
Paul Eggert [Wed, 14 Nov 2012 05:07:33 +0000 (21:07 -0800)]
Spelling fixes.

11 years agoUse faccessat, not access, when checking file permissions.
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

11 years ago* lisp/emacs-lisp/gv.el (setf): Fix debug spec for multiple assignments.
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

11 years ago* lisp/progmodes/ruby-mode.el (ruby-move-to-block): Looks for a block
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.

11 years ago* emacs-lisp/advice.el: Fix typos in comment.
Tsuyoshi Kitamoto [Tue, 13 Nov 2012 18:09:20 +0000 (13:09 -0500)]
* emacs-lisp/advice.el: Fix typos in comment.

11 years ago* lisp/woman.el (woman-file-name): Don't mess with unread-command-events.
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

11 years ago* lisp/emacs-lisp/advice.el: Layer on top of nadvice.el.
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.

11 years agoFix a typo in src/ChangeLog.
Eli Zaretskii [Tue, 13 Nov 2012 13:50:58 +0000 (15:50 +0200)]
Fix a typo in src/ChangeLog.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method): Print the
Dmitry Gutov [Tue, 13 Nov 2012 09:30:16 +0000 (13:30 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method): Print the
period before class method names, not after.  Remove handling of
one impossible case.  Add comments.

* test/automated/ruby-mode-tests.el
(ruby-add-log-current-method-examples): New test.
(ruby-test-string): Extract from ruby-should-indent-buffer.

11 years agoOmit glyphs initialization at startup.
Dmitry Antipov [Tue, 13 Nov 2012 06:11:40 +0000 (10:11 +0400)]
Omit glyphs initialization at startup.
* dispnew.c (glyphs_initialized_initially_p): Remove.
(adjust_frame_glyphs_initially): Likewise.  Adjust users.
(Fredraw_frame): Move actual code from here...
(redraw_here): ...to here.  Add eassert.  Adjust comment.
(Fredraw_display): Use redraw_frame.
* xdisp.c (clear_garbaged_frames): Likewise.

11 years ago* lisp/emacs-lisp/advice.el: Remove support for freezing.
Stefan Monnier [Tue, 13 Nov 2012 04:05:35 +0000 (23:05 -0500)]
* lisp/emacs-lisp/advice.el: Remove support for freezing.
(ad-make-freeze-docstring, ad-make-freeze-definition): Remove functions.
(ad-make-single-advice-docstring, ad-defadvice-flags, defadvice):
Remove support for `freeze'.

11 years agoMove SES NEWS entry here from emacs-24 and expand it
Glenn Morris [Tue, 13 Nov 2012 03:19:34 +0000 (19:19 -0800)]
Move SES NEWS entry here from emacs-24 and expand it
Cf emacs-24 2012-11-09T15:56:51Z!monnier@iro.umontreal.ca.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00221.html

11 years ago* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Never
Dmitry Gutov [Tue, 13 Nov 2012 03:07:09 +0000 (07:07 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Never
font-lock the beginning of singleton class as heredoc.

* test/automated/ruby-mode-tests.el (ruby-heredoc-font-lock)
(ruby-singleton-class-no-heredoc-font-lock): New tests.

11 years ago* lisp/emacs-lisp/cl.el (dolist, dotimes, declare): Use advice-add to
Stefan Monnier [Tue, 13 Nov 2012 03:00:09 +0000 (22:00 -0500)]
* lisp/emacs-lisp/cl.el (dolist, dotimes, declare): Use advice-add to
override the default.
* lisp/emacs-lisp/cl-macs.el (cl-dolist, cl-dotimes): Rewrite without using
cl--dotimes/dolist.
* lisp/subr.el (dolist, dotimes, declare): Redefine them normally, even when
`cl' is loaded.

* lisp/emacs-lisp/nadvice.el (advice--normalize): New function, extracted
from add-advice.
(advice--strip-macro): New function.
(advice--defalias-fset): Use them to handle macros.
(advice-add): Use them.
(advice-member-p): Correctly handle macros.

11 years agoMerge from emacs-24; up to 2012-11-09T14:45:15Z!dmantipov@yandex.ru
Glenn Morris [Tue, 13 Nov 2012 02:25:59 +0000 (18:25 -0800)]
Merge from emacs-24; up to 2012-11-09T14:45:15Z!dmantipov@yandex.ru

11 years agoFix a race with verify-visited-file-modtime.
Paul Eggert [Tue, 13 Nov 2012 01:35:14 +0000 (17:35 -0800)]
Fix a race with verify-visited-file-modtime.

Since at least 1991 Emacs has ignored an mtime difference of no
more than one second, but my guess is that this was to work around
file system bugs that were fixed long ago.  Since the race is
causing problems now, let's remove that code.
* fileio.c (Fverify_visited_file_modtime): Do not accept a file
whose time stamp is off by no more than a second.  Insist that the
file time stamps match exactly.

Fixes: debbugs:12863

11 years ago* lisp/emacs-lisp/gv.el (gv-define-simple-setter): One more fix.
Stefan Monnier [Mon, 12 Nov 2012 21:31:15 +0000 (16:31 -0500)]
* lisp/emacs-lisp/gv.el (gv-define-simple-setter): One more fix.

Fixes: debbugs:12871

11 years ago* lisp/emacs-lisp/nadvice.el: New package.
Stefan Monnier [Mon, 12 Nov 2012 20:43:43 +0000 (15:43 -0500)]
* lisp/emacs-lisp/nadvice.el: New package.
* lisp/subr.el (special-form-p): New function.
* lisp/emacs-lisp/elp.el: Use lexical-binding and advice-add.
(elp-all-instrumented-list): Remove var.
(elp-not-profilable): Remove elp-wrapper.
(elp-profilable-p): Use autoloadp and special-form-p.
(elp--advice-name): New const.
(elp-instrument-function): Use advice-add.
(elp--instrumented-p): New predicate.
(elp-restore-function): Use advice-remove.
(elp-restore-all, elp-reset-all): Use mapatoms.
(elp-set-master): Use elp--instrumented-p.
(elp--make-wrapper): Rename from elp-wrapper, return a function
suitable for advice-add.  Use cl-inf.
(elp-results): Use mapatoms+elp--instrumented-p.
* lisp/emacs-lisp/debug.el: Use lexical-binding and advice-add.
(debug-function-list): Remove var.
(debug): Rename arg, and then let-bind it explicitly inside.
(debugger-setup-buffer): Rename arg.
(debugger-setup-buffer): Adjust counts to new debug-on-entry setup.
(debugger-frame-number): Adjust to new debug-on-entry setup.
(debug--implement-debug-on-entry): Rename from
implement-debug-on-entry, add argument.
(debugger-special-form-p): Remove, use special-form-p instead.
(debug-on-entry): Use advice-add.
(debug--function-list): New function.
(cancel-debug-on-entry): Use it, along with advice-remove.
(debug-arglist, debug-convert-byte-code, debug-on-entry-1): Remove.
(debugger-list-functions): Use debug--function-list instead of
debug-function-list.
* lisp/emacs-lisp/advice.el (ad-save-real-definition): Remove, unused.
(ad-special-form-p): Remove, use special-form-p instead.
(ad-set-advice-info): Use add-function and remove-function.
(ad--defalias-fset): Adjust accordingly.
* test/automated/advice-tests.el: New tests.

11 years agoDoc fix for gdb-stopped-functions.
Chong Yidong [Mon, 12 Nov 2012 19:54:37 +0000 (03:54 +0800)]
Doc fix for gdb-stopped-functions.

* building.texi (Multithreaded Debugging): gdb-stopped-hooks is
actually named gdb-stopped-functions.

11 years agoNEWS updates for the ever-changing python.el
Glenn Morris [Mon, 12 Nov 2012 19:44:39 +0000 (14:44 -0500)]
NEWS updates for the ever-changing python.el

11 years agolisp/ansi-color.el (ansi-color-apply-sequence): Implement SGR codes 39 and 49.
Wolfgang Jenkner [Mon, 12 Nov 2012 17:12:33 +0000 (18:12 +0100)]
lisp/ansi-color.el (ansi-color-apply-sequence): Implement SGR codes 39 and 49.

This fixes bug#12792.  Also, treat unimplemented parameters as 0,
thereby restoring the behavior of revisions prior to 2012-08-15T03:33:55Z!monnier@iro.umontreal.ca.

11 years ago* lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode):
Stefan Monnier [Mon, 12 Nov 2012 16:50:08 +0000 (11:50 -0500)]
* lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode):
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode):
* lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode)
(semantic-show-parser-state-mode): Avoid obsolete name
semantic-edits-new-change-hooks.

Fixes: debbugs:12869

11 years ago* frame.h (struct frame): Convert external_tool_bar member to
Dmitry Antipov [Mon, 12 Nov 2012 16:02:46 +0000 (20:02 +0400)]
* frame.h (struct frame): Convert external_tool_bar member to
1-bit unsigned bitfield.
* termhooks.h (struct terminal): Remove mouse_moved member since
all users are long dead.  Adjust comment on mouse_position_hook.

11 years agoFix bug #12867 with crashes due to large field width in mode-line format.
Eli Zaretskii [Mon, 12 Nov 2012 15:25:34 +0000 (17:25 +0200)]
Fix bug #12867 with crashes due to large field width in mode-line format.

 src/xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
 passed to pint2str and pint2hrstr to be at most the size of the
 frame's decode_mode_spec_buffer.  This avoids crashes with very
 large values of FIELD_WIDTH argument to decode_mode_spec.

11 years agoFix end-of-defun misbehavior.
Fabián Ezequiel Gallina [Mon, 12 Nov 2012 13:26:50 +0000 (10:26 -0300)]
Fix end-of-defun misbehavior.
* progmodes/python.el (python-nav-beginning-of-defun): Rename from
python-beginning-of-defun-function.  Handle nested defuns
correctly.
(python-nav-end-of-defun): Rename from
python-end-of-defun-function.  Ensure forward movement.
(python-info-current-defun): Reimplemented to work as intended
with new fixed python-nav-{end,beginning}-of-defun.  Stop scanning
parent defuns as soon as possible.

11 years agoDocument flymake fringe bitmaps
Glenn Morris [Mon, 12 Nov 2012 08:42:27 +0000 (00:42 -0800)]
Document flymake fringe bitmaps

* doc/misc/flymake.texi (Customizable variables)
(Highlighting erroneous lines): Mention flymake-error-bitmap,
flymake-warning-bitmap, and flymake-fringe-indicator-position.

* lisp/progmodes/flymake.el (flymake-error-bitmap)
(flymake-warning-bitmap, flymake-fringe-indicator-position): Doc fixes.
(flymake-error-bitmap, flymake-warning-bitmap): Fix :types.

* etc/NEWS: Related markup.

11 years agoMention a few more gv.el features in the lispref
Glenn Morris [Mon, 12 Nov 2012 08:23:23 +0000 (00:23 -0800)]
Mention a few more gv.el features in the lispref

* doc/lispref/variables.texi (Adding Generalized Variables):
At least mention gv-define-expander and gv-letplace.

11 years ago* doc/emacs/misc.texi (Single Shell): Mention async-shell-command-buffer.
Glenn Morris [Mon, 12 Nov 2012 08:18:38 +0000 (00:18 -0800)]
* doc/emacs/misc.texi (Single Shell): Mention async-shell-command-buffer.

* etc/NEWS: Related markup.

11 years ago* ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range.
Vincent Belaïche [Mon, 12 Nov 2012 05:53:53 +0000 (06:53 +0100)]
* ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range.
In all file place SES into @acronym{...}.
(Advanced Features): Add key index and function index for
ses-set-header-row. Add description for function
ses-rename-cell. Add description for function
ses-repair-cell-reference-all.
(Ranges in formulas): Add description for ses-range flags.

11 years agoSimplify by using FOR_EACH_FRAME here and there.
Dmitry Antipov [Mon, 12 Nov 2012 04:00:55 +0000 (08:00 +0400)]
Simplify by using FOR_EACH_FRAME here and there.
* frame.c (next_frame, prev_frame, other_visible_frames)
(delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
* w32term.c (x_window_to_scroll_bar): Likewise.
* window.c (window_list): Likewise.
* xdisp.c (x_consider_frame_title): Likewise.
* xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
* xfns.c (x_window_to_frame, x_any_window_to_frame)
(x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
* xmenu.c (menubar_id_to_frame): Likewise.
* xselect.c (frame_for_x_selection): Likewise.
* xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
(x_window_to_menu_bar): Likewise.
* w32fns.c (x_window_to_frame): Likewise.  Adjust comment.

11 years ago* texinfo.tex: Merge from gnulib.
Paul Eggert [Mon, 12 Nov 2012 03:10:51 +0000 (19:10 -0800)]
* texinfo.tex: Merge from gnulib.

11 years ago* data.c (Qdefalias_fset_function): Now static.
Paul Eggert [Mon, 12 Nov 2012 02:08:06 +0000 (18:08 -0800)]
* data.c (Qdefalias_fset_function): Now static.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-move-to-block): When moving
Dmitry Gutov [Mon, 12 Nov 2012 01:11:06 +0000 (05:11 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-move-to-block): When moving
backward, always stop at indentation.  Reverts the change from
2012-08-12T22:06:56Z!monnier@iro.umontreal.ca.

Fixes: debbugs:12851

11 years agoAnother tweak to vectorlike_header change.
Paul Eggert [Mon, 12 Nov 2012 01:09:34 +0000 (17:09 -0800)]
Another tweak to vectorlike_header change.

* alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
Remove, and replace all uses with ...
(next_in_free_list, set_next_in_free_list):
New functions, which respect C's aliasing rules better.

11 years ago* window.c (list4i): Rename from 'quad'. All uses changed.
Paul Eggert [Sun, 11 Nov 2012 18:39:29 +0000 (10:39 -0800)]
* window.c (list4i): Rename from 'quad'.  All uses changed.

Needed because <sys/types.h> defines 'quad' on Solaris 10.

11 years agosrc/xdisp.c (start_hourglass) [HAVE_NTGUI]: Silence warning.
Juanma Barranquero [Sun, 11 Nov 2012 14:19:13 +0000 (15:19 +0100)]
src/xdisp.c (start_hourglass) [HAVE_NTGUI]: Silence warning.

11 years agoAuto-commit of loaddefs files.
Glenn Morris [Sun, 11 Nov 2012 11:22:06 +0000 (06:22 -0500)]
Auto-commit of loaddefs files.

11 years agoAdd ibuffer-filter-by-derived-mode to ibuffer menu and doc
Glenn Morris [Sun, 11 Nov 2012 02:22:26 +0000 (18:22 -0800)]
Add ibuffer-filter-by-derived-mode to ibuffer menu and doc

* lisp/ibuffer.el (ibuffer-mode-map, ibuffer-mode):
Add ibuffer-filter-by-derived-mode.

* etc/NEWS: Related markup.

11 years agoFix ibuffer menu typo
Glenn Morris [Sun, 11 Nov 2012 02:18:14 +0000 (18:18 -0800)]
Fix ibuffer menu typo

* lisp/ibuffer.el (ibuffer-mode-map): Don't have two menu items with
the same name shadowing each other.

11 years agoNEWS markup
Glenn Morris [Sun, 11 Nov 2012 02:12:56 +0000 (18:12 -0800)]
NEWS markup

11 years agoNEWS markup
Glenn Morris [Sun, 11 Nov 2012 02:03:45 +0000 (18:03 -0800)]
NEWS markup

11 years ago* lisp/window.el (with-temp-buffer-window): Doc tweak.
Glenn Morris [Sun, 11 Nov 2012 01:47:56 +0000 (17:47 -0800)]
* lisp/window.el (with-temp-buffer-window): Doc tweak.

11 years agoDocument debugger-bury-or-kill
Glenn Morris [Sun, 11 Nov 2012 01:16:25 +0000 (17:16 -0800)]
Document debugger-bury-or-kill

* doc/lispref/debugging.texi (Using Debugger): Mention debugger-bury-or-kill.

* lisp/emacs-lisp/debug.el (debugger-bury-or-kill): Doc tweak.

* etc/NEWS: Related edit.

11 years ago* doc/lispref/debugging.texi (Error Debugging): Mention debug-on-message.
Glenn Morris [Sun, 11 Nov 2012 00:58:51 +0000 (16:58 -0800)]
* doc/lispref/debugging.texi (Error Debugging): Mention debug-on-message.

* etc/NEWS: Related markup.

11 years agoFix more custom :versions
Glenn Morris [Sun, 11 Nov 2012 00:43:54 +0000 (16:43 -0800)]
Fix more custom :versions

* lisp/help.el (temp-buffer-max-height):
* lisp/window.el (fit-frame-to-buffer, fit-frame-to-buffer-bottom-margin):
Fix :version.

11 years ago* lisp/emacs-lisp/debug.el (debugger-bury-or-kill): Fix :version.
Glenn Morris [Sun, 11 Nov 2012 00:40:37 +0000 (16:40 -0800)]
* lisp/emacs-lisp/debug.el (debugger-bury-or-kill): Fix :version.

11 years agoDocument new error symbol and function user-error
Glenn Morris [Sun, 11 Nov 2012 00:37:40 +0000 (16:37 -0800)]
Document new error symbol and function user-error

* doc/lispref/control.texi (Signaling Errors):
* doc/lispref/debugging.texi (Error Debugging):
* doc/lispref/errors.texi (Standard Errors): Add user-error.

* etc/NEWS: Related markup.

11 years agoFormatting tweak for variables.texi
Glenn Morris [Sun, 11 Nov 2012 00:20:51 +0000 (16:20 -0800)]
Formatting tweak for variables.texi

* doc/lispref/variables.texi (Adding Generalized Variables):
Use standard formatting for common lisp note about setf functions.

11 years agoAdd missing make-local-variable calls in srt-mode.el
Glenn Morris [Sat, 10 Nov 2012 23:43:47 +0000 (15:43 -0800)]
Add missing make-local-variable calls in srt-mode.el

* lisp/cedet/srecode/srt-mode.el (srecode-template-mode):
Don't change global values of comment-start, comment-end.

Fixes: debbugs:12781

11 years agoRemove report-emacs-bug-query-existing-bugs (use debbugs from GNU ELPA instead)
Glenn Morris [Sat, 10 Nov 2012 23:19:43 +0000 (15:19 -0800)]
Remove report-emacs-bug-query-existing-bugs (use debbugs from GNU ELPA instead)

* lisp/mail/emacsbug.el (report-emacs-bug-tracker-url)
(report-emacs-bug-bug-alist, report-emacs-bug-choice-widget)
(report-emacs-bug-create-existing-bugs-buffer)
(report-emacs-bug-parse-query-results)
(report-emacs-bug-query-existing-bugs): Remove.

Fixes: debbugs:7449

11 years agoMerge from emacs-24; up to 2012-11-08T14:54:03Z!monnier@iro.umontreal.ca
Glenn Morris [Sat, 10 Nov 2012 23:13:33 +0000 (15:13 -0800)]
Merge from emacs-24; up to 2012-11-08T14:54:03Z!monnier@iro.umontreal.ca

11 years agoBackport: * lisp/ido.el (ido-set-matches-1): Fix split-string args to
Leo Liu [Sat, 10 Nov 2012 14:55:09 +0000 (22:55 +0800)]
Backport: * lisp/ido.el (ido-set-matches-1): Fix split-string args to
avoid performance issue.

Fixes: debbugs:12796

11 years agoFix earlier NEWS change
Glenn Morris [Sat, 10 Nov 2012 01:50:56 +0000 (20:50 -0500)]
Fix earlier NEWS change

11 years agoMake term-default-fg-color, term-default-bg-color obsolete
Glenn Morris [Sat, 10 Nov 2012 01:48:44 +0000 (20:48 -0500)]
Make term-default-fg-color, term-default-bg-color obsolete

* lisp/term.el (term-default-fg-color, term-default-bg-color):
Make obsolete, rather than just saying "deprecated" in the doc.

11 years agoFace names should not end in -face (term-face)
Glenn Morris [Sat, 10 Nov 2012 01:40:48 +0000 (20:40 -0500)]
Face names should not end in -face (term-face)

* lisp/term.el (term): Rename from `term-face'.
(term-current-face, ansi-term-color-vector)
(term-default-fg-color, term-default-bg-color, term-ansi-reset):
Update all users.

* doc/emacs/misc.texi (Terminal emulator): Rename `term-face' to `term'.

* etc/NEWS: Related edit.

11 years agoMore small NEWS copyedits
Glenn Morris [Sat, 10 Nov 2012 01:36:05 +0000 (20:36 -0500)]
More small NEWS copyedits

11 years ago* lisp/ido.el (ido-set-matches-1): Improve flex matching performance by
Leo Liu [Sat, 10 Nov 2012 01:28:22 +0000 (09:28 +0800)]
* lisp/ido.el (ido-set-matches-1): Improve flex matching performance by
removing backtracking in the regexp (suggested by Stefan).

Fixes: debbugs:12796

11 years agoProvide new `defalias-fset-function' symbol property.
Stefan Monnier [Fri, 9 Nov 2012 22:20:47 +0000 (17:20 -0500)]
Provide new `defalias-fset-function' symbol property.
* src/lisp.h (AUTOLOADP): New macro.
* src/eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
* src/data.c (Ffset): Remove special ad-advice-info handling.
(Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
(Fsubr_arity): CSE.
(Finteractive_form): Simplify.
(Fquo): Don't insist on having at least 2 arguments.
(Qdefalias_fset_function): New var.
* lisp/emacs-lisp/advice.el (ad-set-advice-info): Set defalias-fset-function.
(ad--defalias-fset): New function.
(ad-safe-fset): Remove.
(ad-make-freeze-definition): Use cl-letf*.

11 years ago* lisp/subr.el (dolist): Don't bind VAR in RESULT.
Stefan Monnier [Fri, 9 Nov 2012 20:45:10 +0000 (15:45 -0500)]
* lisp/subr.el (dolist): Don't bind VAR in RESULT.

11 years ago* lisp/emacs-lisp/advice.el: Miscellaneous cleanup. Use lexical-binding.
Stefan Monnier [Fri, 9 Nov 2012 20:41:03 +0000 (15:41 -0500)]
* lisp/emacs-lisp/advice.el: Miscellaneous cleanup.  Use lexical-binding.
(fset, documentation): Don't save real def since we don't advise.
(ad-do-advised-functions): Remove problematic `result-form'.
(ad-safe-fset): `ad-real-fset' => `fset'.
(ad-read-advised-function): Don't assume that ad-do-advised-functions
uses CL's dolist internally.
(ad-arglist): Remove unused arg `name'.
(ad-docstring, ad-make-advised-docstring):
`ad-real-documentation' => `documentation'.
(warning-suppress-types): Declare.
(ad-set-arguments): Simple CSE.
(ad-recover-normality): Sanity check.

11 years ago* image.c (xpm_make_color_table_h): Change to hashtest_equal.
Jan Djärv [Fri, 9 Nov 2012 19:47:28 +0000 (20:47 +0100)]
* image.c (xpm_make_color_table_h): Change to hashtest_equal.

11 years ago* lisp/emacs-lisp/bytecomp.el (byte-compile-out-toplevel): Don't turn
Stefan Monnier [Fri, 9 Nov 2012 15:56:51 +0000 (10:56 -0500)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-out-toplevel): Don't turn
(funcall '(lambda ..) ..) into ((lambda ..) ..).

11 years ago* nsfont.m (Qcondensed, Qexpanded): New variables.
Jan Djärv [Fri, 9 Nov 2012 15:44:07 +0000 (16:44 +0100)]
* nsfont.m (Qcondensed, Qexpanded): New variables.
(ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
(syms_of_nsfont): Defsym Qcondensed, Qexpanded.

11 years agoFix recently introduced crash on MS-Windows (Bug#12839).
Dmitry Antipov [Fri, 9 Nov 2012 14:45:15 +0000 (18:45 +0400)]
Fix recently introduced crash on MS-Windows (Bug#12839).
* w32term.h (struct scroll_bar): Use convenient header.
(SCROLL_BAR_VEC_SIZE): Remove.
* w32term.c (x_scroll_bar_create): Use VECSIZE.

11 years agoTweak last vectorlike_header change.
Dmitry Antipov [Fri, 9 Nov 2012 11:38:31 +0000 (15:38 +0400)]
Tweak last vectorlike_header change.
* alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
vectorlike object on the free list.  This is introduced to avoid
some (but not all) pointer casting and aliasing problems, see
http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
* .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
objects.
(xvectype, xvecsize): Use them to examine Lisp_Object values.

11 years agoSmall NEWS update re profiling
Glenn Morris [Fri, 9 Nov 2012 08:42:54 +0000 (00:42 -0800)]
Small NEWS update re profiling

The previously described sequence start, stop, report does nothing.
Ref http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00010.html

11 years agoMore updates for the URL library manual.
Chong Yidong [Fri, 9 Nov 2012 08:34:17 +0000 (16:34 +0800)]
More updates for the URL library manual.

* url.texi (Introduction): Move url-configuration-directory to
Customization node.
(Parsed URIs): Split into its own node.
(URI Encoding): New node.
(Defining New URLs): Remove empty chapter.
(Retrieving URLs): Add an introduction.  Doc fix for url-retrieve.
Improve docs for url-queue-*.
(Supported URL Types): Copyedits.  Delete empty subnodes.

11 years agoTrivial NEWS copyedits
Glenn Morris [Fri, 9 Nov 2012 08:30:48 +0000 (00:30 -0800)]
Trivial NEWS copyedits

11 years agoTrivial NEWS copyedits
Glenn Morris [Fri, 9 Nov 2012 08:22:44 +0000 (00:22 -0800)]
Trivial NEWS copyedits

11 years agoSmall NEWS edits
Glenn Morris [Fri, 9 Nov 2012 08:11:23 +0000 (00:11 -0800)]
Small NEWS edits

* etc/NEWS: Mention erc-desktop-notifications.
Remove empty section "New Modes and Packages" (all covered elsewhere).

* etc/GNUS-NEWS: Mention gnus-notifications.

11 years agoSome small updates for the Acknowledgments sections in the manual
Glenn Morris [Fri, 9 Nov 2012 08:03:58 +0000 (00:03 -0800)]
Some small updates for the Acknowledgments sections in the manual

* doc/emacs/emacs.texi (Acknowledgments): Add profiler author.
* doc/emacs/ack.texi (Acknowledgments): Add some recent contributions.

11 years ago* nsfont.m (ns_descriptor_to_entity): Qcondesed and Qexpanded has
Jan Djärv [Fri, 9 Nov 2012 06:36:51 +0000 (07:36 +0100)]
* nsfont.m (ns_descriptor_to_entity): Qcondesed and Qexpanded has
been removed, so remove them here also.

11 years ago* server.el (server-create-window-system-frame): Improved comment.
Jan Djärv [Fri, 9 Nov 2012 06:28:27 +0000 (07:28 +0100)]
* server.el (server-create-window-system-frame): Improved comment.

11 years ago* ses.el: Use hash map for getting named cells coordinates.
Vincent Belaïche [Fri, 9 Nov 2012 05:48:05 +0000 (06:48 +0100)]
* ses.el: Use hash map for getting named cells coordinates.
 symbol to coordinate mapping is made by symbol property
 `ses-cell'. This means that the same mapping is done for all SES
 sheets. That is good enough for cells with standard A1 names, but
 not for named cell. So a hash map is added for those
 latter.
 (defconst ses-localvars): added local variable ses--named-cell-hashmap
 (ses-sym-rowcol): Use hashmap for named cell.
 (ses-is-cell-sym-p): New defun.
 (ses-decode-cell-symbol): New defun.
 (ses-create-cell-variable): Add cell to hashmap when name is not A1-like.
 (ses-rename-cell): Check that cell new name is not already in
 spreadsheet with the use of ses-is-cell-sym-p
 (ses-rename-cell): Use hash map for named cells, but accept also
 renaming back to A1-like.

11 years agoNew property dynamic-docstring-function for docstrings.
Stefan Monnier [Fri, 9 Nov 2012 04:10:16 +0000 (23:10 -0500)]
New property dynamic-docstring-function for docstrings.
* src/doc.c (Fdocumentation): Handle new property
dynamic-docstring-function to replace the old ad-advice-info.
* lisp/emacs-lisp/advice.el: Use new dynamic docstrings.
(ad-make-advised-definition-docstring, ad-advised-definition-p):
Use dynamic-docstring-function instead of ad-advice-info.
(ad--make-advised-docstring): New function extracted from
ad-make-advised-docstring.
(ad-make-advised-docstring): Use it.
* lisp/progmodes/sql.el (sql--make-help-docstring): New function, extracted
from sql-help.
(sql-help): Use it with dynamic-docstring-function.

11 years ago* lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap).
Stefan Monnier [Fri, 9 Nov 2012 01:31:54 +0000 (20:31 -0500)]
* lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap).

11 years ago* fns.c (Qeql, hashtest_eq): Now static.
Paul Eggert [Fri, 9 Nov 2012 00:08:12 +0000 (16:08 -0800)]
* fns.c (Qeql, hashtest_eq): Now static.

11 years agognus-art.el (gnus-article-browse-html-parts): Always replace charset in meta tag...
Katsumi Yamaoka [Thu, 8 Nov 2012 23:49:58 +0000 (23:49 +0000)]
gnus-art.el (gnus-article-browse-html-parts): Always replace charset in meta tag with the one the part specifies in its header

11 years ago* src/lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
Stefan Monnier [Thu, 8 Nov 2012 21:58:55 +0000 (16:58 -0500)]
* src/lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
* src/fns.c (hashfn_eq, hashfn_eql, sxhash):
* src/profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
* src/buffer.c (compare_overlays): Use XLI rather than XHASH.

11 years agoUse same hash function for hashfn_profiler as for hash_string etc.
Paul Eggert [Thu, 8 Nov 2012 21:43:34 +0000 (13:43 -0800)]
Use same hash function for hashfn_profiler as for hash_string etc.

* fns.c (SXHASH_COMBINE): Remove.  All uses replaced by sxhash_combine.
* lisp.h (sxhash_combine): New inline function, with the contents
of the old SXHASH_COMBINE.
* profiler.c (hashfn_profiler): Use it, instead of having a
special hash function containing a comparison that always yields 1.

11 years ago* src/xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
Stefan Monnier [Thu, 8 Nov 2012 21:02:10 +0000 (16:02 -0500)]
* src/xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
(Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
(Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
Remove unused vars.

11 years ago* image.c (xpm_make_color_table_h): Fix compiler error because
Jan Djärv [Thu, 8 Nov 2012 19:52:28 +0000 (20:52 +0100)]
* image.c (xpm_make_color_table_h): Fix compiler error because
make_hash_table changed.

11 years agonsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
Jan Djärv [Thu, 8 Nov 2012 19:51:07 +0000 (20:51 +0100)]
nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).

11 years ago* lisp/files.el (hack-one-local-variable--obsolete): New function.
Stefan Monnier [Thu, 8 Nov 2012 19:50:08 +0000 (14:50 -0500)]
* lisp/files.el (hack-one-local-variable--obsolete): New function.
(hack-one-local-variable): Use it for obsolete settings.

11 years ago* lisp/subr.el (locate-user-emacs-file): If both old and new name exist, use
Stefan Monnier [Thu, 8 Nov 2012 19:45:58 +0000 (14:45 -0500)]
* lisp/subr.el (locate-user-emacs-file): If both old and new name exist, use
the new name.

11 years ago* lisp/progmodes/js.el: Prefer advice to cl-letf's sneaky rebinding.
Stefan Monnier [Thu, 8 Nov 2012 19:44:52 +0000 (14:44 -0500)]
* lisp/progmodes/js.el: Prefer advice to cl-letf's sneaky rebinding.
(c-forward-sws, c-backward-sws, c-beginning-of-macro): Advise.
(js--filling-paragraph): New var.
(js-c-fill-paragraph): Bind it instead of letf-ing the functions.

11 years ago* server.el (server-create-window-system-frame): Handle Nextstep
Jan Djärv [Thu, 8 Nov 2012 19:25:39 +0000 (20:25 +0100)]
* server.el (server-create-window-system-frame): Handle Nextstep
specially.

Fixes: debbugs:12780

11 years agoUse ad-hoc comparison function for the profiler's hash-tables.
Stefan Monnier [Thu, 8 Nov 2012 19:12:23 +0000 (14:12 -0500)]
Use ad-hoc comparison function for the profiler's hash-tables.
* src/profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
(make_log): Use them.
(handle_profiler_signal): Don't inhibit quit any longer since we don't
call Fequal any more.
(Ffunction_equal): New function.
(cmpfn_profiler, hashfn_profiler): New functions.
(syms_of_profiler): Initialize them.
* src/lisp.h (struct hash_table_test): New struct.
(struct Lisp_Hash_Table): Use it.
* src/alloc.c (mark_object): Mark hash_table_test fields of hash tables.
* src/fns.c (make_hash_table): Take a struct to describe the test.
(cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
(hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
(hash_lookup, hash_remove_from_table): Move assertion checking of
hashfn result here.  Check hash-equality before calling cmpfn.
(Fmake_hash_table): Adjust call to make_hash_table.
(hashtest_eq, hashtest_eql, hashtest_equal): New structs.
(syms_of_fns): Initialize them.
* src/emacs.c (main): Move syms_of_fns earlier.
* src/xterm.c (syms_of_xterm):
* src/category.c (hash_get_category_set): Adjust call to make_hash_table.
* src/print.c (print_object): Adjust to new hash-table struct.
* src/composite.c (composition_gstring_put_cache): Adjust to new hashfn.

11 years agoUpdate the URL library manual.
Chong Yidong [Thu, 8 Nov 2012 19:03:49 +0000 (03:03 +0800)]
Update the URL library manual.

* doc/misc/url.texi (Introduction): Rename from Getting Started.
Rewrite the introduction.
(URI Parsing): Rewrite.  Omit the obsolete attributes slot.