Dmitry Antipov
89dea803ea
Drop idle buffer compaction due to an absence of the
...
proved efficiency.
* lisp/compact.el: Remove.
2012-07-20 08:13:04 +04:00
Paul Eggert
52b852c77d
* 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.
2012-07-19 15:35:58 -07:00
Sam Steingold
8a4e6db81a
* 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.
2012-07-19 10:38:01 -04:00
Stefan Monnier
5db81e3362
* 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.
2012-07-19 07:39:38 -04:00
Dmitry Antipov
5b835e1d6e
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.
2012-07-19 13:50:01 +04:00
Dmitry Antipov
9cd47b72e0
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.
2012-07-19 12:56:53 +04:00
Stefan Monnier
1d6fc0df36
* lisp/subr.el (eventp): Presume that if it looks vaguely like an event,
...
it's an event.
Fixes: debbugs:10190
2012-07-19 02:24:04 -04:00
Dmitry Antipov
d17337e501
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.
2012-07-19 07:55:59 +04:00
Chong Yidong
23dc774492
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
2012-07-19 11:33:08 +08:00
Chong Yidong
e32a12b5ec
* emacs.texi: Update ISBN.
2012-07-19 09:15:06 +08:00
Fabián Ezequiel Gallina
1d29cc7da7
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.
2012-07-18 21:55:55 -03:00
Andreas Schwab
60cfd27857
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 >.
2012-07-18 14:33:37 -07:00
Fabián Ezequiel Gallina
d617c457bd
progmodes/python.el: Set file local vars at end of file and clean tabs.
2012-07-18 16:04:06 -03:00
Fabián Ezequiel Gallina
d583cbe681
* 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.
2012-07-18 15:40:03 -03:00
Paul Eggert
837131548b
* 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.
2012-07-18 10:29:34 -07:00
Paul Eggert
d06714cb44
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 ().
2012-07-18 10:26:43 -07:00
Stefan Monnier
5fbc0409ac
* src/eval.c (Fdefvar): Don't check constants since we only set the var if
...
it's not yet defined anyway.
Fixes: debbugs:11904
2012-07-18 11:20:33 -04:00
Dmitry Gutov
eceb6feba4
* 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'.
2012-07-18 17:04:36 +02:00
Chong Yidong
d7d9a49959
Fix last commit.
2012-07-18 22:48:25 +08:00
Chong Yidong
19fb718672
* subr.el (last-input-char, last-command-char): Remove.
...
Fixes: debbugs:9195
2012-07-18 22:46:32 +08:00
Chong Yidong
9587c68842
* simple.el (count-words): Report on narrowing.
...
Fixes: debbugs:9959
2012-07-18 22:29:34 +08:00
Chong Yidong
0fe776a1e4
* lisp/bindings.el: Bind M-= to count-words.
2012-07-18 22:17:49 +08:00
Chong Yidong
4c8ff0fec3
* faces.el (face-spec-reset-face): Handle reverse video.
...
Fixes: debbugs:4238
2012-07-18 22:00:09 +08:00
Masatake YAMATO
7f5331cc80
* lisp/progmodes/sh-script.el (sh-imenu-generic-expression):
...
Capture a function with `function' keyword and without parentheses
like "function FOO".
Fixes: debbugs:11856
2012-07-18 09:40:57 -04:00
Chong Yidong
9aeb25a6b4
* subr.el (keyboard-translate): Doc fix.
...
Fixes: debbugs:7261
2012-07-18 21:31:16 +08:00
Stefan Monnier
464d5a5e1f
* 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
2012-07-18 09:20:59 -04:00
Stefan Monnier
d0b822e38a
* 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
2012-07-18 07:44:13 -04:00
Julien Danjou
a4acb88d35
gnus/{sieve-mode,sieve}.el: Close buffers by default
2012-07-18 10:38:37 +00:00
Andreas Schwab
8dc2e44a77
* w32font.c (Qsymbol): Remove local definition.
...
(syms_of_w32font): Don't DEFSYM it.
2012-07-18 12:12:43 +02:00
Tassilo Horn
2dc2a609c5
* window.el (split-window-sensibly): Make WINDOW argument
...
optional.
2012-07-18 12:02:54 +02:00
Dmitry Antipov
169925ec99
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.
2012-07-18 13:46:07 +04:00
Stefan Monnier
95bdccb782
* lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
...
of narrowed buffer.
Fixes: debbugs:11966
2012-07-18 05:33:09 -04:00
Chong Yidong
439f7677e9
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
2012-07-18 17:27:23 +08:00
Chong Yidong
5fbfb018e0
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
2012-07-18 16:11:08 +08:00
Stefan Monnier
12999ea83f
* lisp/emacs-lisp/eieio.el: Adapt further to gv.el.
...
(eieio-defclass): Use gv-define-setter when possible.
Fixes: debbugs:11970
2012-07-18 03:20:04 -04:00
Dmitry Antipov
3ab6e06969
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.
2012-07-18 09:44:36 +04:00
Fabián Ezequiel Gallina
0a60bc1071
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
2012-07-17 17:27:49 -03:00
Juri Linkov
6dafa0d535
* 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.
2012-07-17 21:40:15 +03:00
Juri Linkov
b19dd9d1bb
* lisp/descr-text.el (describe-char): Fix format args.
...
Fixes: debbugs:10129
2012-07-17 21:15:02 +03:00
Fabián Ezequiel Gallina
bcdc27d7d4
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
2012-07-17 15:02:53 -03:00
Fabián Ezequiel Gallina
191da00ee2
* 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
2012-07-17 13:47:58 -03:00
Paul Eggert
6d02fe5b3b
* alloc.c (Fmemory_free): Account for memory-free's own storage.
...
Round up, not down. Improve doc.
2012-07-17 09:24:57 -07:00
Stefan Monnier
88ecaf8fa5
* lisp/emacs-lisp/cl-macs.el (cl-progv): Use a properly prefixed var name.
2012-07-17 08:58:25 -04:00
Stefan Monnier
ef501ef01c
* lisp/emacs-lisp/elint.el (elint-find-args-in-code):
...
Use help-function-arglist, so as to handle lexical byte-code.
2012-07-17 08:30:48 -04:00
Dmitry Antipov
b7ffe0402b
Restore old code in allocate_string_data to avoid Faset breakage.
...
Reported by Julien Danjou <julien@danjou.info> in
http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html .
* alloc.c (allocate_string_data): Restore old code with minor
adjustments, fix comment to explain this subtle issue.
2012-07-17 16:31:29 +04:00
Stefan Monnier
4dc7c8d579
Merge from emacs-24
2012-07-17 07:52:00 -04:00
Stefan Monnier
2143fa3267
* lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws):
...
Avoid spuriously marking the buffer as modified because of c-is-sws.
2012-07-17 07:40:23 -04:00
Glenn Morris
5476a9a481
Auto-commit of generated files.
2012-07-17 06:17:29 -04:00
Dmitry Antipov
cce7fefcab
Cleanup and convert miscellaneous checks to eassert.
...
* alloc.c (mark_interval): Fix comment, partially rephrase
old comment from intervals.h (see below).
* intervals.c (find_interval, adjust_intervals_for_insertion)
(delete_interval, adjust_intervals_for_deletion)
(graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
Convert to eassert.
(adjust_intervals_for_insertion, make_new_interval):
Remove obsolete and unused code.
* intervals.h (struct interval): Remove obsolete comment.
* textprotp.c (erase_properties): Remove unused code.
(Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
(Fremove_list_of_text_properties): Convert to eassert.
2012-07-17 13:12:24 +04:00
Stefan Monnier
efc26dbecd
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
...
as not-a-comment.
* test/indent/shell.sh: Add test case for ${#VAR}.
Fixes: debbugs:11946
2012-07-17 04:38:12 -04:00