Alan Mackenzie [Sun, 13 Oct 2013 19:54:46 +0000 (19:54 +0000)]
Fix indentation/fontification of Java enum with "implements"/generic.
* progmodes/cc-engine.el (c-backward-over-enum-header): Extracted from
the three other places and enhanced to handle generics.
(c-inside-bracelist-p): Uses new function above.
* progmodes/cc-fonts.el (c-font-lock-declarations): Uses new function
above.
(c-font-lock-enum-tail): Uses new function above.
Xue Fuqiao [Sun, 13 Oct 2013 12:14:28 +0000 (20:14 +0800)]
NEWS tweak.
Kenichi Handa [Sun, 13 Oct 2013 11:59:25 +0000 (20:59 +0900)]
merge trunk
Kenichi Handa [Sun, 13 Oct 2013 11:55:00 +0000 (20:55 +0900)]
merge trunk
Xue Fuqiao [Sun, 13 Oct 2013 10:22:34 +0000 (18:22 +0800)]
Remove unnecessary @refill.
Glenn Morris [Sun, 13 Oct 2013 10:19:27 +0000 (06:19 -0400)]
Auto-commit of generated files.
Kenichi Handa [Sun, 13 Oct 2013 09:25:29 +0000 (18:25 +0900)]
international/mule-cmds.el (select-safe-coding-system): Remove a superfluous condition in chekcing whether a coding system is safe or not.
Oleh Krehel [Sun, 13 Oct 2013 05:30:23 +0000 (22:30 -0700)]
* lisp/replace.el (how-many): Fix rstart and !rend case.
Fixes: debbugs:15589
Andreas Politz [Sun, 13 Oct 2013 05:23:42 +0000 (22:23 -0700)]
* lisp/progmodes/sql.el (sql-add-product): Fix paren typo.
Fixes: debbugs:15435
Glenn Morris [Sun, 13 Oct 2013 05:20:15 +0000 (22:20 -0700)]
* menu-bar.el (menu-bar-update-buffers): Unify Buffers menu prompt string.
Fixes: debbugs:15576
Glenn Morris [Sun, 13 Oct 2013 05:17:42 +0000 (22:17 -0700)]
Doc fixes for text-scale-adjust
* lisp/face-remap.el (text-scale-adjust): Doc fix.
* doc/emacs/display.texi (Text Scale): Update text-scale-adjust details.
Fixes: debbugs:15434
Glenn Morris [Sun, 13 Oct 2013 00:31:19 +0000 (17:31 -0700)]
Use accented form of some names
* doc/emacs/ack.texi (Acknowledgments):
* doc/emacs/emacs.texi (Acknowledgments):
* doc/lispref/intro.texi (Acknowledgments): Use accented form of some names.
* lisp/emacs-lisp/authors.el (authors-aliases, authors-ignored-files):
Add some entries.
(authors-fixed-entries): Use accented form of name.
Glenn Morris [Sun, 13 Oct 2013 00:28:30 +0000 (17:28 -0700)]
ChangeLog fixes prompted by M-x authors
Stefan Monnier [Sat, 12 Oct 2013 20:40:50 +0000 (16:40 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for paren-free
method calls (bug#bug#15594).
(ruby-smie--args-separator-p): New function.
(ruby-smie--forward-token, ruby-smie--backward-token): Use it to
recognize paren-free method calls.
Paul Eggert [Sat, 12 Oct 2013 20:00:38 +0000 (13:00 -0700)]
Merge from gnulib.
This incorporates:
2013-10-10 strtoumax: port to Solaris 8
2013-10-09 strtoimax, strtoumax: port to HP-UX 11.11
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/inttypes.in.h, lib/strtoimax.c, m4/inttypes.m4, m4/strtoimax.m4:
* m4/strtoumax.m4:
Update from gnulib.
Eli Zaretskii [Sat, 12 Oct 2013 13:11:14 +0000 (16:11 +0300)]
Make the MinGW32 build compatible with MinGW runtime 4.x.
nt/inc/dirent.h (struct dirent) [__MINGW_MAJOR_VERSION >= 4]: Make
the layout of 'struct dirent' be compatible with MinGW32 runtime
versions 4.0 and later.
nt/inc/ms-w32.h (__MINGW_MAJOR_VERSION, __MINGW_MINOR_VERSION)
(__MINGW_PATCHLEVEL) [!__MINGW64_VERSION_MAJOR]: Define, if not
defined, but not for MinGW64.
(_USE_32BIT_TIME_T) [__MINGW64_VERSION_MAJOR]: Define, to force
use of 32-bit time_t type.
Glenn Morris [Sat, 12 Oct 2013 10:17:41 +0000 (06:17 -0400)]
Auto-commit of generated files.
Eli Zaretskii [Sat, 12 Oct 2013 09:00:21 +0000 (12:00 +0300)]
Update nt/INSTALL with respect to giflib.
Eli Zaretskii [Sat, 12 Oct 2013 08:48:31 +0000 (11:48 +0300)]
Avoid compilation warnings in image.c.
src/image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
after inclusion of gif_lib.h, thus fixing compiler warnings caused
by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
Stefan Monnier [Sat, 12 Oct 2013 01:10:25 +0000 (21:10 -0400)]
* lisp/isearch.el (isearch-pre-command-hook): Don't build in knowledge about
internals of universal-argument.
Dmitry Gutov [Fri, 11 Oct 2013 20:45:14 +0000 (23:45 +0300)]
* test/indent/ruby.rb: Add two more cases.
Stefan Monnier [Fri, 11 Oct 2013 18:29:18 +0000 (14:29 -0400)]
* configure.ac (LIBGNUTLS): Don't set LIBGNUTLS_* back to the empty
string when gnutls2 is installed but gnutls3 is not.
Eli Zaretskii [Fri, 11 Oct 2013 18:20:08 +0000 (21:20 +0300)]
Fix popping down a menu by a second mouse click.
lisp/menu-bar.el (tty-menu-navigation-map): Bind all menu-bar
sequences to tty-menu-exit -- this pops down a dropped menu on
second mouse click on the menu bar.
Eli Zaretskii [Fri, 11 Oct 2013 17:44:41 +0000 (20:44 +0300)]
Make the same key that opens TTY menus also exit the menu.
lisp/menu-bar.el (tty-menu-navigation-map): Remap F10 to tty-menu-exit.
Eli Zaretskii [Fri, 11 Oct 2013 15:42:06 +0000 (18:42 +0300)]
Support frame dimension changes while TTY menus are displayed.
src/xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
have different dimensions.
src/dispnew.c (fill_up_frame_row_with_spaces): Now has external
visibility.
src/dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
Fixes: debbugs:15575
Dmitry Antipov [Fri, 11 Oct 2013 15:30:21 +0000 (19:30 +0400)]
* term.c (tty_menu_show): Never return with unbalanced
specpdl. Use eassert for debugging check. Adjust style.
Eli Zaretskii [Fri, 11 Oct 2013 14:42:05 +0000 (17:42 +0300)]
Menu item selection on TTYs is now cyclical.
src/term.c (read_menu_input): Make selection of menu items
cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
(tty_menu_activate): Fix off-by-one error when computing max_y.
Ted Zlatanov [Fri, 11 Oct 2013 13:47:35 +0000 (09:47 -0400)]
Support GnuTLS v3 and set up its audit logging properly.
* configure.ac: Define HAVE_GNUTLS3 if GnuTLS v3 is found.
* src/gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
audit logging (only used with GnuTLS 3.x) and enable it.
Dmitry Antipov [Fri, 11 Oct 2013 11:11:28 +0000 (15:11 +0400)]
* dispnew.c (redraw_frame): Remove useless #ifdef because
FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
Also, move TTY fflush to...
* term.c (tty_update_end): ...this function.
Eli Zaretskii [Fri, 11 Oct 2013 11:01:48 +0000 (14:01 +0300)]
Fix bug #15575 with crashes in TTY menus.
src/xdisp.c (display_tty_menu_item): Make sure we never write beyond
the end of the frame's glyph matrix.
src/term.c (tty_menu_display): Don't move cursor while overwriting
frame's glyphs with menu items. Limit the number of items
displayed to what can be shown on the available screen lines,
excluding the echo area.
(tty_menu_activate): Limit the Y coordinate allowed by
read_menu_input to the last screen line used for menu display.
Paul Eggert [Fri, 11 Oct 2013 06:32:29 +0000 (23:32 -0700)]
* lisp.h (eassume): New macro.
Also, include <verify.h>, for 'assume'.
* alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
(vroundup, vector_nbytes):
* data.c (bool_vector_spare_mask, bool_vector_binop_driver)
(Fbool_vector_not, Fbool_vector_count_matches)
(Fbool_vector_count_matches_at):
Use eassume, not eassert.
* casetab.c (set_identity, shuffle):
* composite.c (composition_gstring_put_cache):
* dispnew.c (update_frame_1):
* ftfont.c (ftfont_shape_by_flt):
* image.c (gif_load):
* intervals.c (offset_intervals):
* macfont.m (macfont_shape):
Remove calls to 'assume' that are no longer needed, because
--enable-gcc-warnings no longer generates bogus warnings
when these calls are removed.
Dmitry Antipov [Fri, 11 Oct 2013 03:55:26 +0000 (07:55 +0400)]
* xdisp.c (deep_copy_glyph_row): Remove unused locals.
Stefan Monnier [Fri, 11 Oct 2013 03:28:31 +0000 (23:28 -0400)]
* lisp/progmodes/sh-script.el: Provide simpl(e|istic) completion.
(explicit-shell-file-name): Declare.
(sh--vars-before-point, sh--cmd-completion-table): New functions.
(sh-completion-at-point-function): New function.
(sh-mode): Use it.
(sh-smie--keyword-p): Remove unused argument.
(sh-smie-sh-backward-token, sh-smie-rc-backward-token): Remove unused
vars.
(sh-set-shell): Always setup SMIE, even if we use the
old indentation code.
Dmitry Gutov [Fri, 11 Oct 2013 02:11:37 +0000 (05:11 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Split the
cases of ? and =.
(ruby-smie-rules): Simplify the "do" rule. The cases when the
predicate would return nil are almost non-existent.
(ruby-smie--redundant-do-p): Include "until" and "for" statements.
Dmitry Gutov [Fri, 11 Oct 2013 00:45:03 +0000 (03:45 +0300)]
* lisp/emacs-lisp/smie.el (smie--matching-block-data): Invalidate the
cache also after commands that modify the buffer but don't move
point.
Stefan Monnier [Thu, 10 Oct 2013 21:43:47 +0000 (17:43 -0400)]
* test/automated/ruby-mode-tests.el (ruby-with-temp-buffer): Move before
first use.
(ruby-should-indent): Use indent-according-to-mode.
(ruby-deftest-move-to-block): Use `declare'.
Stefan Monnier [Thu, 10 Oct 2013 21:42:38 +0000 (17:42 -0400)]
* src/fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
(Qsubstitute_env_in_file_name): New var.
(syms_of_fileio): Define it.
* lisp/env.el (substitute-env-in-file-name): New function.
(substitute-env-vars): Extend the meaning of the optional arg.
Eli Zaretskii [Thu, 10 Oct 2013 19:26:13 +0000 (22:26 +0300)]
Attempt to fix crashes per bug #15575.
src/xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
src/term.c (save_and_enable_current_matrix): Don't allocate and
don't save margin areas.
(restore_desired_matrix): Don't restore margin areas.
(free_saved_screen): Don't free margin areas.
Paul Eggert [Thu, 10 Oct 2013 19:15:33 +0000 (12:15 -0700)]
* image.c: Pacify --enable-gcc-warnings.
(GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
#define only if used.
Eli Zaretskii [Thu, 10 Oct 2013 15:30:21 +0000 (18:30 +0300)]
MS-Windows follow-up to 2013-10-10T01:03:11Z!rgm@gnu.org: support giflib 5.x.
src/image.c (GIFLIB_MAJOR): Define to 4 if undefined.
(GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
(GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
(gif_load): For giflib v5.x and later, display the error message
produced by giflib when its functions fail.
(syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
lisp/term/w32-win.el (dynamic-library-alist): Define separate lists
of GIF DLLs for versions before and after 5.0.0 of giflib.
Fixes: debbugs:15531
João Távora [Thu, 10 Oct 2013 14:59:09 +0000 (10:59 -0400)]
* vc/vc.el (vc-diff-build-argument-list-internal): If the file is
not locked, use last revision and current source as
defaults. (Bug#15569)
Masatake YAMATO [Thu, 10 Oct 2013 10:47:11 +0000 (19:47 +0900)]
* lisp/menu-bar.el (menu-bar-open): Don't use popup-menu if
menu-bar is hidden.
Glenn Morris [Thu, 10 Oct 2013 10:17:41 +0000 (06:17 -0400)]
Auto-commit of generated files.
Dmitry Antipov [Thu, 10 Oct 2013 10:06:17 +0000 (14:06 +0400)]
* keyboard.c (last_event_timestamp): Remove. For X selection and
GTK popup menus, it may be obtained from per-frame X display info.
(kbd_buffer_store_event_hold, kbd_buffer_get_event)
(process_special_events): Adjust users.
* keyboard.h (last_event_timestamp): Remove declaration.
* xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
* menu.h (xmenu_show): Adjust prototype.
* menu.c (Fx_popup_menu): Adjust user.
* xselect.c (x_own_selection, x_get_foreign_selection)
(Fx_disown_selection_internal): Use dpyinfo->last_user_time.
Martin Rudalics [Thu, 10 Oct 2013 07:57:28 +0000 (09:57 +0200)]
Fix doc-string of pop-to-buffer-same-window. (Bug#15492)
* window.el (pop-to-buffer-same-window): Fix doc-string.
(Bug#15492)
Dmitry Antipov [Thu, 10 Oct 2013 06:48:42 +0000 (10:48 +0400)]
* keyboard.c (init_kboard): Now static. Add arg
to denote window system. Adjust comment.
(init_keyboard): Adjust user.
(allocate_kboard): New function.
(syms_of_keyboard):
* nsterm.m (ns_term_init):
* term.c (init_tty):
* w32term.c (w32_create_terminal):
* xterm.c (x_term_init): Use it.
* keyboard.h (init_kboard): Remove prototype.
(allocate_kboard): Add prototype.
Stefan Monnier [Thu, 10 Oct 2013 02:33:35 +0000 (22:33 -0400)]
* lisp/menu-bar.el (tty-menu-navigation-map): Reduce redundancy.
Glenn Morris [Thu, 10 Oct 2013 01:29:30 +0000 (21:29 -0400)]
* lib-src/make-docfile.c (search_lisp_doc_at_eol): Use int rather than char
with getc.
Fixes: debbugs:15481
Andrei Chitu [Thu, 10 Oct 2013 01:18:01 +0000 (21:18 -0400)]
* icalendar.el (icalendar-import-file): Fix interactive spec (tiny change)
Fixes: debbugs:15482
Glenn Morris [Thu, 10 Oct 2013 01:03:11 +0000 (21:03 -0400)]
* lisp/desktop.el (desktop-save): Default to saving in .emacs.d,
since PWD is no longer in desktop-path by default.
Fixes: debbugs:15319
Barry Fishman [Thu, 10 Oct 2013 00:37:44 +0000 (20:37 -0400)]
Handle giflib 5 changes (tiny change)
* configure.ac: Update for giflib 5.
* src/image.c (GIFLIB_MAJOR): Ensure it's defined.
(DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
Glenn Morris [Thu, 10 Oct 2013 00:32:36 +0000 (20:32 -0400)]
* lisp/menu-bar.el (menu-bar-options-menu): Remove text-mode auto-fill,
now that text mode has a menu with the same entry.
(menu-bar-text-mode-auto-fill): Remove now unused func.
* lisp/textmodes/text-mode.el (text-mode-map):
Use auto-fill help text from menu-bar.el.
John Anthony [Thu, 10 Oct 2013 00:24:12 +0000 (20:24 -0400)]
* lisp/textmodes/text-mode.el (text-mode-map): Add a menu (tiny change)
Fixes: debbugs:15562
Juri Linkov [Wed, 9 Oct 2013 23:52:46 +0000 (02:52 +0300)]
* lisp/isearch.el (isearch-pre-command-hook): Use this-single-command-keys
instead of this-command-keys. Add universal-argument-more and
universal-argument-minus to the list of prefix commands.
Fixes: debbugs:15568
Paul Eggert [Wed, 9 Oct 2013 22:39:57 +0000 (15:39 -0700)]
* fns.c (sxhash_bool_vector): Fix buffer read overrun.
Eli Zaretskii [Wed, 9 Oct 2013 20:18:38 +0000 (23:18 +0300)]
Fix minor problems in text-mode menu display.
src/term.c (tty_menu_activate): Flush the output stream after
showing the cursor, and don't mark the frame garbaged at exit from
the function. Fixes redisplay glitches when moving from one menu
to another.
Jan Djärv [Wed, 9 Oct 2013 18:50:14 +0000 (20:50 +0200)]
* nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
or throw error.
Fixes: debbugs:15570
Glenn Morris [Wed, 9 Oct 2013 18:49:32 +0000 (14:49 -0400)]
* lisp/vc/vc-svn.el (vc-svn-create-repo): Expand paths in file://... url.
Fixes: debbugs:15446
Paul Eggert [Wed, 9 Oct 2013 17:56:58 +0000 (10:56 -0700)]
* intervals.c (temp_set_point_both): Move test into 'eassert',
for speed.
Paul Eggert [Wed, 9 Oct 2013 17:52:38 +0000 (10:52 -0700)]
* lisp.h (eassert): Don't use 'assume'.
Sometimes 'assume' wins in performance, and sometimes it loses,
so it shouldn't be used all the time. Perhaps we need two
flavors of 'eassert', one for where 'assume' is far more likely
to help or to hurt; but that can be done later.
Problem reported by Dmitry Andipov in
<http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
Also, don't include <verify.h>; no longer needed.
Glenn Morris [Wed, 9 Oct 2013 17:17:20 +0000 (13:17 -0400)]
Doc tweaks for cond
* doc/lispref/control.texi (Conditionals): Copyedits.
* src/eval.c (Fcond): Doc tweak.
Glenn Morris [Wed, 9 Oct 2013 17:10:08 +0000 (13:10 -0400)]
authors.el trivia
* lisp/emacs-lisp/authors.el (authors-aliases, authors-fixed-case):
Add some entries.
(authors): Remove unused local variables.
Eli Zaretskii [Wed, 9 Oct 2013 14:53:13 +0000 (17:53 +0300)]
Fix bug #15565 with assertion violations in x_free_gc.
src/xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
expressions with side effects to eassert.
Glenn Morris [Wed, 9 Oct 2013 10:17:52 +0000 (06:17 -0400)]
Auto-commit of generated files.
Stefan Monnier [Wed, 9 Oct 2013 03:32:35 +0000 (23:32 -0400)]
* lisp/profiler.el: Create a more coherent calltree from partial backtraces.
(profiler-format): Hide the tail with `invisible' so that C-s can still
find the hidden elements.
(profiler-calltree-depth): Don't recurse so enthusiastically.
(profiler-function-equal): New hash-table-test.
(profiler-calltree-build-unified): New function.
(profiler-calltree-build): Use it.
(profiler-report-make-name-part): Indent the calltree less.
(profiler-report-mode): Add visibility specs for profiler-format.
(profiler-report-expand-entry, profiler-report-toggle-entry):
Expand the whole subtree when provided with a prefix arg.
* src/fns.c (hashfn_user_defined): Allow hash functions to return any
Lisp_Object.
Dmitry Gutov [Wed, 9 Oct 2013 03:18:01 +0000 (06:18 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent after hanging
iuwu-mod token.
(ruby-smie--implicit-semi-p): Prohibit implicit semicolon after
hanging iuwu-mod token.
(ruby-smie--forward-token): Do not include a dot after a token in
that token.
(ruby-smie--backward-token): Likewise.
Juri Linkov [Tue, 8 Oct 2013 23:20:12 +0000 (02:20 +0300)]
* lisp/isearch.el (isearch-help-map, isearch-mode-map): Don't bind [t]
to isearch-other-control-char.
(isearch-mode): Add isearch-pre-command-hook to pre-command-hook
and isearch-post-command-hook to post-command-hook.
(isearch-done): Remove isearch-pre-command-hook from pre-command-hook
and isearch-post-command-hook from post-command-hook.
(isearch-unread-key-sequence)
(isearch-reread-key-sequence-naturally)
(isearch-lookup-scroll-key, isearch-other-control-char)
(isearch-other-meta-char): Remove functions.
(isearch-pre-command-hook, isearch-post-command-hook):
New functions based on isearch-other-meta-char rewritten
relying on the new behavior of overriding-terminal-local-map
that does not replace the local keymaps any more.
Fixes: debbugs:15200
Paul Eggert [Tue, 8 Oct 2013 20:04:40 +0000 (13:04 -0700)]
Fix minor problems found by static checking.
* dispnew.c (save_current_matrix): Omit unnecessary casts.
* dispnew.c (update_frame_with_menu): Mark debug local as used.
* keyboard.c, keyboard.h (Qmouse_movement): Now static.
* keyboard.c (read_menu_command): Remove unused local.
* lisp.h (read_menu_command): New decl.
* menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
benefit of STRING_CHAR_AND_LENGTH. All uses changed.
Return ptrdiff_t, not int.
* term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
not int, for benefit of xpalloc.
(tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
and xpalloc.
(have_menus_p): Remove; unused.
(tty_menu_add_pane, tty_menu_add_selection): Change signedness of
local char * pointer to pacify STRING_CHAR_AND_LENGTH.
(tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
Now static.
(save_and_enable_current_matrix): Omit unnecessary casts.
(read_menu_input): Omit local extern decl (now in lisp.h).
Don't access uninitialized storage if mouse_get_xy fails.
(tty_menu_activate): Mark local as initialized, for lint.
(tty_menu_activate, tty_meny_show): Remove unused locals.
Eli Zaretskii [Tue, 8 Oct 2013 19:06:40 +0000 (22:06 +0300)]
Attempt to fix broken compilation on several systems due to menu.h.
src/term.c: Include "../lwlib/lwlib.h" before including menu.h.
Eli Zaretskii [Tue, 8 Oct 2013 18:42:25 +0000 (21:42 +0300)]
Fix bug #15557 with spelling in the manual.
ack.texi (Acknowledgments): Fix spelling of Hrvoje Nikֵ¡iִ‡'s name.
Eli Zaretskii [Tue, 8 Oct 2013 17:49:20 +0000 (20:49 +0300)]
Support menus on text-mode terminals.
src/xterm.h (xw_popup_dialog): Add prototype.
src/xmenu.c (Fx_popup_dialog): Function moved to menu.c.
(xmenu_show): Block input here, instead in Fx_popup_menu.
(xw_popup_dialog): New function, with X-specific bits of popup
dialogs.
src/xdisp.c (deep_copy_glyph_row, display_tty_menu_item): New
functions.
src/window.c (Fset_window_configuration): Use run-time tests of the
frame type instead of compile-time conditionals, when menu-bar
lines are considered.
src/w32term.h (w32con_hide_cursor, w32con_show_cursor)
(w32_popup_dialog): New prototypes.
src/w32menu.c (Fx_popup_dialog): Function deleted.
(w32_popup_dialog): New function, with w32 specific bits of popup
dialogs. Block input here.
src/w32inevt.c (w32_console_read_socket): Minor change to add
debugging TTY events.
src/w32fns.c (show_hourglass): If returning early because the frame
is not a GUI frame, unblock input.
src/w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
(cursorY): New functions.
src/termhooks.h (cursorX, cursorY): Prototypes of functions on
WINDOWSNT, macros that call curX and curY elsewhere.
src/termchar.h (struct tty_display_info) <showing_menu>: New flag.
src/term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
specific function to hide and show cursor on a text-mode terminal.
(tty_menu_struct, struct tty_menu_state): New structures.
(tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
(tty_menu_calc_size, mouse_get_xy, tty_menu_display)
(have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
(tty_menu_locate, save_and_enable_current_matrix)
(restore_desired_matrix, screen_update, read_menu_input)
(tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
(tty_pop_down_menu, tty_menu_last_menubar_item)
(tty_menu_new_item_coords, tty_menu_show): New functions.
(syms_of_term): New DEFSYMs for tty-menu-* symbols.
src/nsterm.h (ns_popup_dialog): Adjust prototype.
src/nsmenu.m (ns_menu_show): Block and unblock input here, instead
of in x-popup-menu.
(ns_popup_dialog): Adapt order of arguments to the other
*_menu_show implementations.
(Fx_popup_dialog): Function deleted.
src/msdos.c (x_set_menu_bar_lines): Delete unused function.
src/menu.h (tty_menu_show, menu_item_width): provide prototypes.
src/menu.c (have_boxes): New function.
(single_keymap_panes): Use it instead of a compile-time
conditional.
(single_menu_item): Use run-time tests of the frame type instead
of compile-time conditionals.
(encode_menu_string): New function.
(list_of_items, list_of_panes): Use it instead of ENCODE_STRING
the macro, since different types of frame need different encoding
of menu items.
(digest_single_submenu): Use run-time tests of frame type instead
of, or in addition to, compile-time conditionals.
(menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
(Fx_popup_menu): Detect when the function is called from keyboard
on a TTY. Don't barf when invoked on a text-mode frame. Check
frame type at run time, instead of compile-time conditionals for
invoking terminal-specific menu-show functions. Call
tty_menu_show on text-mode frames.
(Fx_popup_dialog): Moved here from xmenu.c. Test frame types at
run time to determine which alternative to invoke; support dialogs
on TTYs.
src/keyboard.h <Qmouse_movement>: Declare.
src/keyboard.c <Qmouse_movement>: Now extern.
<Qecho_keystrokes>: New static variable.
(read_key_sequence): Accept an additional argument, a flag to
prevent redisplay during reading of the key sequence. All callers
changed.
(read_menu_command): New function.
(read_char): When COMMANDFLAG is -2, do not redisplay and do not
autosave.
(toolkit_menubar_in_use): New function.
(make_lispy_event): Use it instead of a compile-time test.
src/fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
window-system being available.
src/editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
to x-popup-dialog on the frame type, they all now support popup
dialogs.
src/dispnew.c (save_current_matrix): Save the margin areas.
(restore_current_matrix): Restore margin areas.
(update_frame_with_menu): New function.
src/dispextern.h (display_tty_menu_item, update_frame_with_menu):
Add prototypes.
src/alloc.c (make_save_ptr): Now compiled unconditionally.
lisp/tmm.el (tmm-menubar): Adapt doc string to TTY menus
functionality.
lisp/tooltip.el (tooltip-mode): Don't error out on TTYs.
lisp/menu-bar.el (popup-menu, popup-menu-normalize-position): Moved
here from mouse.el.
(popup-menu): Support menu-bar navigation on TTYs using C-f/C-b
and arrow keys.
(tty-menu-navigation-map): New map for TTY menu navigation.
lisp/loadup.el ("tooltip"): Load even if x-show-tip is not available.
lisp/frame.el (display-mouse-p): Report text-mode mouse as available
on w32.
(display-popup-menus-p): Report availability if mouse is
available; don't condition on window-system.
lisp/faces.el (tty-menu-enabled-face, tty-menu-disabled-face)
(tty-menu-selected-face): New faces.
configure.ac (HAVE_MENUS): Define unconditionally.
doc/emacs/screen.texi (Menu Bar): Adapt to TTY menus.
doc/emacs/frames.texi (Frames): Mention menu support on text terminals.
doc/emacs/files.texi (Visiting): Mention the "File" menu-bar menu.
doc/emacs/display.texi (Standard Faces): Mention TTY faces for menus.
doc/lispref/keymaps.texi (Defining Menus, Mouse Menus, Menu Bar): Modify
wording to the effect that menus are supported on TTYs.
doc/lisprefframes.texi (Pop-Up Menus, Dialog Boxes)
(Display Feature Testing): Update for menu support on TTYs.
etc/NEWS: Mention the new features.
Eli Zaretskii [Tue, 8 Oct 2013 15:11:29 +0000 (18:11 +0300)]
Preload tooltip.el unconditionally.
Stefan Monnier [Tue, 8 Oct 2013 14:57:18 +0000 (10:57 -0400)]
* lisp/emacs-lisp/lisp-mode.el: Font-lock cl-lib constructs.
(lisp-el-font-lock-keywords, lisp-el-font-lock-keywords-1)
(lisp-el-font-lock-keywords-2, lisp-cl-font-lock-keywords)
(lisp-cl-font-lock-keywords-1, lisp-cl-font-lock-keywords-2): New constants.
(lisp-mode-variables): New `elisp' argument.
(emacs-lisp-mode): Use it.
* lisp/font-lock.el (lisp-font-lock-keywords, lisp-font-lock-keywords-1)
(lisp-font-lock-keywords-2): Move to lisp-mode.el.
Dmitry Antipov [Tue, 8 Oct 2013 14:56:15 +0000 (18:56 +0400)]
* dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
(redraw_frame, update_frame): Adjust users.
* dispextern.h (set_window_update_flags): Adjust prototype.
* xdisp.c (redisplay_internal): When updating all frames with zero
windows_or_buffers_changed, assume that only the windows that shows
current buffer should be really updated.
Eli Zaretskii [Tue, 8 Oct 2013 14:37:20 +0000 (17:37 +0300)]
Cleanups and commentary changes.
Eli Zaretskii [Tue, 8 Oct 2013 14:28:37 +0000 (17:28 +0300)]
Horizontal keys in TTY menus work.
Glenn Morris [Tue, 8 Oct 2013 10:17:43 +0000 (06:17 -0400)]
Auto-commit of generated files.
Eli Zaretskii [Tue, 8 Oct 2013 09:01:26 +0000 (12:01 +0300)]
Make tty-menu-open-use-tmm a defcustom, update tmm docs accordingly.
Eli Zaretskii [Tue, 8 Oct 2013 08:22:56 +0000 (11:22 +0300)]
F10 can now invoke menu-bar menus from local map.
Dmitry Antipov [Tue, 8 Oct 2013 06:40:09 +0000 (10:40 +0400)]
Do not allocate huge temporary memory areas and objects while encoding
for file I/O, thus reducing an enormous memory usage for large buffers.
See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
* coding.h (struct coding_system): New member raw_destination.
* coding.c (setup_coding_system): Initialize it to zero.
(encode_coding_object): If raw_destination is set, do not create
dst_object. Add comment.
* fileio.c (toplevel): New constant E_WRITE_MAX.
(e_write): Do not encode more than E_WRITE_MAX characters per one loop
iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
Teemu Likonen [Tue, 8 Oct 2013 06:17:49 +0000 (02:17 -0400)]
* indent.el: Provide interactive indent-rigidly mode. Use lexical-binding.
(indent-rigidly--current-indentation): New function.
(indent-rigidly-map): New var.
(indent-rigidly): Use it to provide interactive mode.
(indent-region): Add progress reporter.
(tab-stop-list): Make it implicitly extend to infinity by repeating the
last step.
(indent--next-tab-stop): New function to implement this behavior.
(tab-to-tab-stop, move-to-tab-stop): Use it.
Fixes: debbugs:8196
Jan Djärv [Tue, 8 Oct 2013 06:12:40 +0000 (08:12 +0200)]
* nsterm.m (windowDidExitFullScreen:):
(toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
Bastien Guerry [Tue, 8 Oct 2013 06:02:20 +0000 (08:02 +0200)]
* register.el (insert-register): Fix 2013-10-07T01:28:34Z!sdl.web@gmail.com.
Paul Eggert [Tue, 8 Oct 2013 05:26:41 +0000 (22:26 -0700)]
Complete ChangeLog entry that was inadvertently truncated.
Paul Eggert [Tue, 8 Oct 2013 05:13:21 +0000 (22:13 -0700)]
Fix race where emacs aborts when sent SIGTERM.
* keyboard.c (unblock_input_to): Don't process pending signals
if a fatal error is in progress.
Fixes: debbugs:15534
Paul Eggert [Tue, 8 Oct 2013 05:12:29 +0000 (22:12 -0700)]
ChangeLog consistency.
Stefan Monnier [Tue, 8 Oct 2013 05:10:10 +0000 (01:10 -0400)]
* lisp/progmodes/perl-mode.el: Use lexical-binding.
Remove redundant :group args.
(perl-nochange): Change default to be closer to other major modes's
standard behavior.
(perl-indent-line): Don't consider text on current line as a
valid beginning of function from which to indent.
Stefan Monnier [Tue, 8 Oct 2013 04:30:31 +0000 (00:30 -0400)]
* lisp/emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@
with more than one argument.
Fixes: debbugs:15538
Paul Eggert [Tue, 8 Oct 2013 04:25:33 +0000 (21:25 -0700)]
* lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
they're talking about words in Lisp bool vectors.
(BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
Stefan Monnier [Tue, 8 Oct 2013 03:48:01 +0000 (23:48 -0400)]
* lisp/mpc.el (mpc-songs-jump-to): Adjust to different playlist format.
Stefan Monnier [Tue, 8 Oct 2013 03:47:24 +0000 (23:47 -0400)]
* lisp/vc/pcvs.el: Use lexical-binding.
(cvs-temp-buffer, cvs-make-cvs-buffer): Pass some vars in the lexical
environment of `eval'.
(cvs-mode-run, cvs-mode-do): Change `postproc' to be a function rather
than a list of expressions. Adjust callers.
* lisp/vc/pcvs-defs.el (cvs-postprocess): Remove, unused.
Dmitry Gutov [Mon, 7 Oct 2013 23:03:16 +0000 (02:03 +0300)]
Refine the last change
Dmitry Gutov [Mon, 7 Oct 2013 23:01:23 +0000 (02:01 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Handle the
case of the dot in a chained method call being on the following
line.
Paul Eggert [Mon, 7 Oct 2013 21:37:19 +0000 (14:37 -0700)]
Improve support for popcount and counting trailing zeros.
Do this by using the Gnulib modules for this.
This should generate faster code on non-GCC, non-MSC platforms,
and make the code a bit more portable, at least in theory.
* admin/merge-gnulib (GNULIB_MODULES): Add count-one-bits
and count-trailing-zeros.
* lib/count-one-bits.c, lib/count-one-bits.h:
* lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
* m4/count-one-bits.m4, m4/count-trailing-zeros.m4:
New files, copied from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* nt/gnulib.mk: Merge changes from lib/gnulib.mk.
* src/data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
(USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
(NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
(popcount_size_t_msc, popcount_size_t_gcc):
Remove; now done by Gnulib.
(popcount_size_t): Now a macro that defers to Gnulib.
(count_trailing_zero_bits): Return int, for consistency with
Gnulib and because Emacs prefers signed to unsigned int.
Don't assume that size_t is either unsigned int or unsigned long
or unsigned long long.
(size_t_to_host_endian): Do not assume that size_t is either
exactly 32 or exactly 64 bits wide.
* src/lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
etc., so that it's now an enum constant, not a macro.
No need to assume that it's either 32 or 64.
Fixes: debbugs:15550
Jan Djärv [Mon, 7 Oct 2013 20:00:25 +0000 (22:00 +0200)]
* nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
on >= 10.7.
Stefan Monnier [Mon, 7 Oct 2013 18:51:26 +0000 (14:51 -0400)]
* lisp/electric.el (electric-indent-inhibit): New var.
(electric-indent-post-self-insert-function): Use it.
* lisp/progmodes/python.el (python-mode): Set it.
Stefan Monnier [Mon, 7 Oct 2013 16:56:51 +0000 (12:56 -0400)]
* lisp/emacs-lisp/smie.el (smie-next-sexp): Refine last fix.
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Tweak handling of
open braces.
Stefan Monnier [Mon, 7 Oct 2013 15:40:24 +0000 (11:40 -0400)]
* lisp/textmodes/css-mode.el (css-smie-rules): Fix indentation.
(css-mode): Use electric-indent-chars.
Fixes: debbugs:15467
Dmitry Antipov [Mon, 7 Oct 2013 15:11:17 +0000 (19:11 +0400)]
* xdisp.c (handle_fontified_prop): Prefer ptrdiff_t to int where needed.
Use bool for boolean.
Dmitry Antipov [Mon, 7 Oct 2013 15:03:33 +0000 (19:03 +0400)]
* insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.