Commit graph

4091 commits

Author SHA1 Message Date
Stefan Monnier
e4829cb8d7 * lisp/minibuffer.el (completion--sreverse): Remove.
(completion--common-suffix): Use `reverse' instead.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-group): Use `reverse' on strings.
2014-05-23 11:54:44 -04:00
Leo Liu
8ea51e4f08 * emacs-lisp/cl-lib.el (cl-endp): Fix last change. 2014-05-21 08:41:21 +08:00
Leo Liu
427de5355f * emacs-lisp/cl-lib.el (cl-endp): Conform to CL's semantics. 2014-05-20 00:08:40 +08:00
Glenn Morris
d63d883a97 Add with-file-modes macro, and use it
* lisp/subr.el (with-file-modes): New macro.

* lisp/printing.el (pr-save-file-modes):
* lisp/eshell/esh-util.el (eshell-with-file-modes): Make obsolete.

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
Add with-file-modes.

* lisp/doc-view.el (doc-view-make-safe-dir):
* lisp/epg.el (epg--start):
* lisp/files.el (locate-user-emacs-file, make-temp-file)
(backup-buffer-copy, move-file-to-trash):
* printing.el (pr-despool-print, pr-call-process, pr-text2ps):
* eshell/esh-util.el (eshell-with-private-file-modes)
(eshell-make-private-directory):
* lisp/net/browse-url.el (browse-url-mosaic):
* lisp/obsolete/mailpost.el (post-mail-send-it):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-verify-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-verify-region):
* lisp/url/url-util.el (url-make-private-file):
Use with-file-modes.

* doc/lispref/files.texi (Changing Files): Mention with-file-modes.

* etc/NEWS: Mention this.
2014-05-14 10:15:15 -07:00
Glenn Morris
bbbabffe06 Merge from emacs-24; up to 2014-05-12T06:15:47Z!rgm@gnu.org 2014-05-11 23:59:30 -07:00
Stefan Monnier
97100b4379 * lisp/emacs-lisp/nadvice.el (advice--interactive-form): Don't get fooled
into autoloading just because of a silly indirection.
2014-05-12 01:25:34 -04:00
Stefan Monnier
4eb436826b * lisp/emacs-lisp/lisp-mode.el (preceding-sexp): Exclude leading "," which
are a hindrance for C-x C-e.
2014-05-10 23:48:15 -04:00
Glenn Morris
e7caef591f Move lisp/emacs-lisp/find-gc.el to admin/
Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00118.html
2014-05-10 18:53:42 -07:00
Stefan Monnier
5d03fb436f * lisp/emacs-lisp/nadvice.el: Support adding a given function multiple times.
(advice--member-p): If name is given, only compare the name.
(advice--remove-function): Don't stop at the first match.
(advice--normalize-place): New function.
(add-function, remove-function): Use it.
(advice--add-function): Pass the name, if any, to
advice--remove-function.
2014-05-10 16:07:01 -04:00
Glenn Morris
fb3f83f5fd Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org 2014-05-07 20:41:21 -07:00
Stefan Monnier
5e87fcb1d7 * lisp/emacs-lisp/package.el (package-compute-transaction): Topological sort.
Add optional `seen' argument to detect and break infinite loops.

Fixes: debbugs:16994
2014-05-06 14:11:16 -04:00
Eli Zaretskii
c5d670f5ad Minor stylistic changes in find-gc.el.
lisp/emacs-lisp/find-gc.el (find-gc-unsafe, find-unsafe-funcs)
 (trace-unsafe, trace-use-tree): Make parentheses style be
 according to Emacs style.
2014-05-06 13:29:37 +03:00
Glenn Morris
0c4decaeb1 find-gc.el misc fixes
The whole file looks obsolete and/or broken.

* lisp/emacs-lisp/find-gc.el (find-gc-source-directory): Give it a value.
(find-gc-source-files): Update some names.
(trace-call-tree): Simplify and update.  Avoid predictable temp-file names.
2014-05-05 20:53:31 -07:00
Paul Eggert
3e9fa60a5c Merge from emacs-24; up to 2014-05-04T21:18:30Z!eggert@cs.ucla.edu 2014-05-04 12:37:56 -07:00
Leo Liu
157e8cfdd8 * emacs-lisp/cl-macs.el (cl-deftype): Fix indentation. 2014-05-02 19:11:35 +08:00
Stefan Monnier
17a873c585 * lisp/emacs-lisp/lisp-mode.el (lisp--match-hidden-arg): Only highlight past
the last consecutive closing paren.

Fixes: debbugs:17345
2014-05-01 12:14:03 -04:00
Juanma Barranquero
dff4a9f6a4 Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.de 2014-04-25 18:11:07 +02:00
Leo Liu
00104e5923 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):
Fix syntax for @.

Fixes: debbugs:17325
2014-04-24 08:55:18 +08:00
Daniel Colascione
543e3c63ac Require gv early to break eager macro-expansion cycles
* lisp/emacs-lisp/cl.el (gv): Require gv early to break eager
macro-expansion cycles.
2014-04-23 17:28:47 -07:00
Stefan Monnier
ddc13efd70 * lisp/emacs-lisp/cl-macs.el (cl--loop-let): Fix last merge. 2014-04-22 21:40:35 -04:00
Daniel Colascione
1b0f10d2df 2014-04-22 Daniel Colascione <dancol@dancol.org>
* emacs-lisp/byte-run.el (function-put): Unbreak build: don't
	use defun to define `function-put'.
