]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 years agocomment fixes
Tom Tromey [Sun, 19 Aug 2012 02:05:13 +0000 (20:05 -0600)]
comment fixes

12 years agorefactor systhread.h
Tom Tromey [Sun, 19 Aug 2012 01:59:47 +0000 (19:59 -0600)]
refactor systhread.h

This refactors systhread.h to move the notion of a "lisp mutex"
into thread.c.  This lets us make make the global lock and
post_acquire_global_lock static.

12 years agowrite docstrings for the thread functions
Tom Tromey [Fri, 17 Aug 2012 13:51:19 +0000 (07:51 -0600)]
write docstrings for the thread functions

12 years agodeclare unbind_for_thread_switch and rebind_for_thread_switch in lisp.h
Tom Tromey [Fri, 17 Aug 2012 13:16:16 +0000 (07:16 -0600)]
declare unbind_for_thread_switch and rebind_for_thread_switch in lisp.h

12 years agoadd test case for I/O switching
Tom Tromey [Wed, 15 Aug 2012 19:19:48 +0000 (13:19 -0600)]
add test case for I/O switching

12 years agoprocess changes
Tom Tromey [Wed, 15 Aug 2012 19:19:24 +0000 (13:19 -0600)]
process changes

This changes wait_reading_process_output to handle threads better.  It
introduces a wrapper for select that releases the global lock, and it
ensures that only a single thread can select a given file descriptor
at a time.

This also adds the thread-locking feature to processes.  By default a
process can only have its output accepted by the thread that created
it.  This can be changed using set-process-thread.  (If the thread
exits, the process is again available for waiting by any thread.)

Note that thread-signal will not currently interrupt a thread blocked
on select.  I'll fix this later.

12 years agoPrepare process.c for threads by not having global select masks.
Tom Tromey [Wed, 15 Aug 2012 19:17:37 +0000 (13:17 -0600)]
Prepare process.c for threads by not having global select masks.
The next step is to make it so selects can choose fds by thread.

12 years agofix a latent bug in process.c
Tom Tromey [Wed, 15 Aug 2012 19:17:05 +0000 (13:17 -0600)]
fix a latent bug in process.c

* process.c (wait_reading_process_output): Check Writeok bits,
not write_mask.

12 years agoThis adds thread-blocker, a function to examine what a thread is
Tom Tromey [Wed, 15 Aug 2012 19:16:33 +0000 (13:16 -0600)]
This adds thread-blocker, a function to examine what a thread is
blocked on.  I thought this would be another nice debugging addition.

12 years agoThis adds names to mutexes. This seemed like a nice debugging
Tom Tromey [Wed, 15 Aug 2012 19:14:14 +0000 (13:14 -0600)]
This adds names to mutexes.  This seemed like a nice debugging
extension.

12 years agoThis adds some tests of the threading code.
Tom Tromey [Wed, 15 Aug 2012 19:11:54 +0000 (13:11 -0600)]
This adds some tests of the threading code.

12 years agoThis supplies the mutex implementation for Emacs Lisp.
Tom Tromey [Wed, 15 Aug 2012 19:11:22 +0000 (13:11 -0600)]
This supplies the mutex implementation for Emacs Lisp.

A lisp mutex is implemented using a condition variable, so that we can
interrupt a mutex-lock operation by calling thread-signal on the
blocking thread.  I did things this way because pthread_mutex_lock
can't readily be interrupted.

12 years agoThis adds most of the thread features visible to emacs lisp.
Tom Tromey [Wed, 15 Aug 2012 19:09:32 +0000 (13:09 -0600)]
This adds most of the thread features visible to emacs lisp.

I roughly followed the Bordeaux threads API:

http://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation

... but not identically.  In particular I chose not to implement
interrupt-thread or destroy-thread, but instead a thread-signalling
approach.

I'm still undecided about *default-special-bindings* (which I did not
implement).  I think it would be more emacs-like to capture the let
bindings at make-thread time, but IIRC Stefan didn't like this idea
the first time around.

There are one or two semantics issues pointed out in the patch where I
could use some advice.

12 years agoThis turns thread_state into a pseudovector and updates various bits
Tom Tromey [Wed, 15 Aug 2012 19:07:04 +0000 (13:07 -0600)]
This turns thread_state into a pseudovector and updates various bits
of Emacs to cope.

12 years agoThis introduces some new functions to handle the specpdl. The basic
Tom Tromey [Wed, 15 Aug 2012 19:04:34 +0000 (13:04 -0600)]
This introduces some new functions to handle the specpdl.  The basic
idea is that when a thread loses the interpreter lock, it will unbind
the bindings it has put in place.  Then when a thread acquires the
lock, it will restore its bindings.

This code reuses an existing empty slot in struct specbinding to store
the current value when the thread is "swapped out".

This approach performs worse than my previously planned approach.
However, it was one I could implement with minimal time and
brainpower.  I hope that perhaps someone else could improve the code
once it is in.

