Commit Graph

113201 Commits

Author SHA1 Message Date
Stefan Monnier
2abb4e6560 * lisp/electric.el (electric-indent-inhibit): New var.
(electric-indent-post-self-insert-function): Use it.
* lisp/progmodes/python.el (python-mode): Set it.
2013-10-07 14:51:26 -04:00
Stefan Monnier
d2e0e79548 * lisp/emacs-lisp/smie.el (smie-next-sexp): Refine last fix.
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Tweak handling of
open braces.
2013-10-07 12:56:51 -04:00
Stefan Monnier
bdc6b4c8f6 * lisp/textmodes/css-mode.el (css-smie-rules): Fix indentation.
(css-mode): Use electric-indent-chars.

Fixes: debbugs:15467
2013-10-07 11:40:24 -04:00
Dmitry Antipov
764636db72 * xdisp.c (handle_fontified_prop): Prefer ptrdiff_t to int where needed.
Use bool for boolean.
2013-10-07 19:11:17 +04:00
Dmitry Antipov
bd74250fd7 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed. 2013-10-07 19:03:33 +04:00
Stefan Monnier
da3e5ebb8d * lisp/nxml/nxml-mode.el: Use lexical-binding and syntax-propertize.
(font-lock-beg, font-lock-end): Move before first use.
(nxml-mode): Use syntax-propertize-function.
(nxml-after-change, nxml-after-change1): Adjust accordingly.
(nxml-extend-after-change-region): Remove.
* lisp/nxml/nxml-ns.el: Use lexical-binding.
(nxml-ns-save): Use `declare'.
(nxml-ns-prefixes-for): Avoid add-to-list.
* lisp/nxml/nxml-util.el: Use lexical-binding.
(nxml-with-degradation-on-error, nxml-with-invisible-motion):
Use `declare'.
* lisp/nxml/rng-match.el: Use lexical-binding.
(rng--ipattern): Use cl-defstruct.
(rng-compute-start-tag-open-deriv, rng-compute-start-attribute-deriv)
(rng-cons-group-after, rng-subst-group-after)
(rng-subst-interleave-after, rng-apply-after, rng-compute-data-deriv):
Use closures instead of `(lambda...).
* lisp/nxml/xmltok.el: Use lexical-binding.
(xmltok-save): Use `declare'.
(xmltok-unclosed-reparse-p, xmltok-semi-closed-reparse-p): Remove.
2013-10-07 09:54:48 -04:00
Dmitry Gutov
2f84ba1086 * test/indent/ruby.rb: Fix a spurious change, add more failing examples. 2013-10-07 16:27:29 +03:00
Michael Albinus
81856d28fc * trampver.texi: Update release number. 2013-10-07 14:48:18 +02:00
Michael Albinus
f8f91d5d56 * net/tramp.el (tramp-handle-insert-file-contents): Improve handling
of BEG and END.

* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
`tramp-handle-insert-file-contents'.
(tramp-gvfs-handle-insert-file-contents): Remove function.

* net/tramp-sh.el (tramp-sh-handle-insert-directory): Use
`save-restriction' in order to keep markers.