2014-04-22 14:46:19 -07:00
Paul Eggert
42e910349d Merge from emacs-24; up to 2014-04-22T20:19:17Z!eggert@cs.ucla.edu 2014-04-22 14:32:51 -07:00
Stefan Monnier
4f96579371 * lisp/emacs-lisp/lisp-mode.el (lisp--match-hidden-arg): New function.
(lisp-el-font-lock-keywords-2, lisp-cl-font-lock-keywords-2): Use it.
(lisp-mode-variables): Set font-lock-extra-managed-props.
2014-04-22 13:45:43 -04:00
Stefan Monnier
67c477ae67 * lisp/emacs-lisp/byte-run.el (function-put): New function.
(defun-declarations-alist): Use it.  Add `pure' and `side-effect-free'.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct, cl-struct-sequence-type)
(cl-struct-slot-info, cl-struct-slot-offset, cl-struct-slot-value):
Use them.
2014-04-22 12:22:13 -04:00
Daniel Colascione
12b1389c90 Correctly macroexpand top-level forms during eager macroexpand
* lisp/emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
Improve docstrings.

* lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load): Add
`full-p' parameter; when nil, call `macroexpand' instead of
`macroexpand-all'.

* src/lread.c (readevalloop_eager_expand_eval): New function
that can recurse into toplevel forms.
(readevalloop): Call it.
* src/lisp.h: Declare Qprogn.
* src/callint.c (Qprogn): No longer static.

* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Add compile flag.
(test-byte-comp-macro-expansion)
(test-byte-comp-macro-expansion-eval-and-compile)
(test-byte-comp-macro-expansion-eval-when-compile)
(test-byte-comp-macro-expand-lexical-override): Use it.
(test-eager-load-macro-expansion)
(test-eager-load-macro-expansion-eval-and-compile)
(test-eager-load-macro-expansion-eval-when-compile)
(test-eager-load-macro-expand-lexical-override): New tests.
2014-04-22 00:04:34 -07:00
Daniel Colascione
c98212f9e7 Minor bytecomp.el fixes
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Use lambda function values, not quoted lambdas.
(byte-compile-recurse-toplevel): Remove extraneous &optional.
2014-04-21 23:51:30 -07:00
Daniel Colascione
66fda7948f Optimize cl-struct-slot-value; fix test
2014-04-22  Daniel Colascione  <dancol@dancol.org>

	* emacs-lisp/cl-macs.el
	(cl-struct-sequence-type,cl-struct-slot-info): Declare pure.
	(cl-struct-slot-value): Conditionally use aref or nth so that the
	compiler produces optimal code.

2014-04-22  Daniel Colascione  <dancol@dancol.org>

	* automated/cl-lib.el (cl-lib-struct-accessors): Fix test to
	account for removal of `cl-struct-set-slot-value'.
2014-04-21 20:51:12 -07:00
Stefan Monnier
d6f14ca729 * lisp/emacs-lisp/cl-macs.el (cl-struct-slot-offset): Mark as pure.
(cl--set-elt): Don't proclaim as inline.
(cl-struct-slot-value): Remove explicit gv-setter and compiler-macro.
Define as inlinable instead.
(cl-struct-set-slot-value): Remove.
* doc/misc/cl.texi (Structures): Remove cl-struct-set-slot-value.
* lisp/emacs-lisp/cl-lib.el (cl--set-elt): Remove.
* lisp/emacs-lisp/cl-seq.el (cl-replace, cl-substitute, cl-nsubstitute):
Use setf instead.
2014-04-21 23:18:15 -04:00
Stefan Monnier
622eef687c * lisp/emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name. 2014-04-21 17:18:12 -04:00
Daniel Colascione
44faec1788 Remove excess parameters on cl--const-expr-val
2014-04-21  Daniel Colascione  <dancol@dancol.org>

	* emacs-lisp/cl-macs.el (cl--const-expr-val): We didn't need the
	last two parameters after all.
	(cl--expr-contains,cl--compiler-macro-typep,cl--compiler-macro-member)
	(cl--compiler-macro-assoc,cl-struct-slot-value)
	(cl-struct-set-slot-value): Stop using them.
