]> git.eshelyaron.com Git - emacs.git/log
emacs.git
10 years agoAuto-commit of loaddefs files.
Glenn Morris [Tue, 23 Sep 2014 10:21:30 +0000 (06:21 -0400)]
Auto-commit of loaddefs files.

10 years agoFix SAFE_ALLOCA to not exhaust the stack when in a loop.
Paul Eggert [Tue, 23 Sep 2014 05:42:47 +0000 (22:42 -0700)]
Fix SAFE_ALLOCA to not exhaust the stack when in a loop.

Problem reported by Dmietry Antipov in thread leading to:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
remain unfixed.
* callproc.c (call_process): Save and restore sa_avail.
* lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
(AVAIL_ALLOCA): New macro.
(SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
Use it, and check against sa_avail rather than MAX_ALLOCA.

10 years agoMerge from emacs-24
Stefan Monnier [Mon, 22 Sep 2014 19:20:45 +0000 (15:20 -0400)]
Merge from emacs-24

10 years agooops
Sam Steingold [Mon, 22 Sep 2014 19:19:29 +0000 (15:19 -0400)]
oops

10 years ago(sql-execute): Use `special-mode'.
Sam Steingold [Mon, 22 Sep 2014 19:18:29 +0000 (15:18 -0400)]
(sql-execute): Use `special-mode'.

* sql.el (sql-execute): Use `special-mode'.

10 years ago(sql-product-alist): Improve the Vertica entry.
Sam Steingold [Mon, 22 Sep 2014 19:17:40 +0000 (15:17 -0400)]
(sql-product-alist): Improve the Vertica entry.

* lisp/progmodes/sql.el (sql-product-alist): Improve the Vertica entry.

10 years agoAdd pcase-defmacro, as well as `quote' and `app' patterns.
Stefan Monnier [Mon, 22 Sep 2014 18:22:02 +0000 (14:22 -0400)]
Add pcase-defmacro, as well as `quote' and `app' patterns.
* loadup.el: Increase max-lisp-eval-depth when macroexpanding macroexp.
* emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.
* emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
(pcase--upat): Remove.
(pcase--macroexpand): Don't hardcode handling of `.
(pcase--split-consp, pcase--split-vector): Remove.
(pcase--split-equal): Disregard ` since it's expanded away.
(pcase--split-member): Optimize for quote rather than for `.
(pcase--split-pred): Optimize for quote rather than for `.
(pcase--u1): Remove handling of ` (and of `or' and `and').
Quote non-selfquoting values when passing them to `eq'.
Drop `app's let-binding if the variable is not used.
(pcase--q1): Remove.
(`): Define as a pattern macro.
* emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
(pcase--expand pcase--q1, pcase--app-subst-match): Use it.
(pcase--macroexpand): Handle self-quoting patterns here, expand them to
quote patterns.
(pcase--split-match): Don't hoist or/and here any more.
(pcase--split-equal): Optimize quote patterns as well as ` patterns.
(pcase--flip): New helper macro.
(pcase--u1): Optimize the memq case directly.
Don't handle neither self-quoting nor and/or patterns any more.
* emacs-lisp/pcase.el (pcase-defmacro): New macro.
(pcase--macroexpand): New function.
(pcase--expand): Use it.
* emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.

10 years ago* lisp/loadup.el: Increase max-lisp-eval-depth while macroexpanding macroexp.
Stefan Monnier [Mon, 22 Sep 2014 18:17:27 +0000 (14:17 -0400)]
* lisp/loadup.el: Increase max-lisp-eval-depth while macroexpanding macroexp.

10 years ago* lisp/emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
Stefan Monnier [Mon, 22 Sep 2014 18:05:22 +0000 (14:05 -0400)]
* lisp/emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.

10 years ago* lisp/emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
Stefan Monnier [Mon, 22 Sep 2014 17:24:46 +0000 (13:24 -0400)]
* lisp/emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
(pcase--upat): Remove.
(pcase--macroexpand): Don't hardcode handling of `.
(pcase--split-consp, pcase--split-vector): Remove.
(pcase--split-equal): Disregard ` since it's expanded away.
(pcase--split-member): Optimize for quote rather than for `.
(pcase--split-pred): Optimize for quote rather than for `.
(pcase--u1): Remove handling of ` (and of `or' and `and').
Quote non-selfquoting values when passing them to `eq'.
Drop `app's let-binding if the variable is not used.
(pcase--q1): Remove.
(`): Define as a pattern macro.

10 years ago* lisp/emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
Stefan Monnier [Mon, 22 Sep 2014 16:22:50 +0000 (12:22 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
(pcase--expand pcase--q1, pcase--app-subst-match): Use it.
(pcase--macroexpand): Handle self-quoting patterns here, expand them to
quote patterns.
(pcase--split-match): Don't hoist or/and here any more.
(pcase--split-equal): Optimize quote patterns as well as ` patterns.
(pcase--flip): New helper macro.
(pcase--u1): Optimize the memq case directly.
Don't handle neither self-quoting nor and/or patterns any more.

10 years ago* lisp/emacs-lisp/pcase.el (pcase-defmacro): New macro.
Stefan Monnier [Mon, 22 Sep 2014 15:04:12 +0000 (11:04 -0400)]
* lisp/emacs-lisp/pcase.el (pcase-defmacro): New macro.
(pcase--macroexpand): New function.
(pcase--expand): Use it.

10 years agoFix bug #18516 with SIGSEGV in expand-file-name.
Eli Zaretskii [Mon, 22 Sep 2014 14:37:22 +0000 (17:37 +0300)]
Fix bug #18516 with SIGSEGV in expand-file-name.

 src/fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
 always set to a valid value.  Make sure the size passed to alloca
 is always positive.

10 years agoAdd support for `quote' and `app'.
Stefan Monnier [Mon, 22 Sep 2014 14:30:47 +0000 (10:30 -0400)]
Add support for `quote' and `app'.
* lisp/emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.

10 years agoUse lexical-bindin in Ibuffer.
Stefan Monnier [Mon, 22 Sep 2014 14:10:53 +0000 (10:10 -0400)]
Use lexical-bindin in Ibuffer.
* lisp/ibuffer.el (ibuffer-do-toggle-read-only): `arg' is unused.
(ibuffer-compile-format): Simplify.
(ibuffer-clear-summary-columns): Simplify.
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups): Don't use the third
elem of dotimes when we don't refer to the iteration var from it.
(ibuffer-toggle-sorting-mode): Avoid add-to-list.
* lisp/ibuf-macs.el (define-ibuffer-column, define-ibuffer-op):
Silence byte-compiler.

10 years ago* lisp/font-lock.el (font-lock-compile-keyword): Don't confuse a lambda
Stefan Monnier [Mon, 22 Sep 2014 13:52:06 +0000 (09:52 -0400)]
* lisp/font-lock.el (font-lock-compile-keyword): Don't confuse a lambda
expression for a list.

10 years ago* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
Stefan Monnier [Mon, 22 Sep 2014 13:47:47 +0000 (09:47 -0400)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
for functions with no arguments.

10 years ago* lisp/mpc.el (mpc-data-directory): Use locate-user-emacs-file.
Stefan Monnier [Mon, 22 Sep 2014 13:42:57 +0000 (09:42 -0400)]
* lisp/mpc.el (mpc-data-directory): Use locate-user-emacs-file.
(mpc-volume-refresh): Make sure the corresponding header-line is updated.
(mpc-songs-jump-to, mpc-play): Use user-error.

10 years agoAvoid extra call to oblookup when interning symbols.
Dmitry Antipov [Mon, 22 Sep 2014 06:06:19 +0000 (10:06 +0400)]
Avoid extra call to oblookup when interning symbols.
* lisp.h (intern_driver): Add prototype.
* lread.c (intern_driver): New function.
(intern1, intern_c_string_1, Fintern):
* font.c (font_intern_prop):
* w32font.c (intern_font_name): Use it.

10 years agoOn OSX, do not free font-specific data more than once (Bug#18501).
Dmitry Antipov [Mon, 22 Sep 2014 05:34:05 +0000 (09:34 +0400)]
On OSX, do not free font-specific data more than once (Bug#18501).
* macfont.m (macfont_close): Release and free font-specific data
only if it wasn't previously freed.

10 years agoMinor improvements to new stack-allocated Lisp objects.
Paul Eggert [Sun, 21 Sep 2014 22:49:24 +0000 (15:49 -0700)]
Minor improvements to new stack-allocated Lisp objects.

* frame.h (FRAME_PARAMETER):
Prefer scoped_list1 to local_list1 where either would do.
* lisp.h (scoped_list4): New macro.
(local_cons, local_list1, local_list2, local_list3, local_list4)
(make_local_vector, make_local_string, build_local_string):
Prefer functions to macros where either would do.
* xdisp.c (build_desired_tool_bar_string):
Prefer scoped_list4 to local_list4 where either would do.

10 years ago* lisp/simple.el (clone-indirect-buffer): Mention the return value.
Tom Willemse [Sun, 21 Sep 2014 22:09:40 +0000 (18:09 -0400)]
* lisp/simple.el (clone-indirect-buffer): Mention the return value.

Fixes: debbugs:18478
10 years ago* lisp/progmodes/prog-mode.el (prog-mode-hook): Replace reference to
Tom Willemse [Sun, 21 Sep 2014 22:07:26 +0000 (18:07 -0400)]
* lisp/progmodes/prog-mode.el (prog-mode-hook): Replace reference to
Text mode in docstring.

Fixes: debbugs:18464
10 years ago* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Stefan Monnier [Sun, 21 Sep 2014 22:00:28 +0000 (18:00 -0400)]
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Accept underscores in identifiers after "sub".

Fixes: debbugs:18502
10 years ago* configure.ac: Increase headerpad_extra to 1000, update the comment
David Caldwell [Sun, 21 Sep 2014 20:35:22 +0000 (22:35 +0200)]
* configure.ac: Increase headerpad_extra to 1000, update the comment
about load commands.

* src/unexmacosx.c (dump_it): Improve error message.

Fixes: debbugs:18505
10 years agoAuto-commit of loaddefs files.
Glenn Morris [Sun, 21 Sep 2014 10:22:38 +0000 (06:22 -0400)]
Auto-commit of loaddefs files.

10 years agoUse font-lock-face property; derive from special-mode
Tassilo Horn [Sun, 21 Sep 2014 09:34:02 +0000 (11:34 +0200)]
Use font-lock-face property; derive from special-mode

* lisp/textmodes/reftex-sel.el (reftex-select-label-mode)
(reftex-select-bib-mode, reftex-insert-docstruct): Derive modes
from special-mode (instead of fundamental-mode) and propertize
with font-lock-face instead of just face.

* lisp/textmodes/reftex-toc.el (reftex-toc-mode, reftex-toc): Ditto.

Fixes: debbugs:18496
10 years ago* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't use
Dmitry Gutov [Fri, 19 Sep 2014 17:33:11 +0000 (21:33 +0400)]
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't use
`lisp--local-variables-completion-table' in the `lisp--form-quoted-p'
case.

10 years agoFix bug#18265
Dmitry Gutov [Fri, 19 Sep 2014 03:41:42 +0000 (07:41 +0400)]
Fix bug#18265

* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.
(lisp-completion-at-point): Move `end' back if it's after quote.
If in comment or string, only complete when after backquote.

10 years ago* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
Dmitry Gutov [Fri, 19 Sep 2014 03:28:31 +0000 (07:28 +0400)]
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.

10 years agoMake lisp-completion-at-point more discerning
Dmitry Gutov [Fri, 19 Sep 2014 03:10:29 +0000 (07:10 +0400)]
Make lisp-completion-at-point more discerning

* lisp/emacs-lisp/lisp.el (lisp--expect-function-p)
(lisp--form-quoted-p): New functions.
(lisp-completion-at-point): Use them to see if we're completing a
variable reference, a function name, or just any symbol.
http://lists.gnu.org/archive/html/emacs-devel/2014-02/msg00229.html

10 years agoAdd the missing last name to ChangeLog
Dmitry Gutov [Fri, 19 Sep 2014 02:29:25 +0000 (06:29 +0400)]
Add the missing last name to ChangeLog

10 years agoClarify url-http and url-retrieve-internal docstrings
Dmitry Gutov [Fri, 19 Sep 2014 01:55:43 +0000 (05:55 +0400)]
Clarify url-http and url-retrieve-internal docstrings

* lisp/url/url-http.el (url-http): Same.

* lisp/url/url.el (url-retrieve-internal): Clarify the docstring.

Fixes: debbugs:18116
10 years ago* src/image.c (imagemagick_load_image): Add delay to imagemagick metadata.
Juri Linkov [Thu, 18 Sep 2014 20:59:55 +0000 (23:59 +0300)]
* src/image.c (imagemagick_load_image): Add delay to imagemagick metadata.
(Bug#10747, bug#18334)

10 years agoDo not call egrep to determine emacs version in EDE.
David Engster [Thu, 18 Sep 2014 20:37:19 +0000 (22:37 +0200)]
Do not call egrep to determine emacs version in EDE.

* ede/emacs.el (ede-emacs-version): Do not call 'egrep' to
determine Emacs version (it was dead code anyway).  Make sure that
configure.ac or configure.in exist.  (Bug#18476)

10 years agoAllow users to specify `shr-width'
Ivan Kanis [Thu, 18 Sep 2014 19:18:34 +0000 (21:18 +0200)]
Allow users to specify `shr-width'

* net/shr.el, net/eww.el: Don't override `shr-width', but
introduce a new variable `shr-internal-width'.  This allows users
to specify a width themselves.

10 years ago* image-mode.el: Move defvars earlier to avoid a byte-compilation warning.
Lars Magne Ingebrigtsen [Thu, 18 Sep 2014 18:38:05 +0000 (20:38 +0200)]
* image-mode.el: Move defvars earlier to avoid a byte-compilation warning.

10 years agoPreserve the aspect ratio when fitting to width/height
Lars Magne Ingebrigtsen [Thu, 18 Sep 2014 18:34:59 +0000 (20:34 +0200)]
Preserve the aspect ratio when fitting to width/height

* image-mode.el (image-toggle-display-image): If we have a
`fit-width' or a `fit-height', don't limit the size of the image
to the window size, because that doesn't preserve the aspect
ratio.

10 years agoClarify the doc strings of mouse-position and set-mouse-position.
Eli Zaretskii [Thu, 18 Sep 2014 17:20:57 +0000 (20:20 +0300)]
Clarify the doc strings of mouse-position and set-mouse-position.

 src/frame.c (Fmouse_position, Fset_mouse_position): Clarify the
 units in which the position is measured.  (Bug#18493)

10 years agoFix bug #18490 with redisplay of other windows showing a narrowed buffer.
Eli Zaretskii [Thu, 18 Sep 2014 15:10:33 +0000 (18:10 +0300)]
Fix bug #18490 with redisplay of other windows showing a narrowed buffer.

 src/xdisp.c (redisplay_internal): Force redisplay of all windows
 that show a buffer whose narrowing has changed.

10 years agoFix `fit-window-to-buffer' (Bug#18498).
Kan-Ru Chen [Thu, 18 Sep 2014 12:06:17 +0000 (14:06 +0200)]
Fix `fit-window-to-buffer' (Bug#18498).

* window.el (fit-window-to-buffer): When counting buffer width,
count the whole visible buffer.  Correctly convert the body-height
to pixel size for window-text-pixel-size (Bug#18498).

10 years agoMore and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
Dmitry Antipov [Thu, 18 Sep 2014 11:34:24 +0000 (15:34 +0400)]
More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
* lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
[!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
* frame.h (FRAME_PARAMETER): New macro.
* dispnew.c (init_display):
* fontset.c (Fset_fontset_font):
* frame.c (x_default_parameter):
* xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
* xfns.c (x_default_scroll_bar_color_parameter)
(x_default_font_parameter, x_create_tip_frame): Use it.
* editfns.c (Fpropertize): Use local_cons.
* process.c (status_message): Use build_local_string.
* xfont.c (xfont_open): Use make_local_string.
* xdisp.c (build_desired_tool_bar_string): Use local_list4.

10 years agoPort USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
Paul Eggert [Thu, 18 Sep 2014 05:40:17 +0000 (22:40 -0700)]
Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.

Revert previous lisp.h change, and install the following instead.
* lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
!__clang__.  This works with GCC and with clang and is safer for
compilers we don't know about.

10 years agoPort USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
Paul Eggert [Thu, 18 Sep 2014 01:03:40 +0000 (18:03 -0700)]
Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.

* lisp.h (ALLOCA_FIXUP): New constant.
(LOCAL_ALLOCA): New macro.
(local_cons, make_local_vector, make_local_string): Use them.
(local_cons): Rename parameter to make capture less likely.

10 years ago* unexmacosx.c (copy_data_segment): Port to GCC 4.6+.
Samuel Bronson [Wed, 17 Sep 2014 19:58:31 +0000 (12:58 -0700)]
* unexmacosx.c (copy_data_segment): Port to GCC 4.6+.

Fixes: debbugs:9927
10 years agoFix minor problems found by static checking.
Paul Eggert [Wed, 17 Sep 2014 18:27:36 +0000 (11:27 -0700)]
Fix minor problems found by static checking.

* alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
Remove; now unused.
* buffer.h (decode_buffer): Doc and indentation fixes.
* fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.

10 years agoAvoid clang-specific warnings.
Dmitry Antipov [Wed, 17 Sep 2014 15:34:37 +0000 (19:34 +0400)]
Avoid clang-specific warnings.
* buffer.c (init_buffer): Shut up -Wself-assign.
* process.c (server_accept_connection): Shut up -Wunsequenced.

10 years ago* alloc.c (local_vector_init): Remove useless INLINE.
Dmitry Antipov [Wed, 17 Sep 2014 11:22:45 +0000 (15:22 +0400)]
* alloc.c (local_vector_init): Remove useless INLINE.

10 years agoAdd interpreter-mode-alist support for various JavaScript interpreters.
Reuben Thomas [Wed, 17 Sep 2014 09:17:27 +0000 (10:17 +0100)]
Add interpreter-mode-alist support for various JavaScript interpreters.

* progmodes/js.el: here.

10 years agoDon't assume 'grep' supports GREP_OPTIONS.
Paul Eggert [Wed, 17 Sep 2014 00:07:12 +0000 (17:07 -0700)]
Don't assume 'grep' supports GREP_OPTIONS.

The GREP_OPTIONS environment variable is planned to be marked
obsolescent in GNU grep, due to problems in its use, so stop
relying on it.
* progmodes/grep.el (grep-highlight-matches): Document this.
(grep-process-setup): Do not set GREP_OPTIONS.
(grep-compute-defaults): Use an explicit --color option if supported.

10 years agoFix display of hollow-box and hbar cursors on r2L lines.
Eli Zaretskii [Tue, 16 Sep 2014 15:53:36 +0000 (18:53 +0300)]
Fix display of hollow-box and hbar cursors on r2L lines.

 src/xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
 src/w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
 lines, draw the hollow-box and hbar cursors on the right side of
 cursor-glyph.  Thanks to Martin Rudalics <rudalics@gmx.at> for
 testing on X.

10 years agoFix block cursor display in R2L lines.
Eli Zaretskii [Tue, 16 Sep 2014 15:44:51 +0000 (18:44 +0300)]
Fix block cursor display in R2L lines.

 src/xterm.c (x_draw_stretch_glyph_string):
 src/w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
 caused the block cursor to disappear on a TAB in R2L lines in
 every window except the leftmost one.  Reported by Martin Rudalics
 <rudalics@gmx.at>.

10 years agoFor symbols, use address as hash code.
Daniel Colascione [Tue, 16 Sep 2014 13:07:57 +0000 (06:07 -0700)]
For symbols, use address as hash code.

* src/fns.c (sxhash): For symbols, use address as hash code.

10 years agoAvoid more integer overflows on string size calculations.
Dmitry Antipov [Tue, 16 Sep 2014 11:43:49 +0000 (15:43 +0400)]
Avoid more integer overflows on string size calculations.
* category.c (Fmake_category_set):
* xdisp.c (get_overlay_arrow_glyph_row):
* w32font.c (intern_font_name): Prefer ptrdiff_t to int.

10 years agoIf USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
Dmitry Antipov [Tue, 16 Sep 2014 08:20:08 +0000 (12:20 +0400)]
If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
* charset.c (load_charset_map_from_file): Use scoped_list2
and build_local_string.
* buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
* emacs.c (init_cmdargs, decode_env_path):
* fileio.c (Fexpand_file_name):
* fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
* frame.c (x_get_arg):
* keyboard.c (safe_run_hooks_error):
* lread.c (load_warn_old_style_backquotes):
* xdisp.c (Fcurrent_bidi_paragraph_direction):
* xfns.c (x_default_scroll_bar_color_parameter, select_visual):
* xselect.c (x_clipboard_manager_error_1)
(x_clipboard_manager_save_all):
* xterm.c (x_term_init): Use build_local_string.

10 years agoPrefer ptrdiff_t to int and avoid integer overflows.
Dmitry Antipov [Tue, 16 Sep 2014 04:07:51 +0000 (08:07 +0400)]
Prefer ptrdiff_t to int and avoid integer overflows.
* fileio.c (make_temp_name):
* font.c (font_parse_family_registry): Avoid integer
overflow on string size calculation.
* data.c (Faset): Likewise for byte index.

10 years agoAlways use matched specpdl entry to record call arguments (Bug#18473).
Dmitry Antipov [Tue, 16 Sep 2014 04:04:56 +0000 (08:04 +0400)]
Always use matched specpdl entry to record call arguments (Bug#18473).
* lisp.h (record_in_backtrace): Adjust prototype.
* eval.c (record_in_backtrace): Return current specpdl level.
(set_backtrace_args, set_backtrace_nargs): Merge.  Adjust all users.
(eval_sub, Ffuncall): Record call arguments in matched specpdl
entry and use that entry in call to backtrace_debug_on_exit.
(apply_lambda): Likewise.  Get current specpdl level as 3rd arg.
(do_debug_on_call): Get current specpdl level as 2nd arg.

10 years ago* lisp/msb.el (msb--make-keymap-menu, msb-menu-bar-update-buffers):
Stefan Monnier [Tue, 16 Sep 2014 00:28:28 +0000 (20:28 -0400)]
* lisp/msb.el (msb--make-keymap-menu, msb-menu-bar-update-buffers):
Don't add outdated key-shortcut cache.

Fixes: debbugs:18482
10 years agoSupport playing on MS-Windows non-ASCII sound files using Unicode APIs.
Eli Zaretskii [Mon, 15 Sep 2014 15:51:57 +0000 (18:51 +0300)]
Support playing on MS-Windows non-ASCII sound files using Unicode APIs.

 src/sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
 (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
 error message format.  Use message_with_string to have non-ASCII
 file names properly displayed.
 (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
 when w32-unicode-filenames is non-nil, but not on Windows 9X,
 where these APIs are not available even in UNICOWS.DLL.  Improve
 the format of error messages and include the file name in them
 where appropriate.
 (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
 call play-sound-functions, per documentation.
 src/w32.c (w32_get_long_filename, w32_get_short_filename): Constify
 the input file name arguments.
 src/w32.h (w32_get_long_filename, w32_get_short_filename): Update
 prototypes.

10 years agosrc/dispextern.h: Commentary fix.
Eli Zaretskii [Mon, 15 Sep 2014 15:29:40 +0000 (18:29 +0300)]
src/dispextern.h: Commentary fix.

10 years agoFix display of R2L lines in partial-width windows.
Eli Zaretskii [Mon, 15 Sep 2014 15:25:54 +0000 (18:25 +0300)]
Fix display of R2L lines in partial-width windows.

 src/xdisp.c (init_iterator): Don't use it->bidi_p before it is
 assigned the correct value.
 (extend_face_to_end_of_line): Account for truncation and
 continuation glyphs in R2L rows when one of the fringes is not
 displayed.
 (display_line): Don't assign negative X offset to a row if we are
 going to produce a truncation glyph for it.  When handling
 truncated R2L rows, consider the width of the left fringe instead
 of the right one.
 (produce_special_glyphs): Fix bogus assignments.

10 years agoIf USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
Dmitry Antipov [Mon, 15 Sep 2014 14:53:23 +0000 (18:53 +0400)]
If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
* lisp.h (local_cons, local_list1, local_list2, local_list3)
[USE_LOCAL_ALLOCATORS]: New macros.
[!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
(build_local_string): Avoid argument name expansion clash with
make_local_string.
* alloc.c (toplevel)
[USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
Preprocessor guard to avoid impossible configuration.
* charset.c (Ffind_charset_region, Ffind_charset_string):
Use make_local_vector.
* lread.c (read1, substitute_object_recurse): Use scoped_cons.
* textprop.c (Fput_text_property, Fadd_face_text_property):
Use scoped_list2.
(copy_text_properties): Use local_cons and local_list3.
* chartab.c (uniprop_table):
* data.c (wrong_choice, wrong_range):
* doc.c (get_doc_string):
* editfns.c (format2):
* fileio.c (Fexpand_file_name, auto_save_error):
* fns.c (Fyes_or_no_p):
* font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
* fontset.c (Fset_fontset_font):
* keyboard.c (echo_add_key, echo_dash, parse_menu_item)
(read_char_minibuf_menu_prompt):
* keymap.c (silly_event_symbol_error, describe_vector):
* menu.c (single_menu_item):
* minibuf.c (Fread_buffer):
* process.c (status_message, Fformat_network_address)
(server_accept_connection): Use make_local_string and
build_local_string.  Prefer compound literals where appropriate.

10 years agoTweak sort docstring
Daniel Colascione [Mon, 15 Sep 2014 05:09:44 +0000 (22:09 -0700)]
Tweak sort docstring

* fns.c (Fsort): Tweak sort docstring.

10 years agoUpdate documentation for `insert-register'
Daniel Colascione [Mon, 15 Sep 2014 00:45:14 +0000 (17:45 -0700)]
Update documentation for `insert-register'

  * doc/emacs/regs.texi (Text Registers): Update end-user documentation
  to reflect `insert-register' interface change.

  * doc/lispref/text.texi (Registers): Make `insert-register' documentation
  reflect interface change.

10 years agoUpdate documentation for `insert-register'
Daniel Colascione [Mon, 15 Sep 2014 00:43:29 +0000 (17:43 -0700)]
Update documentation for `insert-register'

* doc/emacs/regs.texi (Text Registers): Update end-user documentation
to reflect `insert-register' interface change.

* doc/lispref/text.texi (Registers): Make `insert-register' documentation
reflect interface change.

10 years agoMerge from emacs-24; up to 2014-07-09T02:04:12Z!rgm@gnu.org
Glenn Morris [Mon, 15 Sep 2014 00:20:21 +0000 (17:20 -0700)]
Merge from emacs-24; up to 2014-07-09T02:04:12Z!rgm@gnu.org

10 years ago* lisp/image.el (image-multi-frame-p): Fix thinko
Glenn Morris [Sun, 14 Sep 2014 23:59:57 +0000 (16:59 -0700)]
* lisp/image.el (image-multi-frame-p): Fix thinko
do not force a delay if none was specified.

Fixes: debbugs:18334
10 years ago* register.el (insert-register): Change default interactive insertion mode.
Daniel Colascione [Sun, 14 Sep 2014 23:11:52 +0000 (16:11 -0700)]
* register.el (insert-register): Change default interactive insertion mode.

10 years agoFix bug #18420 with deadlocks communicating with subprocess on MS-Windows.
Eli Zaretskii [Sun, 14 Sep 2014 15:18:39 +0000 (18:18 +0300)]
Fix bug #18420 with deadlocks communicating with subprocess on MS-Windows.

 src/w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of
 pipes.
 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
 set errno to EAGAIN instead, to allow the caller to retry the
 write after some waiting.  Fixes deadlocks when Emacs exchanges a
 lot of data through the pipe.

10 years ago* net/tramp-cache.el (tramp-flush-file-function): Simplify check.
Michael Albinus [Sun, 14 Sep 2014 09:00:11 +0000 (11:00 +0200)]
* net/tramp-cache.el (tramp-flush-file-function): Simplify check.
Suppress debug messages.

* net/tramp.el (tramp-file-name-handler):
* net/tramp-gvfs.el (tramp-gvfs-url-file-name): Apply `cons' where
appropriate.

10 years ago* callproc.c (init_callproc): Fix bug introduced at 2014-09-07.
Jan Djärv [Sun, 14 Sep 2014 08:23:48 +0000 (10:23 +0200)]
* callproc.c (init_callproc): Fix bug introduced at 2014-09-07.

Fixes: debbugs:18474
10 years agooops
Sam Steingold [Sun, 14 Sep 2014 01:28:27 +0000 (21:28 -0400)]
oops

10 years agoetc/NEWS: Mention HTML support in Rmail.
Eli Zaretskii [Sat, 13 Sep 2014 18:59:56 +0000 (21:59 +0300)]
etc/NEWS: Mention HTML support in Rmail.

10 years ago* etc/NEWS: Mention nil `calendar-mode-line-format' will not modify
Christopher Schmidt [Sat, 13 Sep 2014 17:44:32 +0000 (19:44 +0200)]
* etc/NEWS: Mention nil `calendar-mode-line-format' will not modify
the mode line of the calendar buffer.
* lisp/calendar/calendar.el (calendar-update-mode-line):
Do not overwrite mode-line-format if calendar-mode-line-format is nil.
(Bug#18467)

10 years ago* emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Add
Leo Liu [Sat, 13 Sep 2014 16:30:21 +0000 (00:30 +0800)]
* emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Add
pcase-exhaustive.

* emacs-lisp/pcase.el (pcase--dontwarn-upats): New var.
(pcase--expand): Use it.
(pcase-exhaustive): New macro.

Fixes: debbugs:16567
10 years agoAuto-commit of loaddefs files.
Glenn Morris [Sat, 13 Sep 2014 10:18:48 +0000 (06:18 -0400)]
Auto-commit of loaddefs files.

10 years agoFix HTML rendering by shr-insert-document in Rmail.
Eli Zaretskii [Sat, 13 Sep 2014 09:25:38 +0000 (12:25 +0300)]
Fix HTML rendering by shr-insert-document in Rmail.

 lisp/mail/rmailmm.el (rmail-mime-insert-html): Decode the HTML part
 using the specified transfer-encoding, if any, or 'undecided'.
 (rmail-mime-render-html-shr): Bind shr-width to nil, so lines are
 broken at the window margin.

Fixes: debbugs:4258
10 years agoDecode HTML text before presenting it in Rmail.
Eli Zaretskii [Sat, 13 Sep 2014 09:20:15 +0000 (12:20 +0300)]
Decode HTML text before presenting it in Rmail.

 lisp/mail/rmailmm.el (rmail-mime-insert-html): Decode the HTML part
 using the specified transfer-encoding, if any, or 'undecided'.

Fixes: debbugs:4258
10 years agoSupport rendering of HTML parts in Rmail (bug #4258).
Ken Olum [Sat, 13 Sep 2014 09:01:56 +0000 (12:01 +0300)]
Support rendering of HTML parts in Rmail (bug #4258).

 lisp/mail/rmailmm.el (rmail-mime-process): Handle text/html
 separately from other text/ types.  Suppress tagline for
 multipart body.
 (rmail-mime-parse): Don't change visibility of tagline here.
 (rmail-mime-set-bulk-data, rmail-mime-insert-bulk):
 Handle text/html specially.
 (rmail-mime-render-html-function,rmail-mime-prefer-html): New variables.
 (rmail-mime-insert-html, rmail-mime-render-html-shr)
 (rmail-mime-render-html-lynx): New functions.
 (rmail-mime-fix-inserted-faces): New function.
 (rmail-mime-process-multipart): Find the best part to show
 following rmail-mime-prefer-html if set.
 (rmail-mime-searching): New variable.
 (rmail-search-mime-message): Bind rmail-mime-searching to
 suppress rendering while searching.

10 years agoFix expansion and encoding of sound file names on MS-Windows.
Eli Zaretskii [Sat, 13 Sep 2014 08:26:44 +0000 (11:26 +0300)]
Fix expansion and encoding of sound file names on MS-Windows.

 src/sound.c (Fplay_sound_internal): Encode the sound file name in
 the ANSI codepage.  Expand it against data-directory, as per docs,
 not against the current directory.  No need to make a local copy
 of the file name; pass the encoded file name directly to
 do_play_sound.  (Bug#18463)
 src/w32.c (ansi_encode_filename): If w32_get_short_filename returns
 NULL, and the file name is not encodable in ANSI codepage, return
 the string with "?" replacement characters, which will fail the
 caller.  This avoids returning a random value in that case.

10 years agoResurrect sound support on MS-Windows that was lost in transition.
Eli Zaretskii [Sat, 13 Sep 2014 07:10:40 +0000 (10:10 +0300)]
Resurrect sound support on MS-Windows that was lost in transition.

 configure.ac (HAVE_SOUND): Check for mmsystem.h header that
 defines the sound stuff on MS-Windows.  (Bug#18463)

10 years agoPrefer ptrdiff_t to int and avoid integer overflows.
Dmitry Antipov [Sat, 13 Sep 2014 04:41:54 +0000 (08:41 +0400)]
Prefer ptrdiff_t to int and avoid integer overflows.
* fileio.c (make_temp_name):
* font.c (font_parse_family_registry): Avoid integer
overflow on string size calculation.
* data.c (Faset): Likewise for byte index.

10 years agoAdd support for Vertica SQL.
Sam Steingold [Fri, 12 Sep 2014 19:57:40 +0000 (15:57 -0400)]
Add support for Vertica SQL.

* lisp/progmodes/sql.el (sql-product-alist): Add vertica.
(sql-vertica-program, sql-vertica-options)
(sql-vertica-login-params, sql-comint-vertica, sql-vertica):
New functions and variables to support Vertica.
Inspired by code by Roman Scherer <roman@burningswell.com>.

10 years ago* buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
Detlev Zundel [Fri, 12 Sep 2014 11:12:40 +0000 (15:12 +0400)]
* buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).

10 years agoFix fit-window-to-buffer doc-string.
Kan-Ru Chen [Fri, 12 Sep 2014 06:26:46 +0000 (08:26 +0200)]
Fix fit-window-to-buffer doc-string.

10 years agoSpelling fixes.
Paul Eggert [Thu, 11 Sep 2014 19:44:25 +0000 (12:44 -0700)]
Spelling fixes.

* lisp/ses.el (ses-file-format-extend-parameter-list): Rename from
ses-file-format-extend-paramter-list.  All uses changed.
* lisp/gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling
of ":delete".

10 years ago* etc/NEWS: Mention timer error reporting.
Glenn Morris [Thu, 11 Sep 2014 17:35:44 +0000 (13:35 -0400)]
* etc/NEWS: Mention timer error reporting.
Ref: http://debbugs.gnu.org/18444#8

10 years agoRemove redundant GCPROs around Ffuncall and Fapply calls. This
Dmitry Antipov [Thu, 11 Sep 2014 13:21:19 +0000 (17:21 +0400)]
Remove redundant GCPROs around Ffuncall and Fapply calls. This
is safe because Ffuncall protects all of its arguments by itself.
* charset.c (map_charset_for_dump): Remove redundant GCPRO.
* eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
(call6, call7): Likewise.  Use compound literals where applicable.
(run_hook_with_args_2): Use compound literal.

10 years ago* lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
Dmitry Antipov [Thu, 11 Sep 2014 13:02:09 +0000 (17:02 +0400)]
* lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.

10 years agoMore debugging aids around GCPROs.
Dmitry Antipov [Thu, 11 Sep 2014 09:14:45 +0000 (13:14 +0400)]
More debugging aids around GCPROs.
* lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
(GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
Minor restyle.  If DEBUG_GCPRO, initialize extra fields.

10 years agoIn Fresize_mini_window_internal set w->total_lines from w->pixel_height (Bug#18422).
Martin Rudalics [Thu, 11 Sep 2014 08:47:34 +0000 (10:47 +0200)]
In Fresize_mini_window_internal set w->total_lines from w->pixel_height (Bug#18422).

* window.c (Fresize_mini_window_internal): Set w->total_lines
from w->pixel_height (Bug#18422).

10 years ago* lisp.h (make_local_string): Nitpick indent.
Dmitry Antipov [Thu, 11 Sep 2014 06:21:55 +0000 (10:21 +0400)]
* lisp.h (make_local_string): Nitpick indent.
* print.c (Fprin1_to_string): Remove unused GCPROs.

10 years agoPacify --enable-gcc-warnings when no window system is used.
Paul Eggert [Thu, 11 Sep 2014 00:48:57 +0000 (17:48 -0700)]
Pacify --enable-gcc-warnings when no window system is used.

These warnings found that subscript error, so they seem worthwhile.
* composite.c (char_composable_p): Simplify a bit.
* frame.c (x_set_frame_parameters): Add an IF_LINT.
* frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
* frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
* window.c (set_window_scroll_bars):
Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
* frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
Ignore -Wsuggest-attribute=const.
* window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
(WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.

10 years ago* charset.c (Fget_unused_iso_final_char): Fix subscript error.
Paul Eggert [Thu, 11 Sep 2014 00:29:54 +0000 (17:29 -0700)]
* charset.c (Fget_unused_iso_final_char): Fix subscript error.

Use check_iso_charset_parameter instead of doing the checks by hand.
(check_iso_charset_parameter): Move up.  Check parameters a bit
more carefully, and return true for 96-char sets.  All callers changed.

10 years agoCC Mode: revert recent changes and fix bug 17463 (cc-langs.elc gets
Alan Mackenzie [Wed, 10 Sep 2014 21:38:11 +0000 (21:38 +0000)]
CC Mode: revert recent changes and fix bug 17463 (cc-langs.elc gets
loaded at run-time).
* progmodes/cc-langs.el (c-no-parens-syntax-table): Rename the
c-lang-const to c-make-no-parens-syntax-table and correct the
logic.
(c-no-parens-syntax-table): Correct the logic of the c-lang-defvar.

10 years agoSimplify lisp.h by removing the __COUNTER__ business.
Paul Eggert [Wed, 10 Sep 2014 20:56:05 +0000 (13:56 -0700)]
Simplify lisp.h by removing the __COUNTER__ business.

Problem reported by Dmitry Antipov in:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
* lisp.h (make_local_vector, make_local_string)
(build_local_string): Simplify by not bothering with __COUNTER__.
The __COUNTER__ business wasn't working properly, and was needed
only for hypothetical future expansion anyway.

10 years ago* nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other terms to determine...
Alp Aker [Wed, 10 Sep 2014 17:56:38 +0000 (13:56 -0400)]
* nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other terms to determine bitmap color.  (Bug#18437)

10 years agosrc/w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF translation buffer.
Eli Zaretskii [Wed, 10 Sep 2014 17:51:53 +0000 (20:51 +0300)]
src/w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF translation buffer.

10 years ago* xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
Paul Eggert [Wed, 10 Sep 2014 17:18:38 +0000 (10:18 -0700)]
* xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.

10 years agoDetect iconified under Compiz/Unity
Jan Djärv [Wed, 10 Sep 2014 17:02:42 +0000 (19:02 +0200)]
Detect iconified under Compiz/Unity

* xterm.c (handle_one_xevent): Detect iconified by looking at
_NET_WM_STATE_HIDDEN.