12 years agoThis introduces the low-level system threading support. It also adds
Tom Tromey [Wed, 15 Aug 2012 19:03:17 +0000 (13:03 -0600)]
This introduces the low-level system threading support.  It also adds
the global lock.  The low-level support is a bit over-eager, in that
even at the end of the present series, it will not all be used.  I
think thiat is ok since I plan to use it all eventually -- in
particular for the emacs lisp mutex implementation.

I've only implemented the pthreads-based version.  I think it should
be relatively clear how to port this to other systems, though.

I'd also like to do a "no threads" port that will turn most things
into no-ops, and have thread-creation fail.  I was thinking perhaps
I'd make a future (provide 'threads) conditional on threads actually
working.

One other minor enhancement available here is to make it possible to
set the name of the new thread at the OS layer.  That way gdb, e.g.,
could display thread names.

12 years agoThis parameterizes the GC a bit to make it thread-ready.
Tom Tromey [Wed, 15 Aug 2012 19:01:36 +0000 (13:01 -0600)]
This parameterizes the GC a bit to make it thread-ready.

The basic idea is that whenever a thread "exits lisp" -- that is,
releases the global lock in favor of another thread -- it must save
its stack boundaries in the thread object.  This way the boundaries
are always available for marking.  This is the purpose of
flush_stack_call_func.

I haven't tested this under all the possible GC configurations.
There is a new FIXME in a spot that i didn't convert.

Arguably all_threads should go in the previous patch.

12 years agoThis introduces a thread-state object and moves various C globals
Tom Tromey [Wed, 15 Aug 2012 18:56:38 +0000 (12:56 -0600)]
This introduces a thread-state object and moves various C globals
there.  It also introduces #defines for these globals to avoid a
monster patch.

The #defines mean that this patch also has to rename a few fields
whose names clash with the defines.

There is currently just a single "thread"; so this patch does not
impact Emacs behavior in any significant way.

12 years agoReword previous NEWS change.
Glenn Morris [Wed, 15 Aug 2012 16:33:12 +0000 (09:33 -0700)]
Reword previous NEWS change.

12 years agoReplace version 24.2 with 24.3 where appropriate (hopefully)
Glenn Morris [Wed, 15 Aug 2012 16:29:11 +0000 (09:29 -0700)]
Replace version 24.2 with 24.3 where appropriate (hopefully)

12 years agoFix bug #12196 with incorrect memory allocations for region-cache.
Eli Zaretskii [Wed, 15 Aug 2012 16:21:41 +0000 (19:21 +0300)]
Fix bug #12196 with incorrect memory allocations for region-cache.

 src/region-cache.c (move_cache_gap): Update gap_len using the actual
 growth of the boundaries array.  Do not change cache_len.

12 years agoGeneralize and cleanup font subsystem checks.
Dmitry Antipov [Wed, 15 Aug 2012 14:20:16 +0000 (18:20 +0400)]
Generalize and cleanup font subsystem checks.
* font.h (FONT_DEBUG, font_assert): Remove.
* font.c, fontset.c, w32font.c, xfont.c, xftfont.c: Change
font_assert to eassert.  Use eassert where appropriate.

12 years agoBump version to 24.2.50
Chong Yidong [Wed, 15 Aug 2012 13:26:30 +0000 (21:26 +0800)]
Bump version to 24.2.50

12 years agoFix last change to xg_get_font.
Dmitry Antipov [Wed, 15 Aug 2012 09:40:00 +0000 (17:40 +0800)]
Fix last change to xg_get_font.

* gtkutil.c (xg_get_font): Use pango_units_to_double.

12 years ago* etags.c (Pascal_functions): Fix parenthesization typo.
Paul Eggert [Wed, 15 Aug 2012 08:57:14 +0000 (01:57 -0700)]
* etags.c (Pascal_functions): Fix parenthesization typo.

12 years agoExtract better font information from the GTK >= 3.2 font chooser.
Chong Yidong [Wed, 15 Aug 2012 07:58:34 +0000 (15:58 +0800)]
Extract better font information from the GTK >= 3.2 font chooser.

* gtkutil.c (xg_get_font): Rename from xg_get_font_name.  When
using the new font chooser, use gtk_font_chooser_get_font_desc to
extract the font descriptor instead of just the font name.  In
that case, return a font spec instead of a string.
(x_last_font_name): Move to this file from xfns.c.

* xfns.c (Fx_select_font): The return value can also be a font
spec.  Move x_last_font_name management to gtkutil.c.

* xfaces.c: Make font weight and style symbols non-static.

* lisp/frame.el (set-frame-font): Accept font objects.

12 years agoMore CPP-DEFINES updates
Glenn Morris [Wed, 15 Aug 2012 07:01:17 +0000 (00:01 -0700)]
More CPP-DEFINES updates

