1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-15 15:50:57 -08:00
Commit graph

116079 commits

Author SHA1 Message Date
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
Eli Zaretskii
f9e5cb0ad3 Improve commentary. 2013-10-05 20:38:22 +03:00
Eli Zaretskii
401cf89091 Account for character width on display in menu bar. 2013-10-05 20:28:27 +03: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
Eli Zaretskii
72b70f6a68 Fix pop down menu with another click on menu bar. 2013-10-05 19:33:37 +03:00
Eli Zaretskii
63dfbda7df Fix menu drop by mouse click; new primitive menu-bar-menu-at-x-y. 2013-10-05 18:42:17 +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
Eli Zaretskii
6270e29ea3 Fix hiding cursor when displaying menu on a TTY. 2013-10-03 23:13:15 +03:00
Eli Zaretskii
2b2d19f218 Mark Lisp menu changes as documented in NEWS. 2013-10-03 22:11:21 +03:00
Eli Zaretskii
981b26a63a More updates for documentation. 2013-10-03 22:10:34 +03: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
Xue Fuqiao
c9358b45b9 Add an index for modify-syntax-entry. 2013-10-03 23:32:10 +08:00
Xue Fuqiao
79b3ad55f6 * doc/lispref/syntax.texi (Syntax Flags): Add an index for comment style. 2013-10-03 23:09:18 +08:00
Paul Eggert
ead45345b1 * xdisp.c (Qglyphless_char): Now static. 2013-10-03 06:55:28 -07:00
Glenn Morris
8a3fafec9b Auto-commit of generated files. 2013-10-03 06:17:43 -04:00
Daiki Ueno
acbadd0046 Add support for package signature checking.
* lisp/emacs-lisp/package.el (url-http-file-exists-p)
(epg-make-context, epg-context-set-home-directory)
(epg-verify-string, epg-context-result-for)
(epg-signature-status, epg-signature-to-string)
(epg-check-configuration, epg-configuration)
(epg-import-keys-from-file): Declare.
(package-check-signature): New user option.
(package-unsigned-archives): New user option.
(package-desc): Add `signed' field.
(package-load-descriptor): Set `signed' field if .signed file exists.
(package--archive-file-exists-p): New function.
(package--check-signature): New function.
(package-install-from-archive): Check package signature.
(package--download-one-archive): Check archive signature.
(package-delete): Remove .signed file.
(package-import-keyring): New command.
(package-refresh-contents): Import default keyring.
(package-desc-status): Add "unsigned" status.
(describe-package-1, package-menu--print-info)
(package-menu-mark-delete, package-menu--find-upgrades)
(package-menu--status-predicate): Support "unsigned" status.

* test/automated/data/package/signed/archive-contents:
* test/automated/data/package/signed/archive-contents.sig:
* test/automated/data/package/signed/signed-good-1.0.el:
* test/automated/data/package/signed/signed-good-1.0.el.sig:
* test/automated/data/package/signed/signed-bad-1.0.el:
* test/automated/data/package/signed/signed-bad-1.0.el.sig:
* test/automated/data/package/key.pub:
* test/automated/data/package/key.sec: New files.

* test/automated/package-test.el (package-test-update-listing)
(package-test-update-archives, package-test-describe-package):
Adjust to package.el change.
(package-test-signed): New test.
2013-10-03 16:11:27 +09:00
Paul Eggert
0a858ebfc5 Merge from gnulib.
* src/conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
* src/lisp.h: Include <verify.h>, for 'assume'.

This also incorpoprates:
2013-10-02 verify: new macro 'assume'
2013-09-26 dup2, dup3: work around another cygwin crasher
2013-09-26 getdtablesize: work around cygwin issue
2013-10-03 00:06:52 -07:00
Paul Eggert
b52f569dcf * eval.c (clobbered_eassert): New macro.
(internal_catch, internal_condition_case)
(internal_condition_case_1, internal_condition_case_2)
(internal_condition_case_n): Use it instead of eassert
when the argument contains locals clobbered by longjmp.
Don't use clobbered locals outside of clobbered_eassert.
(internal_lisp_condition_case): Use a volatile variable
to work around a local variable's getting clobbered.
2013-10-02 23:31:06 -07:00
Stefan Monnier
adf2aa6140 Introduce new bytecodes for efficient catch/condition-case in lexbind.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Optimize under `condition-case' and `catch' if
byte-compile--use-old-handlers is nil.
(disassemble-offset): Handle new bytecodes.

