]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 years agoIn mouse-drag-line don't exit tracking prematurely (Bug#12006).
Martin Rudalics [Thu, 26 Jul 2012 08:32:25 +0000 (10:32 +0200)]
In mouse-drag-line don't exit tracking prematurely (Bug#12006).

* mouse.el (popup-menu): Fix doc-string and re-indent code.
(mouse-drag-line): Don't exit tracking when a switch-frame or
switch-window event occurs (Bug#12006).

12 years agoSimplify export of symbols to GDB; fix related .gdbinit bugs.
Paul Eggert [Thu, 26 Jul 2012 08:12:03 +0000 (01:12 -0700)]
Simplify export of symbols to GDB; fix related .gdbinit bugs.

* etc/emacs-buffer.gdb ($tagmask, $valmask): Remove.
(ygetptr): Adjust to recent changes in lisp.h and emacs.c,
by using VALMASK instead of $valmask, CHECK_LISP_OBJECT_TYPE
instead of gdb_use_union, and DATA_SEG_BITS instead of
gdb_data_seg_bits.  Also, use $ptr.i rather than $ptr.u.val.
* src/.gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
$bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
(xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
Adjust to changes in lisp.h and emacs.c, by using
CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
instead of gdb_valbits.
(xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
instead of gdb_array_mark_flag.
(xboolvector): Get size from $->size, not $->header.size.
Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
(xreload, hook-run, hookpost-run): Remove.
* src/emacs.c: Include <verify.h>.
(gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
(gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
Remove.
(gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
(gdb_USE_LSB_TAG): New enum constants.
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
Also define these as enum constants, so they're visible to GDB.
(ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
as constants, so they're visible to GDB.
* src/lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
(PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
Now enum constants, not macros, so they're visible to GDB.
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
more convenient now.  All uses changed.
(VALMASK) [USE_LSB_TAG]: Also define in this case.
* src/mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.

12 years agoExplicitly free restriction data that are not needed anymore.
Dmitry Antipov [Thu, 26 Jul 2012 05:23:25 +0000 (09:23 +0400)]
Explicitly free restriction data that are not needed anymore.
* editfns.c (save_restriction_restore): Free restriction data.

12 years ago* lisp/mouse.el (popup-menu): Fix last change.
Stefan Monnier [Thu, 26 Jul 2012 01:29:24 +0000 (21:29 -0400)]
* lisp/mouse.el (popup-menu): Fix last change.

12 years agoAutoload more carefully from Lisp. Follow aliases for function properties.
Stefan Monnier [Thu, 26 Jul 2012 01:27:33 +0000 (21:27 -0400)]
Autoload more carefully from Lisp.  Follow aliases for function properties.
* lisp/subr.el (autoloadp): New function.
(symbol-file): Use it.
(function-get): New function.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and
autoload-do-load.
* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function)
(lisp-indent-function):
* lisp/emacs-lisp/gv.el (gv-get):
* lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
* lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form):
Use function-get.
* lisp/emacs-lisp/cl.el: Don't propagate function properties any more.

* src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
add argument, tune behavior, and adjust all callers.

* lisp/speedbar.el (speedbar-add-localized-speedbar-support):
* lisp/emacs-lisp/disass.el (disassemble-internal):
* lisp/desktop.el (desktop-load-file):
* lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name)
(describe-function-1):
* lisp/emacs-lisp/find-func.el (find-function-noselect):
* lisp/emacs-lisp/elp.el (elp-instrument-function):
* lisp/emacs-lisp/advice.el (ad-has-proper-definition):
* lisp/apropos.el (apropos-safe-documentation, apropos-macrop):
* lisp/emacs-lisp/debug.el (debug-on-entry):
* lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.

12 years ago* international/mule-cmds.el (ucs-insert): Mark it as an obsolete
Alp Aker [Wed, 25 Jul 2012 23:11:23 +0000 (19:11 -0400)]
* international/mule-cmds.el (ucs-insert): Mark it as an obsolete
  function, not an obsolete variable (Bug#12046).

12 years agoUse typedef for EMACS_INT, EMACS_UINT.
Paul Eggert [Wed, 25 Jul 2012 22:47:42 +0000 (15:47 -0700)]
Use typedef for EMACS_INT, EMACS_UINT.

* lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
than macros.  This simplifies debugging in the usual case, since
it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
and it allows expressions involving EMACS_INT casts.
* .gdbinit (xreload): Simplify by using EMACS_INT cast.

12 years agognus-art.el (gnus-kill-sticky-article-buffers): Reintroduce
Julien Danjou [Wed, 25 Jul 2012 22:10:37 +0000 (22:10 +0000)]
gnus-art.el (gnus-kill-sticky-article-buffers): Reintroduce

12 years ago* nsterm.m (ns_read_socket): Return early if there is a modal window.
Jan Djärv [Wed, 25 Jul 2012 17:31:34 +0000 (19:31 +0200)]
* nsterm.m (ns_read_socket): Return early if there is a modal window.

Fixes: debbugs:12043
12 years agoFixes: debbugs:12042
Andreas Schwab [Wed, 25 Jul 2012 10:46:59 +0000 (12:46 +0200)]
Fixes: debbugs:12042
* faces.el (face-spec-reset-face): Fix last change.

12 years agoIn pp-display-expression select old selected window only if it is still live (Bug...
Christopher Schmidt [Wed, 25 Jul 2012 09:43:12 +0000 (11:43 +0200)]
In pp-display-expression select old selected window only if it is still live (Bug#12034).

* emacs-lisp/pp.el (pp-display-expression): Select old selected
window only if it is still live (Bug#12034).

12 years agoAdd advertised calling convention for redirect-frame-focus (Bug#12030).
Martin Rudalics [Wed, 25 Jul 2012 09:34:48 +0000 (11:34 +0200)]
Add advertised calling convention for redirect-frame-focus (Bug#12030).

* frame.c (Fredirect_frame_focus): In doc-string don't mention
that FOCUS-FRAME can be omitted.

* subr.el (redirect-frame-focus): Add advertised calling
convention (Bug#12030).

12 years agoPrefer typical American spelling for "acknowledgment".
Paul Eggert [Wed, 25 Jul 2012 05:48:19 +0000 (22:48 -0700)]
Prefer typical American spelling for "acknowledgment".

12 years agoAdjust buffer text indirection counters at the end of Fkill_buffer.
Dmitry Antipov [Wed, 25 Jul 2012 05:09:02 +0000 (09:09 +0400)]
Adjust buffer text indirection counters at the end of Fkill_buffer.
* buffer.c (Fkill_buffer): Adjust indirection counters when the
buffer is definitely dead.  This should really fix an issue reported
by Christoph Scholtes again.  (Bug#12007).
(init_buffer_once): Initialize indirection counters of
buffer_defaults and buffer_local_symbols (for sanity and safety).

12 years agonnimap.el (nnimap-get-responses): Don't remove, still used
Katsumi Yamaoka [Wed, 25 Jul 2012 03:22:25 +0000 (03:22 +0000)]
nnimap.el (nnimap-get-responses): Don't remove, still used

12 years agocalc-alg.el (math-simplify-divide): Don't cross multiply
Jay Belanger [Wed, 25 Jul 2012 02:38:36 +0000 (21:38 -0500)]
calc-alg.el (math-simplify-divide): Don't cross multiply
in an equation when the lhs is a variable.

12 years agoMerge changes made in Gnus master; Remove dead code
Julien Danjou [Tue, 24 Jul 2012 22:17:17 +0000 (22:17 +0000)]
Merge changes made in Gnus master; Remove dead code

* mail-source.el (mail-source-movemail-and-remove): Remove, unused.
* nntp.el (nntp-send-nosy-authinfo, nntp-send-authinfo-from-file)
  (nntp-async-timer-handler): Remove, unused.
* nnimap.el (nnimap-get-responses): Remove, unused.
* nnheader.el (mail-header-set-extra): Remove, unused.
* netrc.el (netrc-find-service-number, netrc-store-data): Remove,
  unused.
* mm-view.el (mm-view-sound-file): Remove, unused.
* mm-url.el (mm-url-fetch-simple, mm-url-fetch-form)
  (mm-url-encode-multipart-form-data): Remove, unused.
* message.el (message-remove-signature, message-make-host-name)
  (message-fill-address): Remove, unused.
* gnus.el (gnus-writable-groups, gnus-group-guess-prefixed-name)
  (gnus-group-guess-full-name, gnus-group-guess-prefixed-name): Remove,
  unused.
* gnus-uu.el (gnus-uu-find-name-in-shar): Remove, unused.
* gnus-util.el (gnus-extract-address-component-name)
  (gnus-extract-address-component-email, gnus-sortable-date)
  (gnus-alist-to-hashtable, gnus-hashtable-to-alist)
  (gnus-process-live-p): Remove, unused.
* gnus-topic.el (gnus-group-parent-topic): Remove, unused.
* gnus-sum.el (gnus-score-set-default, gnus-article-parent-p)
  (gnus-article-read-p, gnus-uncompress-marks): Remove, unused.
  (gnus-summary-set-current-mark): Remove obsolete, empty and unused
  function.
* gnus-start.el (gnus-kill-newsgroup): Remove unused obsolete function.
* gnus-score.el (gnus-summary-score-crossposting)
  (gnus-score-regexp-bad-p): Remove, unused.
* gnus-salt.el (gnus-tree-goto-article): Remove, unused.
* gnus-range.el (gnus-sublist-p): Remove, unused.
* gnus-msg.el (gnus-mail-parse-comma-list, gnus-put-message): Remove,
  unused.
* gnus-kill.el (gnus-Newsgroup-kill-file): Remove, unused.
* gnus-int.el (gnus-list-active-group, gnus-request-group-articles)
  (gnus-request-associate-buffer): Remove, unused.
* gnus-group.el (gnus-group-set-method-info)
  (gnus-group-set-params-info): Remove, unused.
* gnus-fun.el (gnus-shell-command-to-string)
  (gnus-shell-command-on-region): Remove, unused.
* gnus-cite.el (gnus-cited-line-p): Remove, unused.
* gnus-art.el (gnus-article-text-type-exists-p)
  (article-translate-characters, gnus-article-hide-text-of-type)
  (gnus-kill-sticky-article-buffers, gnus-article-maybe-highlight):
  Remove, unused.

12 years agoFix display of tooltips damaged by enhancements for bug #11832.
Eli Zaretskii [Tue, 24 Jul 2012 16:34:15 +0000 (19:34 +0300)]
Fix display of tooltips damaged by enhancements for bug #11832.

 src/xdisp.c (init_iterator): Don't compute dimensions of truncation
 and continuation glyphs on tooltip frames, leave them at zero.
 Avoids displaying continued lines in tooltips.

12 years agoSimplify copy_overlay.
Dmitry Antipov [Tue, 24 Jul 2012 06:45:44 +0000 (10:45 +0400)]
Simplify copy_overlay.
* buffer.c (copy_overlay): Simplify, use build_marker.
* lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.

12 years agoFix displaying the user name in error message about no home directory.
Eli Zaretskii [Mon, 23 Jul 2012 17:27:41 +0000 (20:27 +0300)]
Fix displaying the user name in error message about no home directory.

 lisp/startup.el (command-line): Don't display an empty user name in
 the error message about non-existent home directory, when
 init-file-user was set to an empty string.  See
 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00835.html
 for the details and context.

12 years agoFix bug #12025 with a crash when displaying tooltips.
Eli Zaretskii [Mon, 23 Jul 2012 16:57:20 +0000 (19:57 +0300)]
Fix bug #12025 with a crash when displaying tooltips.

 src/print.c (print_object): Don't crash when a frame's name is nil
 or invalid.
 src/window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
 it signals an error when a tooltip frame is being created.

12 years agonnir.el ("nnir"): Revert last change, that's premature to merge from Gnus master
Katsumi Yamaoka [Mon, 23 Jul 2012 11:26:29 +0000 (11:26 +0000)]
nnir.el ("nnir"): Revert last change, that's premature to merge from Gnus master

12 years agoCleanup miscellaneous objects allocation and initialization.
Dmitry Antipov [Mon, 23 Jul 2012 11:15:43 +0000 (15:15 +0400)]
Cleanup miscellaneous objects allocation and initialization.
* alloc.c (allocate_misc): Change to static.  Add argument to
specify the subtype.  Adjust comment and users.
(build_overlay): New function.
* buffer.c (copy_overlays, Fmake_overlay): Use it.
* lisp.h (struct Lisp_Overlay): Remove obsolete comment.
(allocate_misc): Remove prototype.
(build_overlay): Add prototype.

12 years agonnir.el ("nnir"): Add 'virtual ability to nnir backend
Andrew Cohen [Mon, 23 Jul 2012 11:10:23 +0000 (11:10 +0000)]
nnir.el ("nnir"): Add 'virtual ability to nnir backend

12 years agoSwap buffer text indirection counters in Fbuffer_swap_text.
Dmitry Antipov [Mon, 23 Jul 2012 07:14:58 +0000 (11:14 +0400)]
Swap buffer text indirection counters in Fbuffer_swap_text.
* buffer.c (Fbuffer_swap_text): Swap indirections too.
This avoids crash reported by Christoph Scholtes at
http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.

12 years ago* ses.el (ses-cell-formula-aset): New macro.
Vincent Belaïche [Sun, 22 Jul 2012 21:14:12 +0000 (23:14 +0200)]
* ses.el (ses-cell-formula-aset): New macro.
(ses-cell-references-aset): New macro.
(ses-cell-p): New function.
(ses-rename-cell): Do no longer rely on complex operations like
ses-cell-set-formula or ses-set-cell to change the cell and handle
the undo at the same time, but rather use lower level new macros
`ses-cell-formula-aset' and `ses-cell-references-aset' and handle
the undo directly. Refresh the mode line.

12 years ago* nsmenu.m (Popdown_data): New struct.
Jan Djärv [Sun, 22 Jul 2012 16:35:15 +0000 (18:35 +0200)]
* nsmenu.m (Popdown_data): New struct.
(pop_down_menu): p->pointer is Popdown_data.  Release the pool and
free Popdown_data.
(ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
(initWithContentRect): Make imgView and contentView non-static
and autorelease them.  Also autorelease img and matrix.
(dealloc): Remove (Bug#1995-05-29T20:16:10Z!kwzh@gnu.org).

12 years agoAdjust consing_since_gc when objects are explicitly freed.
Dmitry Antipov [Sun, 22 Jul 2012 15:13:50 +0000 (19:13 +0400)]
Adjust consing_since_gc when objects are explicitly freed.
* alloc.c (GC_DEFAULT_THRESHOLD): New macro.
(Fgarbage_collect): Use it.  Change minimum to 1/10 of default.
(free_cons, free_misc): Subtract object size from consing_since_gc.

12 years agoSimplify and cleanup markers positioning code.
Dmitry Antipov [Sun, 22 Jul 2012 05:37:24 +0000 (09:37 +0400)]
Simplify and cleanup markers positioning code.
* marker.c (attach_marker): More useful eassert.
(live_buffer, set_marker_internal): New function.
(Fset_marker, set_marker_restricted): Use set_marker_internal.
(set_marker_both, set_marker_restricted_both): Use live_buffer.

12 years agoMerge from gnulib (comment changes only).
Paul Eggert [Sun, 22 Jul 2012 04:16:53 +0000 (21:16 -0700)]
Merge from gnulib (comment changes only).

12 years agoSpelling fixes.
Paul Eggert [Sun, 22 Jul 2012 04:11:49 +0000 (21:11 -0700)]
Spelling fixes.

12 years ago* buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
Paul Eggert [Sun, 22 Jul 2012 03:44:35 +0000 (20:44 -0700)]
* buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,

as it's limited by the amount of memory, not by INT_MAX.

12 years agoFix previous change in w32menu.c.
Eli Zaretskii [Sat, 21 Jul 2012 19:26:25 +0000 (22:26 +0300)]
Fix previous change in w32menu.c.

12 years agoImprove documentation of special events and of the "e" interactive spec.
Eli Zaretskii [Sat, 21 Jul 2012 14:48:17 +0000 (17:48 +0300)]
Improve documentation of special events and of the "e" interactive spec.

 doc/lispref/commands.texi (Special Events): Mention language-change event.
 (Input Events, Interactive Codes):
 doc/lispref/keymaps.texi (Key Sequences): Mention events that are
 non-keyboard but also non-mouse events.

12 years agoBind language-change in special-event-map.
Eli Zaretskii [Sat, 21 Jul 2012 14:11:33 +0000 (17:11 +0300)]
Bind language-change in special-event-map.

 src/keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
 in special-event-map.  See the discussion at
 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
 for the reasons.

12 years agoFix data type casting when setting up menus on Windows.
Eli Zaretskii [Sat, 21 Jul 2012 13:33:32 +0000 (16:33 +0300)]
Fix data type casting when setting up menus on Windows.

 src/w32menu.c (add_menu_item): Cast to UINT_PTR when assigning
 info.dwItemData.  Fixes crashes on 64-bit Windows.  Suggested by
 Fabrice Popineau <fabrice.popineau@supelec.fr>.

12 years ago* nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
Jan Djärv [Sat, 21 Jul 2012 12:10:49 +0000 (14:10 +0200)]
* nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.

12 years ago* nsterm.m (conversationIdentifier): Return value is NSInteger.
Jan Djärv [Sat, 21 Jul 2012 11:34:19 +0000 (13:34 +0200)]
* nsterm.m (conversationIdentifier): Return value is NSInteger.

12 years agoerc-notifications: new file
Julien Danjou [Sat, 21 Jul 2012 11:08:32 +0000 (13:08 +0200)]
erc-notifications: new file

12 years agolisp/gnus/message.el: Replace deprecated rmail vars
Julien Danjou [Sat, 21 Jul 2012 11:05:32 +0000 (11:05 +0000)]
lisp/gnus/message.el: Replace deprecated rmail vars

12 years ago* nsterm.m (accessibilityAttributeValue): New function..
Jan Djärv [Sat, 21 Jul 2012 10:23:21 +0000 (12:23 +0200)]
* nsterm.m (accessibilityAttributeValue): New function..

Fixes: debbugs:11134
12 years agoDisallow windows on dead frames in decode_any_window.
Chong Yidong [Sat, 21 Jul 2012 06:17:30 +0000 (14:17 +0800)]
Disallow windows on dead frames in decode_any_window.

* window.c (decode_any_window): Signal an error if the window is
on a dead frame.

Fixes: debbugs:11984
12 years agoMerge from emacs-24 branch; up to 2012-05-01T10:20:43Z!rgm@gnu.org
Chong Yidong [Sat, 21 Jul 2012 06:13:23 +0000 (14:13 +0800)]
Merge from emacs-24 branch; up to 2012-05-01T10:20:43Z!rgm@gnu.org

12 years agoUse match-string-no-properties instead in c-defun-name
Leo Liu [Sat, 21 Jul 2012 01:41:48 +0000 (09:41 +0800)]
Use match-string-no-properties instead in c-defun-name

for consistency.

12 years ago* lisp/progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly.
Leo Liu [Fri, 20 Jul 2012 21:18:52 +0000 (05:18 +0800)]
* lisp/progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly.

Fixes: debbugs:7879
12 years ago* ses.el (ses-rename-cell): Set new name also in reference list of cells of which...
Vincent Belaïche [Fri, 20 Jul 2012 21:09:04 +0000 (23:09 +0200)]
* ses.el (ses-rename-cell): Set new name also in reference list of cells of which the renamed cell depends.

12 years agoBackport: Recognize Objective-C methods also in c-defun-name
Jan Djärv [Fri, 20 Jul 2012 19:59:49 +0000 (03:59 +0800)]
Backport: Recognize Objective-C methods also in c-defun-name

Fixes: debbugs:7879
12 years agoAdd indirection counting to speed up Fkill_buffer.
Dmitry Antipov [Fri, 20 Jul 2012 16:05:47 +0000 (20:05 +0400)]
Add indirection counting to speed up Fkill_buffer.
* buffer.h (struct buffer): New member.
* buffer.c (Fget_buffer_create): Set indirection counter to 0.
(Fmake_indirect_buffer): Set indirection counter to -1, increment
base buffer indirection counter.
(compact_buffer): If ENABLE_CHECKING, verify indirection counters.
(Fkill_buffer): Adjust indirection counters as needed, don't walk
through buffer list if indirection counter is 0.

12 years agoExtend the value returned by Fgarbage_collect with heap statistics.
Dmitry Antipov [Fri, 20 Jul 2012 14:07:28 +0000 (18:07 +0400)]
Extend the value returned by Fgarbage_collect with heap statistics.
* alloc.c (Qheap): New symbol.
(syms_of_alloc): DEFSYM it.
(Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
(Fmemory_free): Remove.
(syms_of_alloc): Don't defsubr it.
* buffer.c (Fcompact_buffer): Remove.
(syms_of_buffer): Don't defsubr it.

12 years agoMake maybe_gc inline.
Dmitry Antipov [Fri, 20 Jul 2012 13:14:58 +0000 (17:14 +0400)]
Make maybe_gc inline.
Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
* lisp.h (consing_since_gc, gc_relative_threshold)
(memory_full_cons_threshold): Revert declaration.
(maybe_gc): Remove prototype, define as inline.
* alloc.c: Remove old commented-out code.
(consing_since_gc, gc_relative_threshold)
(memory_full_cons_threshold): Revert to global.
(maybe_gc): Remove.

12 years ago* progmodes/cc-langs.el (c-symbol-start): Include char _.
Leo Liu [Fri, 20 Jul 2012 11:36:41 +0000 (19:36 +0800)]
* progmodes/cc-langs.el (c-symbol-start): Include char _.

Fixes: debbugs:11986
12 years ago* lisp/term/x-win.el (x-menu-bar-open): Use `frame-parameter'
Masatake YAMATO [Fri, 20 Jul 2012 11:32:30 +0000 (07:32 -0400)]
* lisp/term/x-win.el (x-menu-bar-open): Use `frame-parameter'
to check whether menu-bar is shown or not.  If not shown,
show the menu-bar as a popup menu instead of using tmm.
* lisp/mouse.el (popup-menu): Accept `point' as `position' argument.

12 years ago* lisp/progmodes/ruby-mode.el (ruby-parse-partial): No error when end
Dmitry Gutov [Fri, 20 Jul 2012 11:10:25 +0000 (07:10 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-parse-partial): No error when end
up inside string symbol literal.
* test/automated/ruby-mode-tests.el: New file with one test.

Fixes: debbugs:11923
12 years agoFix display of Hebrew tutorial title on splash screen.
Eli Zaretskii [Fri, 20 Jul 2012 10:29:32 +0000 (13:29 +0300)]
Fix display of Hebrew tutorial title on splash screen.

 lisp/startup.el (fancy-startup-text): Read the whole tutorial, not
 just its first 256 bytes.  Prevents gibberish in display of the
 tutorial title.
 etc/tutorials/TUTORIAL.he: Make the first sentence display correctly
 in a left-to-right paragraph, such as what is shown on the fancy
 splash screen, by using directional control characters.

12 years agoSimple wrapper for make_unibyte_string, adjust font_open_by_name.
Dmitry Antipov [Fri, 20 Jul 2012 07:29:04 +0000 (11:29 +0400)]
Simple wrapper for make_unibyte_string, adjust font_open_by_name.
* src/lisp.h (build_unibyte_string): New function.
* src/dosfns.c, src/fileio.c, src/fns.c, src/ftfont.c, src/process.c:
* src/sysdep.c, src/w32fns.c, src/xfns.c: Use it.
* src/font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
of type Lisp_Object to avoid redundant calls to make_unibyte_string.
Adjust users accordingly.
* src/font.h (font_open_by_name): Adjust prototype.
* admin/coccinelle/unibyte_string.cocci: Semantic patch to convert from
make_unibyte_string to build_unibyte_string where appropriate.

12 years agoCleanup calls to Fgarbage_collect.
Dmitry Antipov [Fri, 20 Jul 2012 05:28:00 +0000 (09:28 +0400)]
Cleanup calls to Fgarbage_collect.
* lisp.h (maybe_gc): New prototype.
(consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
Remove declarations.
* alloc.c (maybe_gc): New function.
(consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
Make them static.
* bytecode.c (MAYBE_GC): Use maybe_gc.
* eval.c (eval_sub, Ffuncall): Likewise.
* keyboard.c (read_char): Likewise.  Adjust call to maybe_gc
to avoid dependency from auto-save feature.

12 years agoDrop idle buffer compaction due to an absence of the
Dmitry Antipov [Fri, 20 Jul 2012 04:13:04 +0000 (08:13 +0400)]
Drop idle buffer compaction due to an absence of the
proved efficiency.
* lisp/compact.el: Remove.

12 years ago* buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
Paul Eggert [Thu, 19 Jul 2012 22:35:58 +0000 (15:35 -0700)]
* buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.

(FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
'for_each_per_buffer_object_at'.
All uses changed.  It's better to use upper-case for macros that
cannot be implemented as functions, to give the reader a clue
that they're special.

12 years ago* lisp/vc/vc-dispatcher.el (vc-compilation-mode): Add, based on
Sam Steingold [Thu, 19 Jul 2012 14:38:01 +0000 (10:38 -0400)]
* lisp/vc/vc-dispatcher.el (vc-compilation-mode): Add, based on
vc-bzr-pull & vc-bzr-merge-branch.
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): Use it.
(vc-bzr-error-regexp-alist): Rename from vc-bzr-error-regex-alist
for consistency with compilation-error-regexp-alist.
* lisp/vc/vc-git.el (vc-git-error-regexp-alist): Add.
(vc-git-pull, vc-git-merge-branch): Call vc-compilation-mode.
* lisp/vc/vc-hg.el (vc-hg-error-regexp-alist): Add.
(vc-hg-pull, vc-hg-merge-branch): Call vc-compilation-mode.

12 years ago* lisp/emacs-lisp/chart.el: Use lexical-binding.
Stefan Monnier [Thu, 19 Jul 2012 11:39:38 +0000 (07:39 -0400)]
* lisp/emacs-lisp/chart.el: Use lexical-binding.
(chart-emacs-storage): Don't hardcode the list of entries.
* src/alloc.c (Fgarbage_collect): Tweak docstring.

12 years agoTweak the value returned from Fgarbage_collect again.
Dmitry Antipov [Thu, 19 Jul 2012 09:50:01 +0000 (13:50 +0400)]
Tweak the value returned from Fgarbage_collect again.
* src/alloc.c (Fgarbage_collect): New return value, as confirmed in
http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
Adjust documentation.
(total_vector_bytes): Rename to total_vector_slots, adjust
accounting.
(total_free_vector_bytes): Rename to total_free_vector_slots,
adjust accounting.
(Qstring_bytes, Qvector_slots): New symbols.
(syms_of_alloc): DEFSYM them.
* lisp/emacs-lisp/chart.el (chart-emacs-storage): Adjust again.

12 years agoCompact buffers when idle.
Dmitry Antipov [Thu, 19 Jul 2012 08:56:53 +0000 (12:56 +0400)]
Compact buffers when idle.
* lisp/compact.el: New file.
* src/buffer.c (compact_buffer, Fcompact_buffer): New function.
(syms_of_buffer): Register Fcompact_buffer.
* src/alloc.c (Fgarbage_collect): Use compact_buffer.
* src/buffer.h (compact_buffer): New prototype.
(struct buffer_text): New member.

12 years ago* lisp/subr.el (eventp): Presume that if it looks vaguely like an event,
Stefan Monnier [Thu, 19 Jul 2012 06:24:04 +0000 (02:24 -0400)]
* lisp/subr.el (eventp): Presume that if it looks vaguely like an event,
it's an event.

Fixes: debbugs:10190
12 years agoNew macro to iterate over all buffers, miscellaneous cleanups.
Dmitry Antipov [Thu, 19 Jul 2012 03:55:59 +0000 (07:55 +0400)]
New macro to iterate over all buffers, miscellaneous cleanups.
* lisp.h (all_buffers): Remove declaration.
* buffer.h (all_buffers): Add declaration, with comment.
(for_each_buffer): New macro.
* alloc.c (Fgarbage_collect, mark_object): Use it.
* buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
(init_buffer): Likewise.
* data.c (Fset_default): Likewise.
* coding.c (code_conversion_restore): Remove redundant check
for dead buffer.
* buffer.c (Fkill_buffer): Likewise.  Remove obsolete comment.

12 years agoAvoid two crashes involving windows on dead frames.
Chong Yidong [Thu, 19 Jul 2012 03:33:08 +0000 (11:33 +0800)]
Avoid two crashes involving windows on dead frames.

* window.c (Fwindow_absolute_pixel_edges)
(Fdelete_other_windows_internal): Signal an error if the window is
on a dead frame.

Fixes: debbugs:11984
12 years ago* emacs.texi: Update ISBN.
Chong Yidong [Thu, 19 Jul 2012 01:15:06 +0000 (09:15 +0800)]
* emacs.texi: Update ISBN.

12 years agoEnhancements to ppss related code (thanks Stefan).
Fabián Ezequiel Gallina [Thu, 19 Jul 2012 00:55:55 +0000 (21:55 -0300)]
Enhancements to ppss related code (thanks Stefan).
* progmodes/python.el (python-indent-context)
(python-indent-calculate-indentation, python-indent-dedent-line)
(python-indent-electric-colon, python-nav-forward-block)
(python-mode-abbrev-table)
(python-info-assignment-continuation-line-p): Simplified checks
for ppss context.
(python-info-continuation-line-p): Cleanup.
(python-info-ppss-context): Do not catch 'quote.
(python-info-ppss-context-type)
(python-info-ppss-comment-or-string-p): Simplify.

12 years agoFix bug that created negative-length intervals.
Andreas Schwab [Wed, 18 Jul 2012 21:33:37 +0000 (14:33 -0700)]
Fix bug that created negative-length intervals.

* intervals.c (merge_interval_right, merge_interval_left):
Do not zero out this interval if it is absorbed by its children,
as this interval's total length doesn't change in that case.  See
<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.

12 years agoprogmodes/python.el: Set file local vars at end of file and clean tabs.
Fabián Ezequiel Gallina [Wed, 18 Jul 2012 19:04:06 +0000 (16:04 -0300)]
progmodes/python.el: Set file local vars at end of file and clean tabs.

12 years ago* progmodes/python.el: Enhancements to eldoc support.
Fabián Ezequiel Gallina [Wed, 18 Jul 2012 18:40:03 +0000 (15:40 -0300)]
* progmodes/python.el: Enhancements to eldoc support.
(python-info-current-symbol): New function.
(python-eldoc-at-point): Use python-info-current-symbol.
(python-info-current-defun): Fix cornercase on first defun scan.
(python-eldoc--get-doc-at-point): Use python-info-current-symbol
and signal error when no inferior python process is available.

12 years ago* alloc.c (Fmake_bool_vector): Fix off-by-8 bug
Paul Eggert [Wed, 18 Jul 2012 17:29:34 +0000 (10:29 -0700)]
* alloc.c (Fmake_bool_vector): Fix off-by-8 bug

when invoking (make-bool-vector N t) and N is a positive
multiple of 8 -- the last 8 bits were mistakenly cleared.

12 years agoRemove some struct layout assumptions in bool vectors.
Paul Eggert [Wed, 18 Jul 2012 17:26:43 +0000 (10:26 -0700)]
Remove some struct layout assumptions in bool vectors.

* alloc.c (bool_header_size): New constant.
(header_size, word_size): Move earlier, as they're now used earlier.
Use 'word_size' in a few more places, where it's appropriate.
(Fmake_bool_vector, sweep_vectors): Don't assume that there is no
padding before the data member of a bool vector.
(sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
than doing the check by hand with an abort ().

12 years ago* src/eval.c (Fdefvar): Don't check constants since we only set the var if
Stefan Monnier [Wed, 18 Jul 2012 15:20:33 +0000 (11:20 -0400)]
* src/eval.c (Fdefvar): Don't check constants since we only set the var if
it's not yet defined anyway.

Fixes: debbugs:11904
12 years ago* vc/vc-git.el (vc-git-state): Don't call `vc-git-registered',
Dmitry Gutov [Wed, 18 Jul 2012 15:04:36 +0000 (17:04 +0200)]
* vc/vc-git.el (vc-git-state): Don't call `vc-git-registered',
assume it's always t.
(vc-git-registered): Remove caching, the function is only called
once.
(vc-git-branches): Use `vc-git--call' instead of `call-process'.

12 years agoFix last commit.
Chong Yidong [Wed, 18 Jul 2012 14:48:25 +0000 (22:48 +0800)]
Fix last commit.

12 years ago* subr.el (last-input-char, last-command-char): Remove.
Chong Yidong [Wed, 18 Jul 2012 14:46:32 +0000 (22:46 +0800)]
* subr.el (last-input-char, last-command-char): Remove.

Fixes: debbugs:9195
12 years ago* simple.el (count-words): Report on narrowing.
Chong Yidong [Wed, 18 Jul 2012 14:29:34 +0000 (22:29 +0800)]
* simple.el (count-words): Report on narrowing.

Fixes: debbugs:9959
12 years ago* lisp/bindings.el: Bind M-= to count-words.
Chong Yidong [Wed, 18 Jul 2012 14:17:49 +0000 (22:17 +0800)]
* lisp/bindings.el: Bind M-= to count-words.

12 years ago* faces.el (face-spec-reset-face): Handle reverse video.
Chong Yidong [Wed, 18 Jul 2012 14:00:09 +0000 (22:00 +0800)]
* faces.el (face-spec-reset-face): Handle reverse video.

Fixes: debbugs:4238
12 years ago* lisp/progmodes/sh-script.el (sh-imenu-generic-expression):
Masatake YAMATO [Wed, 18 Jul 2012 13:40:57 +0000 (09:40 -0400)]
* lisp/progmodes/sh-script.el (sh-imenu-generic-expression):
Capture a function with `function' keyword and without parentheses
like "function FOO".

Fixes: debbugs:11856
12 years ago* subr.el (keyboard-translate): Doc fix.
Chong Yidong [Wed, 18 Jul 2012 13:31:16 +0000 (21:31 +0800)]
* subr.el (keyboard-translate): Doc fix.

Fixes: debbugs:7261
12 years ago* src/lisp.h (last_undo_boundary): Declare new var.
Stefan Monnier [Wed, 18 Jul 2012 13:20:59 +0000 (09:20 -0400)]
* src/lisp.h (last_undo_boundary): Declare new var.
* src/keyboard.c (command_loop_1): Set it.
* src/cmds.c (Fself_insert_command): Use it to only remove boundaries that
were auto-added by the command loop.

Fixes: debbugs:11774
12 years ago* lisp/userlock.el, emacs-lisp/map-ynp.el: Declare part of `emacs' package.
Stefan Monnier [Wed, 18 Jul 2012 11:44:13 +0000 (07:44 -0400)]
* lisp/userlock.el, emacs-lisp/map-ynp.el: Declare part of `emacs' package.
* lisp/progmodes/bug-reference.el, lisp/misearch.el: Provide themselves.

Fixes: debbugs:11915
12 years agognus/{sieve-mode,sieve}.el: Close buffers by default
Julien Danjou [Wed, 18 Jul 2012 10:38:37 +0000 (10:38 +0000)]
gnus/{sieve-mode,sieve}.el: Close buffers by default

12 years ago* w32font.c (Qsymbol): Remove local definition.
Andreas Schwab [Wed, 18 Jul 2012 10:12:43 +0000 (12:12 +0200)]
* w32font.c (Qsymbol): Remove local definition.
(syms_of_w32font): Don't DEFSYM it.

12 years ago* window.el (split-window-sensibly): Make WINDOW argument
Tassilo Horn [Wed, 18 Jul 2012 10:02:54 +0000 (12:02 +0200)]
* window.el (split-window-sensibly): Make WINDOW argument
optional.

12 years agoFix sweep_vectors to handle large bool vectors correctly.
Dmitry Antipov [Wed, 18 Jul 2012 09:46:07 +0000 (13:46 +0400)]
Fix sweep_vectors to handle large bool vectors correctly.
* alloc.c (sweep_vectors): Account total_vector_bytes for
bool vectors larger than VBLOCK_BYTES_MAX.

12 years ago* lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
Stefan Monnier [Wed, 18 Jul 2012 09:33:09 +0000 (05:33 -0400)]
* lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
of narrowed buffer.

Fixes: debbugs:11966
12 years agoFix usage of C-x 8 key translations in Isearch.
Chong Yidong [Wed, 18 Jul 2012 09:27:23 +0000 (17:27 +0800)]
Fix usage of C-x 8 key translations in Isearch.

* lisp/isearch.el (isearch-mode-map): Handle C-x 8 key translations,
and make C-x 8 RET exit isearch.

* lisp/international/iso-transl.el: Move isearch-mode-map key
definitions to isearch.el.

Fixes: debbugs:11439
12 years agoRevert bogus change in 2011-07-28T21:49:16Z!eggert@cs.ucla.edu.
Chong Yidong [Wed, 18 Jul 2012 08:11:08 +0000 (16:11 +0800)]
Revert bogus change in 2011-07-28T21:49:16Z!eggert@cs.ucla.edu.

* src/frame.c (x_set_frame_parameters): Revert bogus change introduced
in 2012-05-25 commit by Paul Eggert.

Fixes: debbugs:11738
12 years ago* lisp/emacs-lisp/eieio.el: Adapt further to gv.el.
Stefan Monnier [Wed, 18 Jul 2012 07:20:04 +0000 (03:20 -0400)]
* lisp/emacs-lisp/eieio.el: Adapt further to gv.el.
(eieio-defclass): Use gv-define-setter when possible.

Fixes: debbugs:11970
12 years agoReturn more descriptive data from Fgarbage_collect.
Dmitry Antipov [Wed, 18 Jul 2012 05:44:36 +0000 (09:44 +0400)]
Return more descriptive data from Fgarbage_collect.
Suggested by Stefan Monnier in
http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
* src/alloc.c (bounded_number): New function.
(total_buffers, total_vectors): New variable.
(total_string_size): Rename to total_string_bytes, adjust users.
(total_vector_size): Rename to total_vector_bytes, adjust users.
(sweep_vectors): Account total_vectors and total_vector_bytes.
(Fgarbage_collect): New return value.  Adjust documentation.
(gc_sweep): Account total_buffers.
(Fmemory_free, Fmemory_use_counts): Use bounded_number.
(VECTOR_SIZE): Remove.
* src/data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
(Qinterval, Qmisc): New symbols.
(syms_of_data): Initialize them.
* src/lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
(Qcons, Qbuffer): New declarations.
* lisp/emacs-lisp/chart.el (chart-emacs-storage): Change to
reflect new format of data returned by Fgarbage_collect.

12 years agoNew utility functions + python-info-ppss-context fix.
Fabián Ezequiel Gallina [Tue, 17 Jul 2012 20:27:49 +0000 (17:27 -0300)]
New utility functions + python-info-ppss-context fix.
* progmodes/python.el (python-info-beginning-of-block-statement-p)
(python-info-ppss-comment-or-string-p): New functions.
(python-info-ppss-context): Small fix for string check.

Fixes: debbugs:11910
12 years ago* lisp/dired-aux.el (dired-do-async-shell-command): Doc fix.
Juri Linkov [Tue, 17 Jul 2012 18:40:15 +0000 (21:40 +0300)]
* lisp/dired-aux.el (dired-do-async-shell-command): Doc fix.
(dired-do-async-shell-command): Don't add `*' at the end of the
command (Bug#11815).
(dired-do-shell-command): Doc fix.
(dired-shell-stuff-it): Strip the trailing "&" and ";" if any.
Join the individual commands using either "&" or ";" as the
separator depending on the values of these trailing characters.
At the end re-add the trailing "&".  (Bug#10598)

* lisp/simple.el (async-shell-command): Sync the interactive spec with
`shell-command'.  Doc fix.
(shell-command): Doc fix.

12 years ago* lisp/descr-text.el (describe-char): Fix format args.
Juri Linkov [Tue, 17 Jul 2012 18:15:02 +0000 (21:15 +0300)]
* lisp/descr-text.el (describe-char): Fix format args.

Fixes: debbugs:10129
12 years agoFinal renames and doc fixes for movement commands.
Fabián Ezequiel Gallina [Tue, 17 Jul 2012 18:02:53 +0000 (15:02 -0300)]
Final renames and doc fixes for movement commands.
* progmodes/python.el (python-nav-beginning-of-statement): Rename
from python-nav-statement-start.
(python-nav-end-of-statement): Rename from
python-nav-statement-end.
(python-nav-beginning-of-block): Rename from
python-nav-block-start.
(python-nav-end-of-block): Rename from python-nav-block-end.

Fixes: debbugs:11899
12 years ago* progmodes/python.el (python-shell-send-string-no-output): Allow
Fabián Ezequiel Gallina [Tue, 17 Jul 2012 16:47:58 +0000 (13:47 -0300)]
* progmodes/python.el (python-shell-send-string-no-output): Allow
accept-process-output to quit, keeping shell process ready for
future interactions.

Fixes: debbugs:11868
12 years ago* alloc.c (Fmemory_free): Account for memory-free's own storage.
Paul Eggert [Tue, 17 Jul 2012 16:24:57 +0000 (09:24 -0700)]
* alloc.c (Fmemory_free): Account for memory-free's own storage.

Round up, not down.  Improve doc.

12 years ago* lisp/emacs-lisp/cl-macs.el (cl-progv): Use a properly prefixed var name.
Stefan Monnier [Tue, 17 Jul 2012 12:58:25 +0000 (08:58 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-progv): Use a properly prefixed var name.

12 years ago* lisp/emacs-lisp/elint.el (elint-find-args-in-code):
Stefan Monnier [Tue, 17 Jul 2012 12:30:48 +0000 (08:30 -0400)]
* lisp/emacs-lisp/elint.el (elint-find-args-in-code):
Use help-function-arglist, so as to handle lexical byte-code.