12 years ago* src/minibuf.c (read_minibuf): Ignore caller's inhibit-read-only.
Stefan Monnier [Wed, 15 Aug 2012 04:02:14 +0000 (00:02 -0400)]
* src/minibuf.c (read_minibuf): Ignore caller's inhibit-read-only.

Fixes: debbugs:12117
12 years ago* lisp/textmodes/tex-mode.el (tex-insert-quote): ~ is a space.
Stefan Monnier [Wed, 15 Aug 2012 03:46:47 +0000 (23:46 -0400)]
* lisp/textmodes/tex-mode.el (tex-insert-quote): ~ is a space.

Fixes: debbugs:12137
12 years ago* lisp/man.el (Man-overstrike-face, Man-underline-face)
Wolfgang Jenkner [Wed, 15 Aug 2012 03:37:07 +0000 (23:37 -0400)]
* lisp/man.el (Man-overstrike-face, Man-underline-face)
(Man-reverse-face): Remove variables.
(Man-overstrike, Man-underline, Man-reverse): New faces.
(Man-fontify-manpage): Use them instead of the variables.
(Man-cleanup-manpage): Comment change.
(Man-ansi-color-map): New variable.
(Man-fontify-manpage): Use it.
Call ansi-color-apply-on-region to replace ad hoc code.

Fixes: debbugs:12147
12 years agoImplement ANSI SGR parameters 22-27.
Wolfgang Jenkner [Wed, 15 Aug 2012 03:33:55 +0000 (23:33 -0400)]
Implement ANSI SGR parameters 22-27.
* lisp/ansi-color.el (ansi-colors): Doc fix.
(ansi-color-context, ansi-color-context-region): Doc fix.
(ansi-color--find-face): New function.
(ansi-color-apply, ansi-color-apply-on-region): Use it.
Rename the local variable `face' to `codes' since it is now a list of
ansi codes.  Doc fix.
(ansi-color-get-face): Remove.
(ansi-color-parse-sequence): New function, derived from
ansi-color-get-face.
(ansi-color-apply-sequence): Use it.  Rewrite, and support ansi
codes 22-27.

Fixes: debbugs:12146
12 years ago* lisp/subr.el (read-passwd): Allow use from a minibuffer.
Stefan Monnier [Tue, 14 Aug 2012 21:48:52 +0000 (17:48 -0400)]
* lisp/subr.el (read-passwd): Allow use from a minibuffer.

12 years ago* src/alloc.c (Fgarbage_collect): Use plural form consistently.
Stefan Monnier [Tue, 14 Aug 2012 21:38:06 +0000 (17:38 -0400)]
* src/alloc.c (Fgarbage_collect): Use plural form consistently.

12 years agoFix compiler warning in keyboard.c.
Eli Zaretskii [Tue, 14 Aug 2012 19:44:55 +0000 (22:44 +0300)]
Fix compiler warning in keyboard.c.

12 years agoFix last change in keyboard.c.
Eli Zaretskii [Tue, 14 Aug 2012 19:11:45 +0000 (22:11 +0300)]
Fix last change in keyboard.c.

12 years agoFix and improve GUD Tooltip mode.
Eli Zaretskii [Tue, 14 Aug 2012 18:48:39 +0000 (21:48 +0300)]
Fix and improve GUD Tooltip mode.

 lisp/tooltip.el (tooltip-identifier-from-point): Don't treat tokens
 inside comments and strings as identifiers.
 lisp/progmodes/gud.el (gud-tooltip-print-command): Quote the
 expression to evaluate.  This allows to evaluate expressions with
 embedded whitespace.
 (gud-tooltip-tips): Add a blank before the newline in the
 message-box text, for the benefit of message-box emulation on
 MS-Windows.
 lisp/progmodes/gdb-mi.el (gdb-tooltip-print): Don't ignore error
 messages from GDB, pop them up in a tooltip to give feedback to
 user.
 (gdb-tooltip-print-1): Quote the expression to evaluate.  This
 allows to evaluate expressions with embedded whitespace.
 (gdb-inferior-io--init-proc): Don't send "-inferior-tty" command
 if the TTY name is nil or empty (which happens when communicating
 with the inferior via pipes, e.g. on MS-Windows).
 (gdb-internals): If GDB sends a "&\n" empty debugging message,
 don't send that to the GUD buffer.

 doc/emacs/building.texi (Debugger Operation): Correct and improve
 documentation of the GUD Tooltip mode.

12 years agoFix a problem with disabled mouse movement events.
Eli Zaretskii [Tue, 14 Aug 2012 18:25:47 +0000 (21:25 +0300)]
Fix a problem with disabled mouse movement events.

 src/keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
 iteration through the command loop.  Fixes a problem whereby mouse
 movements are ignored until the first mouse click.

12 years agobyte-compile-setq-default fix for bug#12195
Glenn Morris [Tue, 14 Aug 2012 18:23:10 +0000 (14:23 -0400)]
byte-compile-setq-default fix for bug#12195

