Eli Zaretskii [Fri, 25 Oct 2013 09:45:51 +0000 (12:45 +0300)]
Fix bug #15712 with vertical motion when the goal column needs to hscroll.
lisp/simple.el (line-move): Call line-move-1 instead of
line-move-visual when the current window hscroll is zero, but
temporary-goal-column indicates we will need to hscroll as result
of the movement.
Eli Zaretskii [Fri, 25 Oct 2013 09:42:41 +0000 (12:42 +0300)]
Fix the MS-Windows build broken 2013-10-25T04:35:56Z!dgutov@yandex.ru.
src/w32font.h (w32font_close): Adjust the prototype to the change in
function definition.
src/w32font.c (w32font_close): Reintroduce deleted declaration of i.
src/w32uniscribe.c (uniscribe_close): Adapt the call to
w32font_close to its new prototype.
Dmitry Antipov [Fri, 25 Oct 2013 07:28:16 +0000 (11:28 +0400)]
Perform font-specific cleanup when font object is swept by GC. See
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
* alloc.c (cleanup_vector): New function.
(sweep_vector): Call it for each reclaimed vector object.
* font.h (struct font): Adjust comment.
Dmitry Antipov [Fri, 25 Oct 2013 06:55:36 +0000 (10:55 +0400)]
Omit unused frame argument of font API's close function.
* font.h (struct font): Drop frame argument. Adjust comment.
* font.c (font_clear_cache, font_close_object): Adjust users.
* ftfont.c (ftfont_close):
* ftxfont.c (ftxfont_close):
* macfont.m (macfont_close):
* nsfont.m (nsfont_close):
* w32font.c (w32font_close):
* xfont.c (xfont_close):
* xftfont.c (xftfont_close): Adjust driver-specific close
functions, tweak comments and make functions safe if called
more than once for the same font object.
Dmitry Gutov [Fri, 25 Oct 2013 04:35:56 +0000 (08:35 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-mode-menu): Use proper
capitalization. Use :visible instead of :active. Fix
`ruby-indent-exp' reference. Add menu items for the generic
commands that are used with SMIE.
(ruby-do-end-to-brace): Insert space after `{'.
Stefan Monnier [Thu, 24 Oct 2013 21:16:20 +0000 (17:16 -0400)]
* lisp/emacs-lisp/smie.el: New smie-config system.
(smie-config): New defcustom.
(smie-edebug, smie-config-show-indent, smie-config-set-indent)
(smie-config-guess, smie-config-save): New commands.
(smie-config--mode-local, smie-config--buffer-local)
(smie-config--trace, smie-config--modefuns): New vars.
(smie-config--advice, smie-config--mode-hook)
(smie-config--setter, smie-config-local, smie-config--get-trace)
(smie-config--guess-value, smie-config--guess): New functions.
(smie-indent-forward-token, smie-indent-backward-token): Don't copy
text properties. Treat "string fence" syntax like string syntax.
* lisp/progmodes/sh-script.el (sh-use-smie): Change default.
(sh-smie-sh-rules, sh-smie-rc-rules): Obey legacy sh-indent-* vars.
(sh-var-value): Simplify by CSE.
(sh-show-indent, sh-set-indent, sh-learn-line-indent)
(sh-learn-buffer-indent): Redirect to their SMIE equivalent when SMIE
is used.
(sh-guess-basic-offset): Use cl-incf.
(sh-guess-basic-offset): Use push+nreverse to avoid O(n^2).
Eli Zaretskii [Thu, 24 Oct 2013 16:28:05 +0000 (19:28 +0300)]
Fix last changes to support whitespace in directory names.
lisp/Makefile.in ($(MH_E_DIR)/mh-loaddefs.el)
($(TRAMP_DIR)/tramp-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el): Call
unmsys--file-name before expand-file-name, not after it.
Michael Albinus [Thu, 24 Oct 2013 07:38:45 +0000 (09:38 +0200)]
* automated/ert-tests.el (ert-test-skip-unless): New test case.
(ert-test-deftest): Adapt test for changed macro expansion.
(ert-test-run-tests-interactively):
* automated/ert-x-tests.el (ert-test-run-tests-interactively-2):
Add a skipping test.
* automated/file-notify-tests.el (top): Do not require tramp-sh.el.
(file-notify--test-local-enabled): Make it a function. Check also
for `file-remote-p' of `temporary-file-directory'.
(file-notify--test-remote-enabled-checked): New defvar.
(file-notify--test-remote-enabled): Rewrite. Do not use Tramp
internal functions. Cache result.
(file-notify--deftest-remote, file-notify-test00-availability)
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test03-autorevert): Add checks with `skip_unless'.
(file-notify-test-all): Do not check `file-notify--test-local-enabled'.
Glenn Morris [Thu, 24 Oct 2013 02:29:29 +0000 (19:29 -0700)]
* leim/Makefile.in (.el.elc, changed.tit, changed.misc, leim-list.el)
($(srcdir)/ja-dic/ja-dic.el, check-declare):
Remove unnecessary path in -l argument (RUN_EMACS sets EMACSLOADPATH).
We just need to be careful because "quail" is also a directory...
Dmitry Gutov [Thu, 24 Oct 2013 00:47:28 +0000 (04:47 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block
with parameters" example. Simplify the "is it block or is it
hash" check, but also make it more thorough.
* test/indent/ruby.rb: Fix syntax error in the latest example.
Dmitry Antipov [Wed, 23 Oct 2013 16:07:30 +0000 (20:07 +0400)]
Tweak last font-related changes to fix bug#15686.
* alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
is a live window system frame, mark it's default font too.
Glenn Morris [Wed, 23 Oct 2013 06:22:54 +0000 (23:22 -0700)]
Make building in directories with whitespace possible
Make has trouble with targets containing whitespace,
http://savannah.gnu.org/bugs/?712, so the general approach is
to use relative paths where possible. It's generally only Emacs
itself that needs absolute paths, eg in src/epaths.h.
* configure.ac (srcdir): Don't make it absolute - abs_srcdir exists.
* Makefile.in (abs_srcdir): New, set by configure.
(buildlisppath): Use abs_srcdir.
(install-arch-indep, install-etcdoc, install-info, install-man)
(install-etc): Quote entities that might contain whitespace.
* admin/unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el):
Quote entities that might contain whitespace.
* leim/Makefile.in (abs_srcdir): New, set by configure.
(buildlisppath): Use abs_srcdir.
(RUN_EMACS, .el.elc, changed.tit, changed.misc, leim-list.el)
($(srcdir)/ja-dic/ja-dic.el, setwins, distclean, check-declare):
Quote entities that might contain whitespace.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.
* lisp/Makefile.in (abs_srcdir, abs_lisp): New, set by configure.
(emacs, compile, compile-always):
Quote entities that might contain whitespace.
(custom-deps, finder-data, autoloads): Use abs_lisp.
($(MH_E_DIR)/mh-loaddefs.el, $(TRAMP_DIR)/tramp-loaddefs.el)
($(CAL_DIR)/cal-loaddefs.el, $(CAL_DIR)/diary-loaddefs.el)
($(CAL_DIR)/hol-loaddefs.el): Manually expand target file name.
* nextstep/Makefile.in (${ns_check_file} ${ns_appdir}):
Quote entities that might contain whitespace.
* nt/Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.
* src/Makefile.in (RUN_TEMACS): Make relative (again).
($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
(bootstrap-emacs$(EXEEXT)):
Quote entities that might contain whitespace.
* test/automated/Makefile.in (abs_top_srcdir, top_builddir):
New, set by configure.
(top_srcdir): Remove.
(abs_test, abs_lispsrc): New.
(lisp): No longer absolute.
(emacs, lisp-compile, compile, compile-always):
Quote entities that might contain whitespace.
Paul Eggert [Wed, 23 Oct 2013 04:01:46 +0000 (21:01 -0700)]
Merge from gnulib.
This incorporates:
2013-10-14 acl: allow cross-compilation to Gentoo
2013-10-18 extern-inline: make safe for -Wundef usage
2013-09-30 fpending: use pure+const function attrs
* lib/fpending.h, m4/acl.m4, m4/extern-inline.m4: Update from gnulib.
Stefan Monnier [Tue, 22 Oct 2013 15:45:56 +0000 (11:45 -0400)]
* lisp/emacs-lisp/smie.el (smie-rule-parent): Fix opener-test.
* lisp/progmodes/ruby-mode.el (ruby-smie-rules):
Remove corresponding workaround. Fix indentation rule of ";" so it
also applies when ";" is the parent.
Katsumi Yamaoka [Tue, 22 Oct 2013 10:22:59 +0000 (10:22 +0000)]
lisp/gnus/mm-decode.el (mm-dissect-buffer): Guess content-type if the first token is missing in the Content-Type header
lisp/gnus/nndoc.el (nndoc-dissect-mime-parts-sub): Ditto
Dmitry Gutov [Mon, 21 Oct 2013 22:25:59 +0000 (02:25 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated
TODO. Add "." after " @ ".
(ruby-smie--at-dot-call): New function. Checks if point at method
call with explicit target.
(ruby-smie--forward-token, ruby-smie--backward-token): Prepend "."
to the method name tokens when it precedes them.
(ruby-smie--backward-id, ruby-smie--forward-id): Remove.
(ruby-smie-rules): Add rule for indentation before and after "."
token.
Dmitry Antipov [Mon, 21 Oct 2013 14:11:25 +0000 (18:11 +0400)]
Do not allow font caches to grow too large.
* alloc.c (compact_font_cache_entry, compact_font_caches):
New functions or stub if not HAVE_WINDOW_SYSTEM.
(compact_undo_list): Factor out from Fgarbage_collect.
Add comment.
(mark_face_cache): Mark face font. Move down to avoid
extra prototypes.
(mark_terminals): Do not mark font cache here.
(Fgarbage_collect): Call compaction functions described
above. Adjust comment.
Dmitry Gutov [Mon, 21 Oct 2013 03:50:06 +0000 (07:50 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Add binding for
`smie-down-list'.
(ruby-smie--args-separator-p): Check that there's no newline
between method call and its arguments.
(ruby-smie-rules): Handle new cases: curly block with and without
parameters, hash surrounded with parens, block passed to
paren-less method call.
* test/indent/ruby.rb: New examples for indentation of blocks. Example
of hash inside parens that inflooped before this commit.
Alan Mackenzie [Sun, 20 Oct 2013 14:27:22 +0000 (14:27 +0000)]
Allow comma separated lists after Java "implements".
* progmodes/cc-engine.el (c-backward-over-enum-header): parse
commas.
* progmodes/cc-fonts.el (c-basic-matchers-after): Remove comma
from a "disallowed" list in enum fontification.
Alan Mackenzie [Sat, 19 Oct 2013 15:11:07 +0000 (15:11 +0000)]
Fix fontification bugs with constructors and const.
* progmodes/cc-engine.el (c-forward-decl-or-cast-1): (Just after
CASE 2) Remove the check for the absence of a suffix construct
after a function declaration with only types (no identifiers) in
the parentheses. Also, accept a function declaration with just a
type inside the parentheses, if this type can be positively
recognised as such, or if a prefix keyword like "explicit" nails
down the construct as a declaration.
Eli Zaretskii [Sat, 19 Oct 2013 08:35:51 +0000 (11:35 +0300)]
Fix TTY menus when they lead to a minibuffer prompt.
lisp/menu-bar.el (tty-menu-navigation-map): Bind mouse-N to perform
TTY menu actions and down-mouse-N to tty-menu-ignore. This solves
the problem whereby selecting a menu item that leads to a
minibuffer prompt moves the cursor out of the minibuffer window,
making it hard to type at the prompt. Suggested by Stefan Monnier
<monnier@iro.umontreal.ca>.
Eli Zaretskii [Fri, 18 Oct 2013 13:33:25 +0000 (16:33 +0300)]
Fix clicks on the menu bar when GPM mouse is in use.
src/keyboard.c (make_lispy_event): Remove GPM-specific code that
handles mouse clicks. Instead, let GPM use the same code as all
the other mice use. See the discussion starting at
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
for the details of the problem with the menu bar this fixes.
Barry O'Reilly [Fri, 18 Oct 2013 04:27:34 +0000 (00:27 -0400)]
Don't run timers in input-pending-p. Its new check-timers param
provides the prior behavior..
* src/keyboard.c (Finput_pending_p): Accept optional check-timers
param.
* lisp/subr.el (sit-for): Call (input-pending-p t) so as to behave
as before.
* test/automated/timer-tests.el: New file. Tests that (sit-for 0)
allows another timer to run.