* net/trampver.el: Update release number.
2013-10-07 14:45:20 +02:00
Dmitry Antipov
cc593f54d9 * alloc.c (Fmake_string): Fix last change. 2013-10-07 14:27:48 +04:00
Paul Eggert
223752d78f emacs_read and emacs_write now use void *, not char *.
* alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
* sysdep.c (emacs_read, emacs_write, emacs_write_sig):
Buffer arg is now void *, not char *.  This matches plain
'read' and 'write' better, and avoids a constraint violation
on Solaris 9 with Oracle Studio.
2013-10-07 01:05:00 -07:00
Dmitry Antipov
3c439e0a84 * alloc.c (Fmake_string): For ASCII char initializer, prefer
memset to explicit loop.  Otherwise copy largest possible chunk
from initialized to uninitialized part, thus allowing the longer
memcpy runs and reducing the number of loop iterations.
2013-10-07 11:15:37 +04:00
Stefan Monnier
55ca2c0df0 * lisp/progmodes/compile.el (compilation-parse-errors):
Use compilation--put-prop.
(compilation--ensure-parse): Check compilation-multiline.
2013-10-07 01:15:48 -04:00
Stefan Monnier
731fc3aec8 * lisp/emacs-lisp/easymenu.el (easy-menu-create-menu): Use closures. 2013-10-07 01:13:51 -04:00
Stefan Monnier
a58332802b * lisp/emacs-lisp/lisp-mode.el (eval-defun-2): Simplify, using lexical-binding. 2013-10-07 01:11:50 -04:00
Stefan Monnier
2e7ba2c231 * lisp/emacs-lisp/tq.el (tq-create): Use a closure instead of `(lambda...). 2013-10-07 01:10:06 -04:00
Stefan Monnier
6de913c47e * doc/lispref/tips.texi (Comment Tips): Discourage use of triple semi-colons
for non-headings.
2013-10-06 23:46:32 -04:00
Stefan Monnier
7ccae3b126 * lisp/progmodes/ruby-mode.el: Fix recently added tests.
(ruby-smie-grammar): Add - and +.
(ruby-smie--redundant-do-p, ruby-smie--forward-id)
(ruby-smie--backward-id): New functions.
(ruby-smie--forward-token, ruby-smie--backward-token): Use them.
(ruby-smie-rules): Handle hanging do.  Get rid of hack, not needed
any more.
* test/indent/ruby.rb: Add a few more tests; adjust some indentation.
2013-10-06 23:38:26 -04:00
Leo Liu
c8af480df7 * etc/NEWS: Mention new feature of register commands. 2013-10-07 11:34:26 +08:00
Leo Liu
85698d6349 * register.el (register-preview-delay)
(register-preview-functions): New variables.
(register-read-with-preview, register-preview)
(register-describe-oneline): New functions.
(point-to-register, window-configuration-to-register)
(frame-configuration-to-register, jump-to-register)
(number-to-register, view-register, insert-register)
(copy-to-register, append-to-register, prepend-to-register)
(copy-rectangle-to-register): Use register-read-with-preview to
read register.

Fixes: debbugs:15525
2013-10-07 09:28:34 +08:00
Dmitry Gutov
568e370dad * indent/ruby.rb: Fix a factual error. 2013-10-07 00:34:40 +03:00
Dato Simó
3986af6c88 * net/network-stream.el (network-stream-open-starttls): Don't add
--insecure if it's already present, because that gnutls-cli
rejects getting that parameter twice.
2013-10-06 19:14:11 +02:00
Jan Djärv
a3e9050cbb Don't force auto hide dock when hide menu changes.
(ns_update_auto_hide_menu_bar): Remove runtime check.
Don't auto hide dock unless menubar is also auto hidden.
2013-10-06 17:59:11 +02:00
Jan Djärv
28c760996e * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
hide toolbar.
(windowDidEnterFullScreen:): If presentation options are zero,
set them here (Bug#15388).
2013-10-06 17:53:30 +02:00
Xue Fuqiao
9548391ca2 Remove unnecessary @refill. 2013-10-06 17:46:04 +08:00
Dmitry Gutov
7318480cec * test/automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp'
and `ruby-backward-sexp' that fail when `ruby-use-smie' is t.

* test/indent/ruby.rb: Two more failing examples.
2013-10-06 04:21:51 +03:00
Dmitry Gutov
5cd9cda9b6 * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Dedent `ensure'
keyword, too.

* test/indent/ruby.rb: Fix a syntax error, add a few failing examples.
2013-10-06 03:46:28 +03:00
Dmitry Gutov
da9ea6d980 * lisp/newcomment.el (comment-use-global-state): Change default value
to t, mark obsolete.
(comment-beginning): In addition to `comment-to-syntax', check the
value of `comment-use-global-state'.

Fixes: debbugs:15251
2013-10-06 02:40:16 +03:00
Stefan Monnier
34d1a1337d Get Ruby's SMIE code to pass the test suite.
* lisp/progmodes/ruby-mode.el (ruby-use-smie): Change default.
(ruby-comment-column): Follow the global default, by default.
(ruby-smie-grammar): Add assignment syntax.
(ruby-smie--implicit-semi-p): No implicit semi-colon after an
open-paren, a comma, or a \.
(ruby-smie--forward-token, ruby-smie--backward-token): Handle heredocs,
and line continuations.
(ruby-smie-rules): Adjust handling of open-paren, now that it's never
followed by implicit semi-colons.  Add rule for string concatenation
and for indentation at BOB.
(ruby-forward-sexp, ruby-backward-sexp): Adjust for when smie is in use.

* lisp/emacs-lisp/smie.el (smie-next-sexp): Don't go back to pos before
calling next-sexp, since next-token may have skipped chars which
next-sexp doesn't know should be skipped!

* test/indent/ruby.rb: Port a few cases from automated/ruby-mode-tests.el.
Adjust indentation of continued line to the new SMIE behavior.
2013-10-05 14:37:08 -04:00
Dmitry Gutov
aa0214dae5 Revert 2013-10-05T02:26:39Z!dgutov@yandex.ru
`last-coding-system-used' is unreliable: it can be modified by other functions
in `after-save-hook'.
2013-10-05 20:21:22 +03:00
Xue Fuqiao
544a2a8049 Minor doc fixes. 2013-10-05 23:06:17 +08:00
Jan Djärv
a27fd309a1 * nsterm.m (check_native_fs): Remove erroneous comment. 2013-10-05 16:41:10 +02:00
Xue Fuqiao
9e73b24216 * doc/lispref/syntax.texi (Categories): Add an index for category sets. 2013-10-05 19:49:02 +08:00
Glenn Morris
bf48d1406f Auto-commit of generated files. 2013-10-05 06:17:33 -04:00
Leo Liu
6f6ab820c8 * progmodes/octave.el (octave-send-region): Call
compilation-forget-errors.
2013-10-05 10:45:24 +08:00
Dmitry Gutov
0106e5b399 * lisp/progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding'
to `after-save-hook' instead of `before-save-hook', because then
we know exactly what encoding was used to write the file.
(ruby-mode-set-encoding): Use `last-coding-system-used' instead of
guessing.  Call `basic-save-buffer-1' after modifying the buffer.
2013-10-05 05:26:39 +03:00
Xue Fuqiao
34ca0f4c79 New functions for finding the administrative directory in VC.
* vc/vc-svn.el (vc-svn-find-admin-dir):
* vc/vc-rcs.el (vc-rcs-find-admin-dir):
* vc/vc-mtn.el (vc-mtn-find-admin-dir):
* vc/vc-cvs.el (vc-cvs-find-admin-dir):
* vc/vc-arch.el (vc-arch-find-admin-dir): New functions.
2013-10-05 07:47:00 +08:00
Stefan Monnier
a27c1b72c5 * lisp/textmodes/css-mode.el (css-smie-rules): Toplevel's a list.
* test/automated/completion-tests.el:
* test/indent/css-mode.css: New files.

