1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00
Commit Graph

108623 Commits

Author SHA1 Message Date
Stefan Monnier
231d8498eb * 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.
2012-11-12 15:43:43 -05:00
Dmitry Antipov
be49ba7461 * 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.
2012-11-12 20:02:46 +04:00
Vincent Belaïche
1796ef9826 * 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.
2012-11-12 06:53:53 +01:00
Dmitry Antipov
5b04e9f9ac 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.
2012-11-12 08:00:55 +04:00
Paul Eggert
31f47fbaea * texinfo.tex: Merge from gnulib. 2012-11-11 19:10:51 -08:00
Paul Eggert
12cc433750 * data.c (Qdefalias_fset_function): Now static. 2012-11-11 18:08:06 -08:00
Paul Eggert
76ae24d77f 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.
2012-11-11 17:09:34 -08:00
Paul Eggert
1479c557b7 * window.c (list4i): Rename from 'quad'. All uses changed.
Needed because <sys/types.h> defines 'quad' on Solaris 10.
2012-11-11 10:39:29 -08:00
Juanma Barranquero
11235c037f src/xdisp.c (start_hourglass) [HAVE_NTGUI]: Silence warning. 2012-11-11 15:19:13 +01:00
Glenn Morris
c02ed5ace8 Auto-commit of loaddefs files. 2012-11-11 06:22:06 -05:00
Glenn Morris
714cebd1b1 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
2012-11-10 15:19:43 -08:00
Glenn Morris
6baf66d53b Merge from emacs-24; up to 2012-11-08T14:54:03Z!monnier@iro.umontreal.ca 2012-11-10 15:13:33 -08:00
Leo Liu
e4e4688922 Backport: * lisp/ido.el (ido-set-matches-1): Fix split-string args to
avoid performance issue.

Fixes: debbugs:12796
2012-11-10 22:55:09 +08:00
Glenn Morris
af8bf5b3c0 Fix earlier NEWS change 2012-11-09 20:50:56 -05:00
Glenn Morris
bf67dafaf5 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.
2012-11-09 20:48:44 -05:00
Glenn Morris
19e0987902 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.
2012-11-09 20:40:48 -05:00
Glenn Morris
02969baf0f More small NEWS copyedits 2012-11-09 20:36:05 -05:00
Leo Liu
05a859c1bd * lisp/ido.el (ido-set-matches-1): Improve flex matching performance by
removing backtracking in the regexp (suggested by Stefan).

Fixes: debbugs:12796
2012-11-10 09:28:22 +08:00
Stefan Monnier
32e5c58ca9 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*.
2012-11-09 17:20:47 -05:00
Stefan Monnier
da03ef8a9d * lisp/subr.el (dolist): Don't bind VAR in RESULT. 2012-11-09 15:45:10 -05:00
Stefan Monnier
6858633a9c * 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.
2012-11-09 15:41:03 -05:00
Jan Djärv
4ab15c3ec6 * image.c (xpm_make_color_table_h): Change to hashtest_equal. 2012-11-09 20:47:28 +01:00
Stefan Monnier
f5925cd9f5 * lisp/emacs-lisp/bytecomp.el (byte-compile-out-toplevel): Don't turn
(funcall '(lambda ..) ..) into ((lambda ..) ..).
2012-11-09 10:56:51 -05:00
Jan Djärv
719b0aa509 * nsfont.m (Qcondensed, Qexpanded): New variables.
(ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
(syms_of_nsfont): Defsym Qcondensed, Qexpanded.
2012-11-09 16:44:07 +01:00
Dmitry Antipov
535cc8e9fb 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.
2012-11-09 18:45:15 +04:00
Dmitry Antipov
7d377c482f 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.
2012-11-09 15:38:31 +04:00
Glenn Morris
028a5e50d2 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
2012-11-09 00:42:54 -08:00
Chong Yidong
5b6372227e 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.
2012-11-09 16:34:17 +08:00
Glenn Morris
847a056110 Trivial NEWS copyedits 2012-11-09 00:30:48 -08:00
Glenn Morris
b4617547bb Trivial NEWS copyedits 2012-11-09 00:22:44 -08:00
Glenn Morris
9be5f66763 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.
2012-11-09 00:11:23 -08:00
Glenn Morris
ef7238c3e5 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.
2012-11-09 00:03:58 -08:00
Jan Djärv
7ad27466f1 * nsfont.m (ns_descriptor_to_entity): Qcondesed and Qexpanded has
been removed, so remove them here also.
2012-11-09 07:36:51 +01:00
Jan Djärv
d743088dc2 * server.el (server-create-window-system-frame): Improved comment. 2012-11-09 07:28:27 +01:00
Vincent Belaïche
93a66b3a3d * 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.
2012-11-09 06:48:05 +01:00
Stefan Monnier
57618ecf33 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.
2012-11-08 23:10:16 -05:00
Stefan Monnier
67dd8ad119 * lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap). 2012-11-08 20:31:54 -05:00
Paul Eggert
53371430cd * fns.c (Qeql, hashtest_eq): Now static. 2012-11-08 16:08:12 -08:00
Katsumi Yamaoka
c01f021313 gnus-art.el (gnus-article-browse-html-parts): Always replace charset in meta tag with the one the part specifies in its header 2012-11-08 23:49:58 +00:00
Stefan Monnier
61ddb1b9e1 * 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.
2012-11-08 16:58:55 -05:00
Paul Eggert
04a2d0d38a 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.
2012-11-08 13:43:34 -08:00
Stefan Monnier
de5ef41a76 * 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.
2012-11-08 16:02:10 -05:00
Jan Djärv
a23c4171a7 * image.c (xpm_make_color_table_h): Fix compiler error because
make_hash_table changed.
2012-11-08 20:52:28 +01:00
Jan Djärv
074d7bb094 nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541). 2012-11-08 20:51:07 +01:00
Stefan Monnier
d41706aa7a * lisp/files.el (hack-one-local-variable--obsolete): New function.
(hack-one-local-variable): Use it for obsolete settings.
2012-11-08 14:50:08 -05:00
Stefan Monnier
85e5541248 * lisp/subr.el (locate-user-emacs-file): If both old and new name exist, use
the new name.
2012-11-08 14:45:58 -05:00
Stefan Monnier
be883b34f2 * 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.
2012-11-08 14:44:52 -05:00
Jan Djärv
531bdce69d * server.el (server-create-window-system-frame): Handle Nextstep
specially.

Fixes: debbugs:12780
2012-11-08 20:25:39 +01:00
Stefan Monnier
b7432bb20f 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.
2012-11-08 14:12:23 -05:00
Chong Yidong
82f84fa3cd 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.
2012-11-09 03:03:49 +08:00