* lisp/emacs-lisp/bytecomp.el (byte-compile-setq-default):
Optimize away setq-default with no args, as is done for setq.

12 years agoUse bool for Emacs Lisp booleans.
Paul Eggert [Tue, 14 Aug 2012 17:45:25 +0000 (10:45 -0700)]
Use bool for Emacs Lisp booleans.

This is more natural, and on my platform (GCC 4.7.1 x86-64) it
makes Emacs's text size .03% smaller and presumably a bit faster.
* admin/merge-gnulib (GNULIB_MODULES): Add stdbool.  This documents a
new direct dependency; stdbool was already being used indirectly
via other gnulib modules.
* lib-src/make-docfile.c (enum global_type): Sort values roughly in
decreasing alignment, except put functions last.
(compare_globals): Use this new property of enum global_type.
(write_globals): Use bool, not int, for booleans.
* src/lisp.h: Include <stdbool.h>.
(struct Lisp_Boolfwd, defvar_bool):
* src/lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
* src/regex.c [!emacs]: Include <stdbool.h>.
(false, true): Remove; <stdbool.h> does this for us now.

12 years agoMore doc fixes.
Chong Yidong [Tue, 14 Aug 2012 17:10:38 +0000 (01:10 +0800)]
More doc fixes.

* lisp/minibuffer.el (read-file-name): Doc fix.