Fixes: debbugs:15467
2013-10-04 17:45:37 -04:00
Stefan Monnier
258ab3bc88 * lisp/subr.el (read-passwd): Hide chars even when called within a context
where after-change-functions is disabled.
(set-temporary-overlay-map): Don't remove oneself from pre-command-hook
until we removed ourself from overriding-terminal-local-map.

Fixes: debbugs:15501
2013-10-04 15:06:45 -04:00
Leo Liu
939fb29cd9 * progmodes/octave.el (inferior-octave-mode): Call
compilation-forget-errors.
2013-10-04 23:11:13 +08:00
Xue Fuqiao
63bd7f352f * lisp/emacs-lisp/syntax.el (syntax-ppss): Doc fix. 2013-10-04 22:46:31 +08:00
Paul Eggert
cd30a8e09c In nt/gnulib.mk create <byteswap.h> from <byteswap.in.h>.
* gnulib.mk: Create <byteswap.h> from <byteswap.in.h>.
2013-10-04 16:27:11 +02:00
Dmitry Antipov
942f6f82c9 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
uses find_newline instead of scan_newline and so doesn't move point.
2013-10-04 17:41:10 +04:00
Michael Albinus
9e6229fabe * net/secrets.el (secrets-create-collection): Add optional
argument ALIAS.  Use proper Label keyword.  Append ALIAS as
dbus-call-method argument.  (Bug#15516)
2013-10-04 12:31:59 +02:00
Glenn Morris
eafe4c8720 Auto-commit of generated files. 2013-10-04 06:17:40 -04:00
Leo Liu
1dab32a392 * progmodes/octave.el (inferior-octave-error-regexp-alist)
(inferior-octave-compilation-font-lock-keywords): New variables.
(compilation-error-regexp-alist)
(compilation-mode-font-lock-keywords): Defvar to pacify compiler.
(inferior-octave-mode): Use compilation-shell-minor-mode.
2013-10-04 17:45:25 +08:00
Paul Eggert
4eed315732 Use hardware support for byteswapping on glibc x86 etc.
On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
whereas the old swap64 needed 30.
* admin/merge-gnulib (GNULIB_MODULES): Add byteswap.
* lib/byteswap.in.h, m4/byteswap.m4: New files, copied from Gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
* src/sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
Use byteswap.h's macros to swap bytes.
* src/lisp.h (swap16, swap32, swap64): Remove.
All uses replaced by bswap_16, bswap_32, bswap_64.
2013-10-04 00:36:22 -07:00
Paul Eggert
157fec2e19 * bytecode.c (exec_byte_code): Use some more volatile variables
to work around local variables getting clobbered by longjmp.
Port to pre-C99, which doesn't allow decls after stmts.
2013-10-03 23:51:50 -07:00
Jorgen Schaefer
6cad7ba3b9 * lisp/minibuffer.el (completion--replace): Be careful that `end' might be
a marker.
2013-10-03 22:12:16 -04:00
Paul Eggert
75273afb0d * lisp.h (eassert): Assume that COND is true when optimizing.
In other words, take on the behavior of eassert_and_assume.
This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
(eassert_and_assume): Remove.  All uses replaced by eassert.
2013-10-03 09:16:31 -07:00