* lisp/emacs-lisp/bytecomp.el (byte-pushcatch, byte-pushconditioncase)
(byte-pophandler): New byte codes.
(byte-goto-ops): Adjust accordingly.
(byte-compile--use-old-handlers): New var.
(byte-compile-catch): Use new byte codes depending on
byte-compile--use-old-handlers.
(byte-compile-condition-case--old): Rename from
byte-compile-condition-case.
(byte-compile-condition-case--new): New function.
(byte-compile-condition-case): New function that dispatches depending
on byte-compile--use-old-handlers.
(byte-compile-unwind-protect): Pass a function to byte-unwind-protect
when we can.

* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): Adjust for
the new compilation scheme using the new byte-codes.

* src/alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
and make them unconditional now that they're heap-allocated.

* src/bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
and Bpophandler.
(bcall0): New function.
(exec_byte_code): Add corresponding cases.  Improve error message when
encountering an invalid byte-code.  Let Bunwind_protect accept
a function (rather than a list of expressions) as argument.

* src/eval.c (catchlist): Remove (merge with handlerlist).
(handlerlist, lisp_eval_depth): Not static any more.
(internal_catch, internal_condition_case, internal_condition_case_1)
(internal_condition_case_2, internal_condition_case_n):
Use PUSH_HANDLER.
(unwind_to_catch, Fthrow, Fsignal): Adjust to merged
handlerlist/catchlist.
(internal_lisp_condition_case): Use PUSH_HANDLER.  Adjust to new
handlerlist which can only handle a single condition-case handler at
a time.
(find_handler_clause): Simplify since we only a single branch here
any more.

* src/lisp.h (struct handler): Merge struct handler and struct catchtag.
(PUSH_HANDLER): New macro.
(catchlist): Remove.
(handlerlist): Always declare.
2013-10-03 00:58:56 -04:00
Stefan Monnier
328a8179fe * lisp/subr.el (decode-char, encode-char): Use advertised-calling-convention
instead of the docstring to discourage use of the `restriction' arg.
(error): Use `declare'.
* src/charset.c (Fdecode_char, Fencode_char): Remove description of
`restriction' arg. now that it's hidden by advertised-calling-convention.
2013-10-03 00:41:23 -04:00
Daiki Ueno
15a1e936a0 epg: doc improvement for verify functions
* epg.el (epg-verify-file): Add a comment saying that it does not
notify verification error as a return value nor a signal.
(epg-verify-string): Ditto.
2013-10-03 10:29:17 +09:00
Kevin Rodgers
376f862a32 * lisp/progmodes/compile.el (compilation-start): Try globbing the arg to `cd'.
Fixes: debbugs:15417
2013-10-02 19:33:48 -04:00
Eli Zaretskii
ac776dae2e Improve NEWS. 2013-10-02 22:47:33 +03:00
Jan Djärv
c348360a2b * macfont.m (macfont_draw): Use s->ybase for correct y position. 2013-10-02 20:52:34 +02:00
Eli Zaretskii
ffe759ebe3 Fix display-mouse-p and display-popup-menus-p for TTYs; menus in Custom work. 2013-10-02 21:44:40 +03:00
Eli Zaretskii
d797af5518 Fix documentation. 2013-10-02 20:40:29 +03:00
Eli Zaretskii
0a12fca058 NEWS updated. 2013-10-02 20:40:08 +03:00
Eli Zaretskii
4b65d53956 Documentation updates. 2013-10-02 20:27:52 +03:00
Dmitry Antipov
1a23cd48f5 * frame.h (struct frame): Drop has_minibuffer member because...
(FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
* frame.c (make_frame, make_minibuffer_frame): Adjust users.
2013-10-02 19:38:12 +04:00
Xue Fuqiao
8c1f51ffff Add an index for the table of syntax classes.
* doc/lispref/syntax.texi (Syntax Class Table): Add an index for syntax class table.
2013-10-02 23:14:06 +08:00