]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 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
12 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.

12 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.

12 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.

12 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.

12 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.

12 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.

12 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.

12 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.

12 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.

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

12 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
12 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

12 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
12 years agoFix earlier NEWS change
Glenn Morris [Sat, 10 Nov 2012 01:50:56 +0000 (20:50 -0500)]
Fix earlier NEWS change

12 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.

12 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.

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

12 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
12 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*.

12 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.

12 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.

12 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.

12 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 ..) ..).

12 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.

12 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.

12 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.

12 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

12 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.

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

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

12 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.

12 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.

12 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.

12 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.

12 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.

12 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.

12 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).

12 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.

12 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

12 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.

12 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.

12 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.

12 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.

12 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).

12 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.

12 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.

12 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.

12 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
12 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.

12 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.

12 years agoMake report-emacs-bug-query-existing-bugs obsolete (bug#7449)
Glenn Morris [Thu, 8 Nov 2012 18:35:08 +0000 (13:35 -0500)]
Make report-emacs-bug-query-existing-bugs obsolete (bug#7449)

* lisp/mail/emacsbug.el (report-emacs-bug-query-existing-bugs):
Unautoload, and make obsolete.

12 years agoRewrite and rename diff-delete-trailing-whitespace.
Chong Yidong [Thu, 8 Nov 2012 17:31:53 +0000 (01:31 +0800)]
Rewrite and rename diff-delete-trailing-whitespace.

* lisp/vc/diff-mode.el (diff-delete-trailing-whitespace): Rewrite, and
rename from diff-remove-trailing-whitespace (Bug#12831).

* files.texi (Diff Mode): Doc fixes for
diff-delete-trailing-whitespace.

12 years agoMore fixes for bug #12806.
Eli Zaretskii [Thu, 8 Nov 2012 17:02:56 +0000 (19:02 +0200)]
More fixes for bug #12806.

 src/w32fns.c (modifier_set): Fix handling of Scroll Lock when the
 value of w32-scroll-lock-modifier is neither nil nor one of the
 known key modifiers.

12 years agoAdd Rakefile in auto-mode-list for ruby-mode
Julien Danjou [Thu, 8 Nov 2012 16:37:34 +0000 (17:37 +0100)]
Add Rakefile in auto-mode-list for ruby-mode

* progmodes/ruby-mode.el (auto-mode-alist): Add Rakefile in
  `auto-mode-alist' (Bug#12835).

12 years ago* perl-mode.el: Add coding cookie.
Stefan Monnier [Thu, 8 Nov 2012 15:37:29 +0000 (10:37 -0500)]
* perl-mode.el: Add coding cookie.

12 years ago* lisp/progmodes/perl-mode.el (perl-prettify-symbols): New defcustom.
Stefan Monnier [Thu, 8 Nov 2012 15:35:32 +0000 (10:35 -0500)]
* lisp/progmodes/perl-mode.el (perl-prettify-symbols): New defcustom.
(perl--prettify-symbols-alist): New const.
(perl--font-lock-compose-symbol, perl--font-lock-symbols-keywords): New funs.
(perl-font-lock-keywords-2): Use them.
(perl-electric-noindent-p): New function.
(perl-mode): Use it to set up electric-indent-mode.
(perl-electric-terminator, perl-indent-command): Mark obsolete.
(perl-mode-map): Remove bindings for them.
(perl-imenu-generic-expression, perl-outline-level):
Match functions&packages in column>0.

12 years ago* lisp/env.el (env--substitute-vars-regexp): New const.
Stefan Monnier [Thu, 8 Nov 2012 15:10:08 +0000 (10:10 -0500)]
* lisp/env.el (env--substitute-vars-regexp): New const.
(substitute-env-vars): Use it.  Add `only-defined' arg.
* lisp/net/tramp.el (tramp-replace-environment-variables): Use it.

12 years ago* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Stefan Monnier [Thu, 8 Nov 2012 14:58:15 +0000 (09:58 -0500)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Byte-compile *before* eval in eval-and-compile.
(byte-compile-log-warning): Remove redundant inhibit-read-only.
(byte-compile-file-form-autoload): Don't hide actual definition.
(byte-compile-maybe-guarded): Accept `functionp' as well.

12 years ago* lisp/emacs-lisp/gv.el (gv-deref): Move setter declaration, to fix bootstrap.
Stefan Monnier [Thu, 8 Nov 2012 14:54:03 +0000 (09:54 -0500)]
* lisp/emacs-lisp/gv.el (gv-deref): Move setter declaration, to fix bootstrap.

12 years ago* lisp/emacs-lisp/advice.el: Require `cl-lib' at run-time to fix
Stefan Monnier [Thu, 8 Nov 2012 14:36:47 +0000 (09:36 -0500)]
* lisp/emacs-lisp/advice.el: Require `cl-lib' at run-time to fix
miscompilation of trace.el.

12 years ago* lisp/emacs-lisp/gv.el (gv-ref, gv-deref): New function and macro.
Stefan Monnier [Thu, 8 Nov 2012 14:21:21 +0000 (09:21 -0500)]
* lisp/emacs-lisp/gv.el (gv-ref, gv-deref): New function and macro.

12 years agoShrink struct vectorlike_header to the only size field.
Dmitry Antipov [Thu, 8 Nov 2012 14:10:28 +0000 (18:10 +0400)]
Shrink struct vectorlike_header to the only size field.
* lisp.h (enum pvec_type): Avoid explicit enum member values.
Adjust comment.
(enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
PVEC_TYPE_MASK to arrange new bitfield in the vector header.
(PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
(PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
information from the vector header.  Adjust comment.
(XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
(PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
layout.
(XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
(struct vectorlike_header): Remove next member.  Adjust comment.
(struct Lisp_Subr): Add convenient header.  Adjust comment.
(allocate_pseudovector): Adjust prototype.
* alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
(sweep_string, lisp_malloc): Remove useless prototypes.
(enum mem_type): Adjust comment.
(NEXT_IN_FREE_LIST): New macro.
(SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
(Fmake_bool_vector): Likewise.
(struct large_vector): New type to represent allocation unit for
the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
(large_vectors): Change type to struct large_vector.
(allocate_vector_from_block): Simplify.
(PSEUDOVECTOR_NBYTES): Replace with...
(vector_nbytes): ...new function.  Adjust users.
(sweep_vectors): Adjust processing of large vectors.
(allocate_vectorlike): Likewise.
(allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
Add easserts.  Adjust XSETPVECTYPESIZE usage.
(allocate_buffer): Use BUFFER_PVEC_INIT.
(live_vector_p): Adjust to match large vector.
* buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
* buffer.h (struct buffer): Add next member.
(BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
New macros.
(FOR_EACH_BUFFER): Adjust to match struct buffer change.
* fns.c (internal_equal): Adjust to match enum pvec_type change.
(copy_hash_table): Adjust to match vector header change.
* lread.c (defsubr): Use XSETPVECTYPE.
* .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
(xvectype): Likewise.  Print PVEC_NORMAL_VECTOR for regular vectors.
(xvecsize): New command.

12 years ago* lisp/emacs-lisp/gv.el (gv-ref, gv-deref): New function and macro.
Stefan Monnier [Thu, 8 Nov 2012 13:34:06 +0000 (08:34 -0500)]
* lisp/emacs-lisp/gv.el (gv-ref, gv-deref): New function and macro.

12 years ago* doc/emacs/trouble.texi (Crashing): Copyedits.
Chong Yidong [Thu, 8 Nov 2012 10:35:40 +0000 (18:35 +0800)]
* doc/emacs/trouble.texi (Crashing): Copyedits.

12 years ago* keyboard.c (event_to_kboard): Do not dereference
Dmitry Antipov [Thu, 8 Nov 2012 09:26:40 +0000 (13:26 +0400)]
* keyboard.c (event_to_kboard): Do not dereference
frame_or_window field of SELECTION_REQUEST_EVENT
and SELECTION_CLEAR_EVENT events (Bug#12814).
* xterm.h (struct selection_input_event): Adjust comment.

12 years agoDocument diff-remove-trailing-whitespace
Glenn Morris [Thu, 8 Nov 2012 08:14:23 +0000 (00:14 -0800)]
Document diff-remove-trailing-whitespace

* doc/emacs/files.texi (Diff Mode): Trailing whitespace updates.

* lisp/vc/diff-mode.el (diff-remove-trailing-whitespace): Doc fix.

* etc/NEWS: Related markup.

12 years ago* os.texi (Notifications): Update descriptions of
Michael Albinus [Thu, 8 Nov 2012 07:50:43 +0000 (08:50 +0100)]
* os.texi (Notifications): Update descriptions of
notifications-notify, notifications-close-notification and
notifications-get-capabilities according to latest code changes.
Add notifications-get-server-information.

12 years agoTweak previous change
Glenn Morris [Thu, 8 Nov 2012 04:20:00 +0000 (20:20 -0800)]
Tweak previous change

12 years agoDirect ERC news to the main NEWS file
Glenn Morris [Thu, 8 Nov 2012 04:19:38 +0000 (20:19 -0800)]
Direct ERC news to the main NEWS file

12 years ago* lisp/emacs-lisp/gv.el (gv-define-simple-setter): Fix last change.
Stefan Monnier [Thu, 8 Nov 2012 01:24:14 +0000 (20:24 -0500)]
* lisp/emacs-lisp/gv.el (gv-define-simple-setter): Fix last change.

Fixes: debbugs:12812
12 years agoNEWS edit
Glenn Morris [Wed, 7 Nov 2012 22:27:39 +0000 (17:27 -0500)]
NEWS edit

12 years ago* cl.texi (Obsolete Setf Customization): Updates for define-setf-method.
Glenn Morris [Wed, 7 Nov 2012 22:23:34 +0000 (17:23 -0500)]
* cl.texi (Obsolete Setf Customization): Updates for define-setf-method.

* etc/NEWS: Related markup.

12 years agoFix Num Lock handling related to bug #12806.
Eli Zaretskii [Wed, 7 Nov 2012 21:48:18 +0000 (23:48 +0200)]
Fix Num Lock handling related to bug #12806.

 src/w32fns.c (modifier_set): Don't include Num Lock in the reported
 modifiers.

12 years agoA (hopefully) better fix for bug #1280.
Eli Zaretskii [Wed, 7 Nov 2012 21:12:25 +0000 (23:12 +0200)]
A (hopefully) better fix for bug #1280.

 src/w32fns.c (modifier_set): Don't report modifiers from toggle key,
 such as Scroll Lock, if the respective keys are treated as
 function keys, not as modifiers.  This avoids destroying non-ASCII
 keyboard input when Scroll Lock is toggled ON.

12 years ago* misc.texi (Terminal emulator): Document Term mode faces.
Chong Yidong [Wed, 7 Nov 2012 21:04:52 +0000 (05:04 +0800)]
* misc.texi (Terminal emulator): Document Term mode faces.

12 years agoFix and docfix for the minibuffer-eldef-shorten-default feature.
Chong Yidong [Wed, 7 Nov 2012 20:43:38 +0000 (04:43 +0800)]
Fix and docfix for the minibuffer-eldef-shorten-default feature.

* lisp/minibuf-eldef.el (minibuffer-eldef-shorten-default): Convert to
a defcustom with an appropriate :set function.
(minibuffer-default--in-prompt-regexps): New function.

* doc/emacs/mini.texi (Basic Minibuffer): New node.  Document
minibuffer-electric-default-mode.

* doc/emacs/display.texi (Visual Line Mode): Fix index entry.

12 years agoInclude Num Lock in test for modifier keys on MS-Windows.
Eli Zaretskii [Wed, 7 Nov 2012 17:33:14 +0000 (19:33 +0200)]
Include Num Lock in test for modifier keys on MS-Windows.

 src/w32fns.c (modifier_set): Do not omit checking the Num Lock key.

12 years ago* notifications.el (notifications-get-server-information-method):
Michael Albinus [Wed, 7 Nov 2012 16:55:39 +0000 (17:55 +0100)]
* notifications.el (notifications-get-server-information-method):
New defconst.
(notifications-get-capabilities): Fix docstring.
(notifications-get-server-information): New defun.

12 years agoFix bug #1280 with non-ASCII keyboard input on MS-Windows.
Eli Zaretskii [Wed, 7 Nov 2012 16:44:48 +0000 (18:44 +0200)]
Fix bug #1280 with non-ASCII keyboard input on MS-Windows.

 src/w32fns.c (w32_wnd_proc): Don't directly handle key chords
 including modifiers from toggle key, such as Scroll Lock, if the
 respective keys are treated as function keys, not as modifiers.
 This avoids destroying non-ASCII keyboard input when Scroll Lock
 is toggled ON.

12 years ago* doc/lispref/searching.texi (Replacing Match): Document \? in replace-match.
Chong Yidong [Wed, 7 Nov 2012 15:46:35 +0000 (23:46 +0800)]
* doc/lispref/searching.texi (Replacing Match): Document \? in replace-match.

12 years agoFix and rewrite doc on window recombining facilities.
Martin Rudalics [Wed, 7 Nov 2012 09:41:52 +0000 (10:41 +0100)]
Fix and rewrite doc on window recombining facilities.

* window.c (Fsplit_window_internal): Set combination limit of
new parent window to t iff Vwindow_combination_limit is t;
fixing a regression introduced with the change from 2012-09-22.
(Fwindow_combination_limit, Fset_window_combination_limit): Fix
doc-strings.

* elisp.texi (Top): Add Recombining Windows to menu.
* windows.texi (Recombining Windows): New subsection.
(Splitting Windows): Rewrite text on handling of window
combinations and move it to new subsection.

12 years agoMore cl-lib and gv doc updates
Glenn Morris [Wed, 7 Nov 2012 08:56:16 +0000 (00:56 -0800)]
More cl-lib and gv doc updates

* lisp/emacs-lisp/cl.el (define-setf-expander, defsetf)
(define-modify-macro): Doc fixes.

* doc/misc/cl.texi (Obsolete Setf Customization):
Give defsetf gv.el replacements.

* etc/NEWS: Related edit.

12 years agoNEWS edit
Glenn Morris [Wed, 7 Nov 2012 08:32:34 +0000 (00:32 -0800)]
NEWS edit

12 years ago* cl.texi (Obsolete Setf Customization): Give define-modify-macro replacement.
Glenn Morris [Wed, 7 Nov 2012 08:28:34 +0000 (00:28 -0800)]
* cl.texi (Obsolete Setf Customization): Give define-modify-macro replacement.

12 years agoDoc improvements for Buffer Menu.
Chong Yidong [Wed, 7 Nov 2012 06:54:43 +0000 (14:54 +0800)]
Doc improvements for Buffer Menu.

* buffers.texi (Several Buffers): List Buffer Menu command anmes,
and index the keybindings.  Document tabulated-list-sort.
(Kill Buffer): Capitalize Buffer Menu.

* trouble.texi (Memory Full): Capitalize Buffer Menu.

12 years ago* xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
Dmitry Antipov [Wed, 7 Nov 2012 05:23:20 +0000 (09:23 +0400)]
* xfns.c (Fx_wm_set_size_hint): Use check_x_frame.  Adjust docstring.

12 years agoDocument setf-local, defvar-local, and some doc updates for setf.
Chong Yidong [Wed, 7 Nov 2012 05:22:10 +0000 (13:22 +0800)]
Document setf-local, defvar-local, and some doc updates for setf.

* doc/lispref/edebug.texi (Specification List): setf is no longer CL-only.

* doc/lispref/lists.texi (List Elements, List Variables): Clarify descriptions
of push and pop for generalized variables.

* doc/lispref/variables.texi (Creating Buffer-Local): Document setq-local and
defvar-local.
(Setting Generalized Variables): Arrange table alphabetically.

12 years agoSmall doc updates for generalized variables
Glenn Morris [Wed, 7 Nov 2012 04:37:07 +0000 (20:37 -0800)]
Small doc updates for generalized variables

* lisp/emacs-lisp/gv.el (gv-letplace): Fix doc typo.
(gv-define-simple-setter): Update doc of `fix-return'.

* doc/lispref/variables.texi (Adding Generalized Variables):
Update description of FIX-RETURN expansion.

* doc/misc/cl.texi (Obsolete Setf Customization):
Revert defsetf example to the more correct let rather than prog1.

12 years ago* lisp/emacs-lisp/gv.el (gv-define-simple-setter): Don't evaluate `val'
Stefan Monnier [Wed, 7 Nov 2012 03:39:33 +0000 (22:39 -0500)]
* lisp/emacs-lisp/gv.el (gv-define-simple-setter): Don't evaluate `val'
twice when `fix-return' is set.

Fixes: debbugs:12813
12 years ago* lisp/emacs-lisp/cl.el (defsetf): Pass the third arg to
Stefan Monnier [Wed, 7 Nov 2012 03:14:27 +0000 (22:14 -0500)]
* lisp/emacs-lisp/cl.el (defsetf): Pass the third arg to
gv-define-simple-setter.

Fixes: debbugs:12812
12 years agoRestore some duplicate definitions.
Paul Eggert [Tue, 6 Nov 2012 20:48:35 +0000 (12:48 -0800)]
Restore some duplicate definitions.

This undoes part of the 2012-11-03 changes.  Some people build
with plain -g rather than with -g3, and they need the duplicate
definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
* lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
Define as macros, as well as as enums or as constants.

12 years ago* nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
Jan Djärv [Tue, 6 Nov 2012 18:31:19 +0000 (19:31 +0100)]
* nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
to keypad keys.

Fixes: debbugs:12816
12 years agoMinor adjustments of recently-changed frame functions.
Paul Eggert [Tue, 6 Nov 2012 17:40:07 +0000 (09:40 -0800)]
Minor adjustments of recently-changed frame functions.

* buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
known to be a frame (we're in the FRAMEP branch).
* lisp.h (Qframep): Remove decl.  frame.h declares this.
* window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
since they're meant for Lisp fixnum values.

12 years agoFix bug #12811 with scrolling under scroll-up/down-aggressively.
Eli Zaretskii [Tue, 6 Nov 2012 16:36:02 +0000 (18:36 +0200)]
Fix bug #12811 with scrolling under scroll-up/down-aggressively.

 src/xdisp.c (try_scrolling): Fix correction of aggressive-scroll
 amount when the scroll margins are too large.  When scrolling
 backwards in the buffer, give up if cannot reach point or the
 scroll margin within a reasonable number of screen lines.  Fixes
 point position in window under scroll-up/down-aggressively when
 point is positioned many lines beyond the window top/bottom.

12 years agoispell.el (ispell-region): Do not prefix sent string by comment in autoconf mode
Agustín Martín [Tue, 6 Nov 2012 16:33:56 +0000 (17:33 +0100)]
ispell.el (ispell-region): Do not prefix sent string by comment in autoconf mode

 This commit changes some of the `in-comment' ocurrences to more specific
 `add-comment', set only if comment prefix is to be added.

 When in comment, old code prefixed string by comment string to let ispell
 know this is part of a comment string.

 This is only supported in some modes. In particular, this is not supported in
 autoconf mode where adding the comment string messes everything up because
 ispell tries to spellcheck the `dnl' string header causing misalignments in
 some cases (debbugs.gnu.org: #12768).

12 years agotextmodes/ispell.el: Experimental support for support debugging.
Agustín Martín [Tue, 6 Nov 2012 16:22:09 +0000 (17:22 +0100)]
textmodes/ispell.el: Experimental support for support debugging.

 * (ispell-create-debug-buffer): Create a `ispell-debug-buffer' debug
   buffer for ispell.
 * (ispell-print-if-debug): New function to print stuff to
   `ispell-debug-buffer' if debugging is enabled.
 * (ispell-region, ispell-process-line): Use `ispell-print-if-debug' to
   show some debugging info.
 * (ispell-buffer-with-debug): New function that creates a debugging
   buffer and calls `ispell-buffer' with debugging enabled.  This is also
   en example of a possible way to use this system.

12 years agoispell.el (ispell-region): Standard re-indent for better readability.
Agustín Martín [Tue, 6 Nov 2012 16:04:42 +0000 (17:04 +0100)]
ispell.el (ispell-region): Standard re-indent for better readability.

12 years ago* window.c (Fwindow_combination_limit): Revert to the only
Dmitry Antipov [Tue, 6 Nov 2012 15:57:14 +0000 (19:57 +0400)]
* window.c (Fwindow_combination_limit): Revert to the only
required argument and adjust docstring as suggested in
http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
by Martin Rudalics <rudalics@gmx.at>.

12 years agolib/makefile.w32-in, src/makefile.w32-in: Trivial reordering of entries.
Juanma Barranquero [Tue, 6 Nov 2012 15:29:49 +0000 (16:29 +0100)]
lib/makefile.w32-in, src/makefile.w32-in: Trivial reordering of entries.