* character.c (Fcharacterp): Doc fix (Bug#12076).

* data.c (Findirect_variable): Doc fix (Bug#11040).

* editfns.c (Fsave_current_buffer): Doc fix (Bug#11542).

Fixes: debbugs:11542 debbugs:11040 debbugs:12076 debbugs:10881
12 years agoDoc fixes.
Chong Yidong [Tue, 14 Aug 2012 16:28:23 +0000 (00:28 +0800)]
Doc fixes.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Doc fix.

* src/chartab.c (Fmap_char_table): Doc fix.

* src/editfns.c (Fformat): Doc fix.

Fixes: debbugs:12059 debbugs:12085 debbugs:12061
12 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Tue, 14 Aug 2012 16:15:28 +0000 (18:15 +0200)]
nt/config.nt: Sync with autogen/config.in.
(_GL_INLINE_HEADER_BEGIN): Update.

12 years ago* lisp/emacs-lisp/bytecomp.el (byte-recompile-file): Doc fix.
Glenn Morris [Tue, 14 Aug 2012 15:58:46 +0000 (08:58 -0700)]
* lisp/emacs-lisp/bytecomp.el (byte-recompile-file): Doc fix.

12 years ago* lisp/url/url-http.el (url-http-parse-headers): Re-enable file-name-handlers.
Stefan Monnier [Tue, 14 Aug 2012 14:54:51 +0000 (10:54 -0400)]
* lisp/url/url-http.el (url-http-parse-headers): Re-enable file-name-handlers.

Fixes: debbugs:11981
12 years ago* net/tramp-sh.el (tramp-open-shell): Cache the shell name.
Michael Albinus [Tue, 14 Aug 2012 14:48:28 +0000 (16:48 +0200)]
* net/tramp-sh.el (tramp-open-shell): Cache the shell name.
(tramp-find-shell, tramp-open-connection-setup-interactive-shell):
Use cached shell name.

12 years ago* progmodes/python.el (python-shell-send-string):
Fabián Ezequiel Gallina [Tue, 14 Aug 2012 13:39:27 +0000 (10:39 -0300)]
* progmodes/python.el (python-shell-send-string):
(python-shell-send-setup-code): Do not use `format' with
`message'.

12 years ago* lisp/progmodes/ruby-mode.el (ruby-syntax-methods-before-regexp): New const.
Dmitry Gutov [Tue, 14 Aug 2012 12:38:11 +0000 (08:38 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-syntax-methods-before-regexp): New const.
(ruby-syntax-propertize-function): Use it to recognize regexps.
Don't look at the text after regexp, just use the whitelist.
* test/indent/ruby.rb: Rearrange examples, add new ones.

Fixes: debbugs:6286
12 years ago* lisp/progmodes/ruby-mode.el: Improve percent literals.
Dmitry Gutov [Tue, 14 Aug 2012 12:28:12 +0000 (08:28 -0400)]
* lisp/progmodes/ruby-mode.el: Improve percent literals.
(ruby-percent-literal-beg-re): New constant.
(ruby-syntax-general-delimiters-goto-beg): Rename to
`ruby-syntax-enclosing-percent-literal', improve literal type check.
(ruby-syntax-propertize-general-delimiters): Rename to
`ruby-syntax-propertize-percent-literal', it's a shorter and more
popular term.  Adjust comments everywhere.
(ruby-syntax-propertize-percent-literal): Only propertize when not
inside a simple string or comment.  When the literal is unclosed,
leave the text after it unpropertized.

Fixes: debbugs:6286
12 years ago* src/keyboard.c (access_keymap_keyremap): Accept anonymous functions.
Barry O'Reilly [Tue, 14 Aug 2012 12:11:59 +0000 (08:11 -0400)]
* src/keyboard.c (access_keymap_keyremap): Accept anonymous functions.

Fixes: debbugs:12022
12 years agoAuto-commit of generated files.
Glenn Morris [Tue, 14 Aug 2012 10:17:30 +0000 (06:17 -0400)]
Auto-commit of generated files.

12 years agoDon't call Fset_window_buffer from C code.
Martin Rudalics [Tue, 14 Aug 2012 08:44:24 +0000 (10:44 +0200)]
Don't call Fset_window_buffer from C code.

* frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
(delete_frame, Fmake_frame_invisible, Ficonify_frame):
* minibuf.c (choose_minibuf_frame, read_minibuf):
* w32fns.c (x_create_tip_frame):
* xfns.c (x_create_tip_frame): Call set_window_buffer instead of
Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).

12 years agoFixes: debbugs:12197
Andreas Schwab [Tue, 14 Aug 2012 08:37:41 +0000 (10:37 +0200)]
Fixes: debbugs:12197
* emacs-lisp/bytecomp.el (byte-recompile-file): When LOAD is
non-nil always load the compiled file if it exists.

12 years ago* intervals.c (offset_intervals): Remove obsolete comment.
Paul Eggert [Tue, 14 Aug 2012 08:30:52 +0000 (01:30 -0700)]
* intervals.c (offset_intervals): Remove obsolete comment.

12 years ago* gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
Andreas Schwab [Tue, 14 Aug 2012 08:06:07 +0000 (10:06 +0200)]
* gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.

12 years agoFix highlight-regexp's use of Font Lock mode.
Chong Yidong [Tue, 14 Aug 2012 06:52:59 +0000 (14:52 +0800)]
Fix highlight-regexp's use of Font Lock mode.

* hi-lock.el (hi-lock-mode): Do not unilaterally enable font lock.
(hi-lock-set-pattern): When deciding whether to use font lock or
overlays, look at font-lock-mode instead of font-lock-fontified.
(hi-lock-mode, hi-lock-line-face-buffer, hi-lock-unface-buffer)
(hi-lock-face-buffer, hi-lock-face-phrase-buffer): Doc fix.

Fixes: debbugs:12168
12 years ago* gnus-art.el (article-display-face): Handle failure in gnus-create-image.
Chong Yidong [Tue, 14 Aug 2012 05:34:20 +0000 (13:34 +0800)]
* gnus-art.el (article-display-face): Handle failure in gnus-create-image.

Fixes: debbugs:11802
12 years agoFix for undo recording in decode_coding.
Gergely Risko [Tue, 14 Aug 2012 05:09:35 +0000 (13:09 +0800)]
Fix for undo recording in decode_coding.

* coding.c (decode_coding): Record buffer modification before
disabling undo_list.

Fixes: debbugs:11773
12 years agoRevert and cleanup some recent overlay changes.
Dmitry Antipov [Tue, 14 Aug 2012 04:49:18 +0000 (08:49 +0400)]
Revert and cleanup some recent overlay changes.
* buffer.h (enum overlay_type): Remove.
(buffer_get_overlays, buffer_set_overlays): Likewise.
(buffer_set_overlays_before, buffer_set_overlays_after):
New function.  Adjust users.
(unchain_both): Add eassert.

12 years ago* gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
Dmitry Antipov [Tue, 14 Aug 2012 04:47:05 +0000 (08:47 +0400)]
* gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.

12 years ago* subr.el (internal--after-with-selected-window): Fix typo.
Daiki Ueno [Tue, 14 Aug 2012 04:37:00 +0000 (12:37 +0800)]
* subr.el (internal--after-with-selected-window): Fix typo.

Fixes: debbugs:12193
12 years agoUse `completion-table-dynamic' for completion functions.
Fabián Ezequiel Gallina [Tue, 14 Aug 2012 04:18:41 +0000 (01:18 -0300)]
Use `completion-table-dynamic' for completion functions.
* progmodes/python.el
(python-shell-completion--do-completion-at-point)
(python-shell-completion--get-completions): Remove
functions.
(python-shell-completion-complete-at-point): New function.
(python-completion-complete-at-point): Use it.

12 years agoMerge from gnulib.
Paul Eggert [Tue, 14 Aug 2012 03:15:52 +0000 (20:15 -0700)]
Merge from gnulib.

This incorporates:
2012-08-05 extern-inline: also ignore -Wmissing-declarations

12 years ago* gtkutil.c (xg_mark_data): Don't assume C99.
Paul Eggert [Tue, 14 Aug 2012 02:39:59 +0000 (19:39 -0700)]
* gtkutil.c (xg_mark_data): Don't assume C99.

12 years ago* lisp/vc/vc-dir.el (vc-dir-hide-state): New command.
Jambunathan K [Mon, 13 Aug 2012 21:31:56 +0000 (17:31 -0400)]
* lisp/vc/vc-dir.el (vc-dir-hide-state): New command.
(vc-dir-hide-up-to-date): Route it to `vc-dir-hide-state'.

Fixes: debbugs:12159
12 years ago* lisp/subr.el (function-get): Refine `autoload' arg so it can also
Stefan Monnier [Mon, 13 Aug 2012 21:23:09 +0000 (17:23 -0400)]
* lisp/subr.el (function-get): Refine `autoload' arg so it can also
autoload functions for gv.el.
* lisp/emacs-lisp/edebug.el (get-edebug-spec): Adjust so it only
autoloads macros.

Fixes: debbugs:12191
12 years agoDon't redraw tool bar for Gtk+ unless out of date.
Jan Djärv [Mon, 13 Aug 2012 19:12:26 +0000 (21:12 +0200)]
Don't redraw tool bar for Gtk+ unless out of date.

* gtkutil.c (xg_frame_tb_info): New struct.
(TB_INFO_KEY): New define.
(xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
(xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
(xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
if not present.
(update_frame_tool_bar): Return early if data in xg_frame_tb_info
is up to date. Otherwise store new data.
(free_frame_tool_bar): Free xg_frame_tb_info if present.

12 years ago* lisp/color.el (color-xyz-to-lab, color-lab-to-xyz, color-cie-de2000):
Stefan Monnier [Mon, 13 Aug 2012 19:10:35 +0000 (15:10 -0400)]
* lisp/color.el (color-xyz-to-lab, color-lab-to-xyz, color-cie-de2000):
Prefer pcase-let over destructuring-bind.
* lisp/vc/diff-mode.el (diff-remove-trailing-whitespace): Same.
Also, remove whitespace as we go, rather than after accumulating the
various places.

12 years ago* lisp/subr.el (internal--before-with-selected-window)
Stefan Monnier [Mon, 13 Aug 2012 14:12:47 +0000 (10:12 -0400)]
* lisp/subr.el (internal--before-with-selected-window)
(internal--after-with-selected-window): Fix typo seleted->selected.
(with-selected-window): Adjust callers.
Reported by Dmitry Gutov <dgutov@yandex.ru>.

12 years agowindow.el: Minor dosctring enhancement (Bug#12172).
Bastien Guerry [Mon, 13 Aug 2012 14:05:24 +0000 (16:05 +0200)]
window.el: Minor dosctring enhancement (Bug#12172).

* window.el (special-display-popup-frame): Minor docstring
enhancement.  (Bug#12172)

12 years ago* tar-mode.el (tar-header-data-end): Only ignore size for files of
Andreas Schwab [Mon, 13 Aug 2012 10:34:25 +0000 (12:34 +0200)]
* tar-mode.el (tar-header-data-end): Only ignore size for files of
type 1-6.
(tar-header-block-summarize, tar-get-descriptor): Handle pax
extended headers.

12 years ago* files.el (hack-local-variables-filter): Remove useless eval.
Andreas Schwab [Mon, 13 Aug 2012 07:37:05 +0000 (09:37 +0200)]
* files.el (hack-local-variables-filter): Remove useless eval.

12 years agoFix last change to with-selected-window.
Martin Rudalics [Mon, 13 Aug 2012 07:25:30 +0000 (09:25 +0200)]
Fix last change to with-selected-window.

* subr.el (with-selected-window): Fix last change.

12 years agoUse KSET for write access to Lisp_Object members of struct kboard.
Dmitry Antipov [Mon, 13 Aug 2012 03:44:27 +0000 (07:44 +0400)]
Use KSET for write access to Lisp_Object members of struct kboard.
* keyboard.h (KSET): New macro.
* callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
* msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
* xterm.c: Adjust users.

12 years agoUse BSET for write access to Lisp_Object members of struct buffer.
Dmitry Antipov [Mon, 13 Aug 2012 03:39:07 +0000 (07:39 +0400)]
Use BSET for write access to Lisp_Object members of struct buffer.
* buffer.h (BSET): New macro.
* buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
* fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
* minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
* window.c, xdisp.c, xfns.c: Adjust users.

12 years ago* lisp/subr.el (internal--before-with-seleted-window)
Stefan Monnier [Sun, 12 Aug 2012 22:52:33 +0000 (18:52 -0400)]
* lisp/subr.el (internal--before-with-seleted-window)
(internal--after-with-seleted-window): New functions.
(with-selected-window): Use them, to replace dependency on tty-top-frame.

12 years agoMerge from upstream ruby-mode.el
Nobuyoshi Nakada [Sun, 12 Aug 2012 22:06:56 +0000 (18:06 -0400)]
Merge from upstream ruby-mode.el
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove unnecessary
binding for `newline'.
(ruby-move-to-block): When moving backward, stop at block opening,
not indentation.
* progmodes/ruby-mode.el (ruby-brace-to-do-end)
(ruby-do-end-to-brace, ruby-toggle-block): New functions.
* progmodes/ruby-mode.el (ruby-mode-map): Add binding for
`ruby-toggle-block'.
* test/automated/ruby-mode-tests.el (ruby-move-to-block-stops-at-opening)
(ruby-toggle-block-to-do-end, ruby-toggle-block-to-brace): New test.

12 years ago* lisp/url/url-util.el (url-file-directory, url-file-nondirectory): Avoid
David Engster [Sun, 12 Aug 2012 17:35:15 +0000 (13:35 -0400)]
* lisp/url/url-util.el (url-file-directory, url-file-nondirectory): Avoid
file-name-directory and file-name-nondirectory internally.

Fixes: debbugs:11981
12 years ago* lisp/ibuffer.el (ibuffer-do-toggle-read-only):
Stefan Monnier [Sun, 12 Aug 2012 17:29:53 +0000 (13:29 -0400)]
* lisp/ibuffer.el (ibuffer-do-toggle-read-only):
* lisp/dired.el (dired-toggle-read-only):
* lisp/buff-menu.el (Buffer-menu-toggle-read-only):
* lisp/bindings.el (mode-line-toggle-read-only):
* lisp/bs.el (bs-toggle-readonly): Call toggle-read-only interactively.

12 years ago* descr-text.el (describe-char): Put the overlays over the
Andreas Schwab [Sun, 12 Aug 2012 09:35:57 +0000 (11:35 +0200)]
* descr-text.el (describe-char): Put the overlays over the
"displayed as" character.

12 years agocalc/calc-units.el (math-default-units-table): Give it an
Jay Belanger [Sun, 12 Aug 2012 04:32:28 +0000 (23:32 -0500)]
calc/calc-units.el (math-default-units-table): Give it an
initial value.
(math-put-default-units): Add options to put composite units and unit
systems in default units table.
(calc-convert-units): Send composite units to `math-put-default-units'
when appropriate.

12 years agoCPP-DEFINES misc cleanup
Glenn Morris [Sun, 12 Aug 2012 03:13:37 +0000 (20:13 -0700)]
CPP-DEFINES misc cleanup

12 years agoRemove some defines that are no longer present
Glenn Morris [Sat, 11 Aug 2012 22:39:36 +0000 (15:39 -0700)]
Remove some defines that are no longer present

12 years ago* src/lread.c (syms_of_lread): Initialize Vlexical_binding.
BT Templeton [Sat, 11 Aug 2012 15:34:01 +0000 (11:34 -0400)]
* src/lread.c (syms_of_lread): Initialize Vlexical_binding.

12 years agoLast change fixes Bug#12069
Jason Rumney [Sat, 11 Aug 2012 14:50:28 +0000 (22:50 +0800)]
Last change fixes Bug#12069

12 years ago* lisp/url/url-http.el (url-http-create-request): Use url-http-proxy to
Jason Rumney [Sat, 11 Aug 2012 14:48:37 +0000 (22:48 +0800)]
* lisp/url/url-http.el (url-http-create-request): Use url-http-proxy to
look up proxy credentials.

12 years ago* nsterm.m (not_in_argv): New function.
Jan Djärv [Sat, 11 Aug 2012 09:10:08 +0000 (11:10 +0200)]
* nsterm.m (not_in_argv): New function.
(application:openFile, application:openTempFile:):
(application:openFileWithoutUI:, application:openFiles:): Open file
if not_in_argv returns non-zero.

Fixes: debbugs:12171
12 years agoUse GtkFontChooser on Gtk+ 3.2 and up.
Jan Djärv [Sat, 11 Aug 2012 08:54:35 +0000 (10:54 +0200)]
Use GtkFontChooser on Gtk+ 3.2 and up.

* src/gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
(gtk_font_chooser_set_font, gtk_font_chooser_get_font): Define
for Gtk+ versions less than 3.2.
(xg_get_font_name): Use those functions/macros here.
Reported by Frans Oilinki <moilinki@gmail.com>.

12 years agoChangeLog date fixes
Glenn Morris [Sat, 11 Aug 2012 04:46:38 +0000 (21:46 -0700)]
ChangeLog date fixes

12 years agoMerge from emacs-24; up to 2012-05-02T11:38:01Z!lekktu@gmail.com
Chong Yidong [Sat, 11 Aug 2012 02:13:55 +0000 (10:13 +0800)]
Merge from emacs-24; up to 2012-05-02T11:38:01Z!lekktu@gmail.com

12 years ago* lib/makefile.w32-in (STAT_TIME_H): New macro.
Juanma Barranquero [Fri, 10 Aug 2012 21:29:38 +0000 (23:29 +0200)]
* lib/makefile.w32-in (STAT_TIME_H): New macro.
(FTOASTR_C, $(BLD)/stat-time.$(O), $(BLD)/timespec.$(O))
($(BLD)/u64.$(O)): Update dependencies.

12 years ago* lisp/gnus/gnus-agent.el (gnus-agent-cat-defaccessor, gnus-agent-cat-groups):
Stefan Monnier [Fri, 10 Aug 2012 21:20:24 +0000 (17:20 -0400)]
* lisp/gnus/gnus-agent.el (gnus-agent-cat-defaccessor, gnus-agent-cat-groups):
Use defsetf.

12 years ago* lisp/emacs-lisp/rx.el (rx-constituents): Don't define as constant.
Stefan Monnier [Fri, 10 Aug 2012 21:03:10 +0000 (17:03 -0400)]
* lisp/emacs-lisp/rx.el (rx-constituents): Don't define as constant.
(rx-form): Simplify.

12 years ago* test/automated/ruby-mode-tests.el (ruby-should-indent):
Dmitry Gutov [Fri, 10 Aug 2012 20:25:43 +0000 (16:25 -0400)]
* test/automated/ruby-mode-tests.el (ruby-should-indent):
Add docstring, check (current-indentation) instead of (current-column).
(ruby-should-indent-buffer): New function.
Add tests for `ruby-deep-indent-paren' behavior.
Port all tests from test/misc/test_ruby_mode.rb in Ruby repo.

Fixes: debbugs:12169
12 years agoMerge stuff from upsteam ruby-mode, part 1.
Dmitry Gutov [Fri, 10 Aug 2012 20:19:09 +0000 (16:19 -0400)]
Merge stuff from upsteam ruby-mode, part 1.
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove deprecated
binding (use `M-;' instead).
(ruby-expr-beg, ruby-parse-partial): ?, _, and : are symbol
constituents, ! is not (but kinda should be).
(ruby-singleton-class-p): New function.
(ruby-expr-beg, ruby-in-here-doc-p)
(ruby-syntax-propertize-heredoc): Use it.
(ruby-syntax-propertize-function): Adjust for changes in
`ruby-syntax-propertize-heredoc'.

* test/automated/ruby-mode-tests.el (ruby-should-indent)
(ruby-assert-state): New functions.
Add new tests.

Fixes: debbugs:12169
12 years ago* lisp/emacs-lisp/cl-macs.el (cl-loop): Improve debug spec.
Stefan Monnier [Fri, 10 Aug 2012 19:34:36 +0000 (15:34 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-loop): Improve debug spec.

12 years agoMove IF_LINT from lisp.h to conf_post.h
Glenn Morris [Fri, 10 Aug 2012 18:23:45 +0000 (14:23 -0400)]
Move IF_LINT from lisp.h to conf_post.h

* src/conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
* src/lisp.h (IF_LINT, lint_assume): Move to conf_post.h.

* lib-src/make-docfile.c (IF_LINT):
* lib-src/emacsclient.c (IF_LINT): Remove (in config.h now).

12 years agoRemove some unnecessary bindings of same-window-* variables.
Chong Yidong [Fri, 10 Aug 2012 16:46:07 +0000 (00:46 +0800)]
Remove some unnecessary bindings of same-window-* variables.

* lisp/progmodes/python.el (python-shell-get-process-name): Don't mess
with same-window-buffer-names.

* lisp/eshell/eshell.el (eshell-add-to-window-buffer-names)
(eshell-remove-from-window-buffer-names): Make obsolete.
(eshell-buffer-name, eshell-unload-hook): Don't use them.
(eshell): Just use pop-to-buffer-same-window instead.

12 years agoBind M-= back to count-words-region, and let it accept a prefix arg.
Chong Yidong [Fri, 10 Aug 2012 16:02:48 +0000 (00:02 +0800)]
Bind M-= back to count-words-region, and let it accept a prefix arg.

* lisp/bindings.el: Bind M-= back to count-words-region.

* lisp/simple.el (count-words-region): Accept a prefix arg for acting
on the entire buffer.
(count-words--buffer-message): New helper function.

12 years ago* lisp/term/x-win.el (x-menu-bar-open): Always pass last-nonmenu-event.
Stefan Monnier [Fri, 10 Aug 2012 14:47:12 +0000 (10:47 -0400)]
* lisp/term/x-win.el (x-menu-bar-open): Always pass last-nonmenu-event.
* lisp/subr.el (eventp): `nil' is not an event, and eventp is not hot.
(event-start, event-end): Use posn-at-point to return a more
informative posn.
(posnp): New function.
* lisp/mouse.el (popup-menu-normalize-position): Use it.

12 years agolisp/gnus/auth-source.el: (auth-source-plstore-search, auth-source-secrets-search...
Daiki Ueno [Fri, 10 Aug 2012 14:38:37 +0000 (14:38 +0000)]
lisp/gnus/auth-source.el: (auth-source-plstore-search, auth-source-secrets-search): Ignore :require and :type in search spec