Stefan Monnier
d361bcfbc7
* lisp/select.el: Use lexical-binding.
...
(gui-set-selection): Provide an implementation for non-GUI frames.
* lisp/term/x-win.el: Use lexical-binding.
(x-clipboard-yank): Fix up missed renamings.
* lisp/term/w32-win.el (libgif-version, libjpeg-version): Silence compiler.
(w32--set-selection): Fix up var names.
* lisp/term/pc-win.el: Use lexical-binding.
(w16-selection-exists-p): Silence compiler warning.
(w16-selection-owner-p): Fix up missed renamings.
* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Remove left-over debug.
* lisp/frame.el (frame-notice-user-settings): Fix excessive quoting.
Fixes: debbugs:18791
2014-10-22 21:38:59 -04:00
Glenn Morris
8a85c254de
Merge from emacs-24; up to 2014-07-28T06:28:15Z!dmantipov@yandex.ru
2014-10-20 20:59:41 +01:00
Stefan Monnier
d20b72d9fa
Restore temporarily reverted bytecomp change
...
* lisp/emacs-lisp/bytecomp.el (=, <, >, <=, >=): Don't optimize multi-arg case.
Fixes: debbugs:18767
2014-10-20 20:23:50 +01:00
Glenn Morris
dfccf2f60d
Temporarily revert previous bytecomp change
2014-10-20 20:19:15 +01:00
Stefan Monnier
41e856b539
* lisp/emacs-lisp/bytecomp.el (=, <, >, <=, >=): Don't optimize multi-arg
...
case.
Fixes: debbugs:18767
2014-10-19 22:36:22 -04:00
Stefan Monnier
265331858f
* lisp/emacs-lisp/eieio: A bit more cleanup, removing compat code.
...
* lisp/emacs-lisp/eieio-core.el (eieio-compiled-function-arglist): Remove.
(eieio--with-scoped-class): Use `declare'.
(eieio-defclass): Remove compatibility code.
(no-method-definition, no-next-method, inconsistent-class-hierarchy)
(invalid-slot-type, unbound-slot, invalid-slot-name): Use define-error.
* lisp/emacs-lisp/eieio-opt.el (eieio-lambda-arglist): Remove.
Use help-function-arglist instead.
2014-10-18 22:14:58 -04:00
Stefan Monnier
942501730f
* lisp/emacs-lisp/eieio-base.el: Use lexical-binding and cl-lib.
...
* lisp/emacs-lisp/eieio-core.el: Use lexical-binding and cl-lib.
(list-of): New type.
(eieio--typep): Remove.
(eieio-perform-slot-validation): Use cl-typep instead.
* lisp/emacs-lisp/eieio.el: Use lexical-binding drop non-GV fallback.
(defclass, defgeneric, defmethod): Add doc-string position.
(with-slots): Require cl-lib.
* lisp/emacs-lisp/cl-macs.el (cl--make-type-test): Avoid ((lambda ..) ..).
2014-10-17 01:09:24 -04:00
Stefan Monnier
dcdf2bd8d6
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Enable by default.
...
Remove incorrect handling of eldoc-print-after-edit.
(eldoc-message-commands, eldoc-last-data): Use defvar.
* lisp/loadup.el (emacs-lisp/eldoc): Load it.
* src/lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
2014-10-15 13:32:41 -04:00
Glenn Morris
924a09e916
Merge from emacs-24; up to 2014-07-27T09:41:59Z!ttn@gnu.org
2014-10-14 19:42:58 -07:00
Stefan Monnier
6d81466ac6
* lisp/emacs-lisp/lisp.el (lisp--local-variables-1): Handle `quote'.
...
Backported.
Fixes: debbugs:18688
2014-10-14 22:00:20 -04:00
Eli Zaretskii
1d4795e866
Fix display of R2L entries in tabulated-list-mode.
...
lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Force
bidi-paragraph-direction to 'left-to-right'. This fixes
buffer-menu display when the first buffer happens to start with
R2L letter.
2014-10-14 22:29:47 +03:00
Glenn Morris
440cb8f6cc
Tweak previous authors.el change
2014-10-13 15:52:43 -04:00
Glenn Morris
7dbd8a2cb6
Small authors.el updates
...
* lisp/emacs-lisp/authors.el (authors-aliases, authors-fixed-case)
(authors-obsolete-files-regexps): Additions.
(authors-no-scan-regexps): New constant.
(authors-no-scan-file-p): New function.
(authors): Respect authors-no-scan-file-p.
2014-10-13 15:32:14 -04:00
Leo Liu
2dbd7a37a8
Enhance terpri to allow conditionally output a newline
...
* doc/lispref/streams.texi (Output Functions): Document new argument ENSURE to
terpri.
* doc/misc/cl.texi (Porting Common Lisp): Remove parse-integer.
* lisp/emacs-lisp/cl-extra.el (cl-fresh-line): New function.
* src/keymap.c (describe_vector_princ):
* src/keyboard.c (Fcommand_error_default_function): Adapt to change to
Fterpri.
* src/print.c (printchar_stdout_last): Declare.
(printchar): Record the last char written to stdout.
(Fterpri): Add optional argument ENSURE.
* test/automated/print-tests.el: New file.
(terpri): Tests for terpri. (Bug#18652)
2014-10-09 06:05:48 +08:00
Stefan Monnier
d7f413b893
Merge from emacs-24
2014-10-02 11:13:05 -04:00
Glenn Morris
c8ea4b9f3d
* package.el (package-import-keyring): Create gnupg directory private.
...
See bug#17625#155.
2014-10-01 19:39:50 -04:00
Stefan Monnier
a8b36b953e
Consolidate x-select-text.
...
* lisp/frame.el (gui-method, gui-method-define, gui-method-declare)
(gui-call): New macros.
(gui-method--name): New function.
(frame-creation-function-alist): Use gui-method-declare.
(make-frame): Use gui-method.
* lisp/select.el (gui-select-enable-clipboard): Rename from
x-select-enable-clipboard and move here.
(x-select-enable-clipboard): Define as obsolete alias.
(gui-last-selected-text): New var, to replace x-last-selected-text.
(gui-select-text): New GUI method.
(gui-select-text): New function.
(x-select-text): Define as obsolete alias.
* lisp/term/common-win.el (x-select-enable-clipboard, x-select-text):
Move to select.el.
* lisp/simple.el (interprogram-cut-function): Change default to
x-select-text.
(interprogram-paste-function): Change default to `ignore'.
* lisp/w32-common-fns.el (interprogram-cut-function): Don't modify.
* lisp/term/x-win.el (interprogram-cut-function): Don't modify.
(gui-select-text): Add method for x.
* lisp/term/w32-win.el (gui-select-text): Add method for w32.
* lisp/term/pc-win.el (x-last-selected-text): Remove, use
gui-last-selected-text instead.
(msdos-initialize-window-system): Don't set interprogram-cut-function.
(gui-select-text): Add method for pc.
* lisp/term/ns-win.el (ns-last-selected-text): Remove, use
gui-last-selected-text instead.
(gui-select-text): Add method for ns.
(x-setup-function-keys): Don't change interprogram-cut-function.
* lisp/loadup.el ("startup"): Load after "frame".
* lisp/subr.el (package--builtin-versions, package--description-file):
Move from startup.el.
* lisp/startup.el (package--builtin-versions, package--description-file):
Move to subr.el.
(handle-args-function-alist, window-system-initialization-alist):
Use gui-method-declare.
(command-line): Use gui-method.
* src/xselect.c (selection-converter-alist): Fix docstring.
2014-10-01 18:13:11 -04:00
Stefan Monnier
a57fa9642d
* lisp/subr.el (alist-get): New accessor.
...
* lisp/emacs-lisp/gv.el (alist-get): Provide expander.
* lisp/winner.el (winner-remember):
* lisp/tempo.el (tempo-use-tag-list):
* lisp/progmodes/gud.el (minor-mode-map-alist):
* lisp/international/mule-cmds.el (define-char-code-property):
* lisp/frameset.el (frameset-filter-params):
* lisp/files.el (dir-locals-set-class-variables):
* lisp/register.el (get-register, set-register):
* lisp/calc/calc-yank.el (calc-set-register): Use it.
* lisp/ps-print.el (ps-get, ps-put, ps-del): Mark as obsolete.
* lisp/tooltip.el (tooltip-set-param): Mark as obsolete.
(tooltip-show): Use alist-get instead.
* lisp/ses.el (ses--alist-get): Remove. Use alist-get instead.
* admin/unidata/unidata-gen.el (unidata-gen-table-word-list): Use alist-get
and cl-incf.
2014-10-01 13:23:42 -04:00
Stefan Monnier
07bec0fc67
Merge from emacs-24
2014-09-30 19:19:31 -04:00
Stefan Monnier
cbdc06f3be
Rename 24.5 to 25.1
...
Except where we expect to backport the corresponding change.
2014-09-29 14:14:08 -04:00
Thien-Thi Nguyen
3ff1c9a8ea
Font-lock `cl-flet*', too.
...
* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2):
Add "flet*" to intermediate var `cl-lib-kw'.
2014-09-28 10:03:48 +02:00
Stefan Monnier
a5426ef3c2
* lisp/emacs-lisp/package.el (package-check-signature): Default to nil if
...
GPG is not available.
(package-refresh-contents): Don't mess with the keyring if we won't
check the signatures anyway.
2014-09-27 12:25:53 -04:00
Stefan Monnier
19e0f0af6d
* lisp/subr.el (track-mouse): New macro.
...
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
Remove track-mouse case.
* lisp/emacs-lisp/bytecomp.el (byte-compile-track-mouse): Remove.
* src/keyboard.c (track-mouse): Rename to internal--track-mouse.
Make it into a function and change arg to be a function.
2014-09-27 11:52:28 -04:00
Leo Liu
548e169622
* lisp/emacs-lisp/eldoc.el (eldoc-mode): Fix thinko.
...
* lisp/progmodes/elisp-mode.el (elisp--eldoc-last-data): Use defvar.
2014-09-27 18:08:59 +08:00
Stefan Monnier
528872c5f8
* lisp/emacs-lisp/pcase.el (pcase--split-match, pcase--app-subst-match):
...
Handle the case where `match' is :pcase--succeed or :pcase--fail.
Fixes: debbugs:18554
2014-09-27 00:24:06 -04:00
Stefan Monnier
e6cfa098ae
Introduce global-eldoc-mode. Move Elisp-specific code to elisp-mode.el.
...
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): New minor mode.
(eldoc-schedule-timer): Obey it.
(eldoc-documentation-function): Default to nil.
(eldoc-mode): Don't enable if eldoc-documentation-function is not set.
(eldoc-documentation-function-default, eldoc-get-fnsym-args-string)
(eldoc-highlight-function-argument, eldoc-get-var-docstring)
(eldoc-last-data-store, eldoc-docstring-first-line)
(eldoc-docstring-format-sym-doc, eldoc-fnsym-in-current-sexp)
(eldoc-beginning-of-sexp, eldoc-current-symbol)
(eldoc-function-argstring): Move to elisp-mode.el.
(eldoc-symbol-function): Remove, unused.
* lisp/progmodes/elisp-mode.el: New file. Rename all "eldoc-*" to "elisp--*".
(elisp-completion-at-point): Rename from lisp-completion-at-point.
(elisp--preceding-sexp): Rename from preceding-sexp.
* lisp/loadup.el: Load new file progmodes/elisp-mode.
* lisp/ielm.el (inferior-emacs-lisp-mode): Set eldoc-documentation-function.
* lisp/emacs-lisp/lisp.el (lisp--local-variables-1, lisp--local-variables)
(lisp--local-variables-completion-table, lisp--expect-function-p)
(lisp--form-quoted-p, lisp--company-doc-buffer)
(lisp--company-doc-string, lisp--company-location)
(lisp-completion-at-point): Move to elisp-mode.el.
* lisp/emacs-lisp/lisp-mode.el (lisp--mode-syntax-table): New syntax-table,
extracted from emacs-lisp-mode-syntax-table.
(emacs-lisp-mode-abbrev-table, emacs-lisp-mode-syntax-table): Move to
elisp-mode.el.
(lisp-imenu-generic-expression): Add comments to document what comes
from which Lisp dialect.
(emacs-lisp-mode-map, emacs-lisp-byte-compile)
(emacs-lisp-byte-compile-and-load, emacs-lisp-mode-hook)
(emacs-lisp-mode, emacs-list-byte-code-comment-re)
(emacs-lisp-byte-code-comment)
(emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode)
(lisp-interaction-mode-map, lisp-interaction-mode)
(eval-print-last-sexp, last-sexp-setup-props)
(last-sexp-toggle-display, prin1-char, preceding-sexp)
(eval-last-sexp-1, eval-last-sexp-print-value)
(eval-last-sexp-fake-value, eval-sexp-add-defvars, eval-last-sexp)
(eval-defun-1, eval-defun-2, eval-defun): Move to elisp-mode.el.
* src/lisp.mk (lisp): Add elisp-mode.elc.
2014-09-26 23:57:41 -04:00
Leo Liu
d73f2d856c
* emacs-lisp/cl-extra.el (cl-parse-integer): Fix last change.
2014-09-26 10:01:17 +08:00
Leo Liu
89b354a55e
Add cl-parse-integer based on parse-integer
...
* doc/misc/cl.texi (Predicates on Numbers): Document cl-digit-char-p.
(Numerical Functions): Document cl-parse-integer.
* lisp/calendar/parse-time.el (parse-time-digits): Remove.
(digit-char-p, parse-integer) Moved to cl-lib.el.
(parse-time-tokenize, parse-time-rules, parse-time-string): Use
cl-parse-integer.
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer): New function.
* lisp/emacs-lisp/cl-lib.el (cl-digit-char-table): New var.
(cl-digit-char-p): New function.
* test/automated/cl-lib.el (cl-digit-char-p, cl-parse-integer): New
tests.
Fixes: debbugs:18557
2014-09-26 08:15:21 +08:00
Stefan Monnier
2b968ea662
* 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.
2014-09-22 14:05:22 -04:00
Stefan Monnier
7fbd780a00
* 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.
2014-09-22 13:24:46 -04:00
Stefan Monnier
1a6255532e
* 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.
2014-09-22 12:22:50 -04:00
Stefan Monnier
536cda1f84
* lisp/emacs-lisp/pcase.el (pcase-defmacro): New macro.
...
(pcase--macroexpand): New function.
(pcase--expand): Use it.
2014-09-22 11:04:12 -04:00
Stefan Monnier
13b1840d23
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.
2014-09-22 10:30:47 -04:00
Stefan Monnier
55fa245f37
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
...
for functions with no arguments.
2014-09-22 09:47:47 -04:00
Dmitry Gutov
a58c2690db
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't use
...
`lisp--local-variables-completion-table' in the `lisp--form-quoted-p'
case.
2014-09-19 21:33:11 +04:00
Dmitry Gutov
3907574bb8
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.
2014-09-19 07:41:42 +04:00
Dmitry Gutov
30c17da5df
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
...
`table-etc' when `end' is non-nil.
2014-09-19 07:28:31 +04:00
Dmitry Gutov
48453e00a3
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
2014-09-19 07:10:29 +04:00
Leo Liu
85b3d352c7
* 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
2014-09-14 00:30:21 +08:00
Paul Eggert
0f2ed59206
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".
2014-09-11 12:44:25 -07:00
Leo Liu
e872d52c93
Add vector qpattern to pcase
...
* doc/lispref/control.texi (Pattern matching case statement): Document vector
qpattern.
* etc/NEWS: Mention vector qpattern for pcase. (Bug#18327).
* lisp/emacs-lisp/pcase.el (pcase): Doc fix.
(pcase--split-vector): New function.
(pcase--q1): Support vector qpattern. (Bug#18327)
2014-09-06 08:59:00 +08:00
Stefan Monnier
1f69089d35
* lisp/emacs-lisp/eldoc.el (eldoc-function-argstring): Don't strip
...
terminating paren.
(eldoc-last-data-store): Return cached data.
(eldoc-get-var-docstring): Avoid setq.
(eldoc-get-fnsym-args-string): Clarify data flow.
Fixes: debbugs:18352
2014-09-04 11:23:37 -04:00
Thierry Volpiatto
e77bcfa34d
* lisp/emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Handle the
...
case where we're currently providing part of the &rest arg after some
&key args, as in define-ibuffer-op.
Fixes: debbugs:18048
2014-09-04 10:49:56 -04:00
Glenn Morris
62fca47221
Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ru
2014-09-02 21:21:40 -07:00
Stefan Monnier
559b827d8a
* lisp/emacs-lisp/package.el (package-generate-description-file):
...
Properly quote the arguments. Change second arg.
(package--alist-to-plist-args): Rename from package--alist-to-plist and
quote the elements.
(package--make-autoloads-and-stuff): Fix the test for pre-existence of
the *-pkg.el file. Adjust to new calling convention of
package-generate-description-file.
Fixes: debbugs:18332
2014-09-02 15:51:25 -04:00
Michael Heerdegen
e6a4c15ff1
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Use mode function
...
name instead of variable name in hook docstring. (Bug#18349)
2014-08-29 22:28:19 +02:00
Michael Albinus
9b6ab1afe4
* emacs-lisp/authors.el (authors-aliases): Addition.
2014-08-27 09:53:58 +02:00
Thierry Volpiatto
2e7d4343e9
* lisp/emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Add support
...
for &key args.
* emacs-lisp/eldoc.el (eldoc-argument-case): Obsolete and change default.
(eldoc-function-argstring-format): Remove.
(eldoc-function-argstring): Always return upcase args.
Use help-make-usage. Don't add parens.
(eldoc-get-fnsym-args-string): Don't obey eldoc-argument-case since
it's too late to do it right (bug#18048).
2014-08-18 15:28:40 -04:00
Stefan Monnier
4d6abf2449
* emacs-lisp/smie.el (smie-config--guess-1): Split from smie-config--guess.
...
(smie-config--guess): Use it.
2014-07-20 21:58:43 -04:00
Stefan Monnier
29b6ac245f
* lisp/emacs-lisp/edebug.el: Use nadvice.
...
(edebug-original-read): Remove.
(edebug--read): Rename from edebug-read and add `orig' arg.
(edebug-uninstall-read-eval-functions)
(edebug-install-read-eval-functions): Use nadvice.
(edebug-read-sexp, edebug-read-storing-offsets, edebug-read-symbol)
(edebug-read-and-maybe-wrap-form1, edebug-instrument-callee)
(edebug-read-string, edebug-read-function): Use just `read'.
(edebug-original-debug-on-entry): Remove.
(edebug--debug-on-entry): Rename from edebug-debug-on-entry and add
`orig' arg.
(debug-on-entry): Override with nadvice.
2014-07-20 21:56:54 -04:00