2014-04-21 11:00:19 -07:00
Daniel Colascione
985c035f2d Correctly treat progn contents as toplevel forms when byte compiling 2014-04-21 02:34:21 -07:00
Daniel Colascione
2fa1b97db0 Fix cl-loop destructuring under `with' clause 2014-04-20 18:03:39 -07:00
Daniel Colascione
e100022976 unbreak the build 2014-04-20 07:46:13 -07:00
Daniel Colascione
89a2e783c2 defstruct introspection 2014-04-19 19:34:22 -07:00
Stefan Monnier
6c2453e038 * lisp/emacs-lisp/cl-lib.el (current-case-table): Remove setter.
* lisp/leim/quail/sisheng.el (sisheng-list): Use with-case-table.
2014-04-12 15:30:14 -04:00
Daniel Colascione
3f63a9f7de Make up-list and backward-up-list get out of more spots 2014-04-09 09:58:08 -07:00
Daniel Colascione
6c971fb0f4 Tweak regex from last change 2014-04-09 08:33:43 -07:00
Daniel Colascione
226835801a Make cl-indent work better for elisp 2014-04-09 01:16:41 -07:00
Leo Liu
722237d55e * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Add
define-compilation-mode.
2014-04-05 10:33:36 +08:00
Juanma Barranquero
09aba8153a Merge from emacs-24; up to 2014-03-28T01:39:30Z!rgm@gnu.org 2014-04-02 17:14:50 +02:00
Leo Liu
294b2b0928 * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Refactor
out eldoc-documentation-function-default.
(eldoc-documentation-function-default): New function.
(eldoc-documentation-function): Change value.
2014-03-31 09:31:17 +08:00
Stefan Monnier
929c0500cc * lisp/emacs-lisp/package.el (package-built-in-p): Treat a min-version of
0 like nil.
2014-03-28 18:47:46 -04:00
Juanma Barranquero
1e757eb0a5 Merge from emacs-24; up to 2014-03-24T03:06:35Z!dancol@dancol.org 2014-03-27 18:34:22 +01:00
Juanma Barranquero
b1c870c9e8 lisp/emacs-lisp/package-x.el: Follow-up to change in package.el.
(package--archive-contents-from-url): Use url-insert-file-contents;
package-handle-response no longer exists.
2014-03-27 01:20:50 +01:00
Juanma Barranquero
16adf2e6eb Merge from emacs-24; up to 2014-03-23T23:14:52Z!yamaoka@jpl.org 2014-03-26 16:57:13 +01:00
Juanma Barranquero
196716cf35 * lisp/emacs-lisp/package.el: Fix bug#16733 (again).
(url-http-parse-response, url-http-end-of-headers, url-recreate-url)
  (url-http-target-url): Remove unused declarations.
  (package-handle-response): Remove.
  (package--with-work-buffer): Use url-insert-file-contents and simplify.
  (package--download-one-archive): Use current-buffer instead of
  dynamic binding of `buffer'.
  (describe-package-1): Do not decode readme-string.

* lisp/url/url-handlers.el (url-http-parse-response): Add autoload.
  (url-insert-file-contents): Signal file-error in case of HTTP error.
2014-03-26 16:21:17 +01:00
Glenn Morris
b4aca02176 Make gulp.el obsolete
* lisp/obsolete/gulp.el: Move here from emacs-lisp/.

* doc/emacs/ack.texi (Acknowledgments): Remove reference to obsolete file.
2014-03-25 21:41:13 -04:00
Dmitry Gutov
3e2377ce2f Fix bug#16762
* lisp/emacs-lisp/package.el (package--add-to-archive-contents):
Include already installed and built-in packages in
`package-archive-contents'.
(package-install): Don't include already installed packages in the
options on interactive invocation.
2014-03-25 00:38:06 +02:00
Daniel Colascione
544ab460f5 Backport &key-parsing improvement from trunk 2014-03-24 13:41:08 -07:00
Daniel Colascione
1edb4a2ec6 Improve performance of &key parsing 2014-03-23 20:06:35 -07:00