summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Remove obsolete method of changing byte-compile-dest-fileGlenn Morris2017-05-061-14/+9
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file): Define unconditionally.
* | Write autoloads file atomicallyGlenn Morris2017-05-061-4/+18
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/autoload.el (autoload--save-buffer): New function, to save buffer atomically. (autoload-save-buffers, update-directory-autoloads): Use autoload--save-buffer. * lisp/Makefile.in ($(lisp)/loaddefs.el): No longer write to a temp file by hand.
* | Write autoloads file once onlyGlenn Morris2017-05-061-26/+13
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Simplify. Don't bother about ensuring the output file exists. (autoload-generated-file): Add doc. (autoload-ensure-writable): Update doc. (autoload-ensure-file-writeable): Handle non-existing file. (autoload-ensure-default-file): Remove function.
* | Fontify the doc-string in some CL forms as suchGlenn Morris2017-05-041-0/+3
| | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (defconstant, defparameter): Add the doc-string-elt property. (Bug#26778)
* | * lisp/emacs-lisp/cl-lib.el (cl-mapcar): Remove recent autoload cookie.Glenn Morris2017-05-041-1/+0
| |
* | cl-defmethod: Make the edebug spec more technically correctDmitry Gutov2017-05-051-2/+3
| | | | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Denote the edebug spec part for qualifiers as [&rest atom], per http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00053.html.
* | Inherit incompatible/obsolete package faces from errorTino Calancha2017-05-041-1/+1
| | | | | | | | | | | | Don't use the same face for installed packages as for incompatible or obsolete ones. * lisp/emacs-lisp/package.el (package-status-incompat): Inherit from error.
* | * lisp/emacs-lisp/seq.el: Bump seq version.Nicolas Petton2017-05-041-1/+1
| |
* | Add seq-set-equal-p to test for set equalityDamien Cassou2017-05-041-0/+6
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-set-equal-p): Add function to compare two lists as if they were sets. * test/lisp/emacs-lisp/seq-tests.el (test-seq-set-equal-p): Add test for seq-set-equal-p.
* | Fix Edebug specs for 'cl-defmethod' and 'defmethod'Gemini Lasswell2017-05-022-5/+6
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Change Edebug spec to make Edebug generate a new symbol for each method (Bug#24753) and to support a string following :extra (Bug#23995). * lisp/emacs-lisp/eieio-compat.el (defmethod): Change Edebug spec to make Edebug generate a new symbol for each method (Bug#24753).
* | Warn about missing backslashes during loadPhilipp Stephani2017-05-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (load_warn_unescaped_character_literals, Fload, read1) (syms_of_lread): Warn if unescaped character literals are found (Bug#20152). * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Check for unescaped character literals during byte compilation. * test/src/lread-tests.el (lread-tests--unescaped-char-literals): New unit test. (lread-tests--with-temp-file, lread-tests--last-message): Helper functions for unit test. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--unescaped-char-literals): New unit test. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): Helper macro for unit test.
* | Don't require bytecomp for running ert testsNoam Postavsky2017-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | "Fix ert-tests when running compiled" 2016-12-06 accidentally introduced a dependency on `bytecomp' into `ert'. As mentioned in "Avoid ert test failures" 2017-04-18, the accidental dependency of ert on bytecomp was masked by loading other libraries until recently. * lisp/emacs-lisp/ert.el (ert--expand-should-1): Only use `byte-compile-macro-environment' if it's bound. * test/src/eval-tests.el: Add defvar for dynamic variable `byte-compile-debug'.
* | Add new `lisp-indent-region' that doesn't reparse the code.Noam Postavsky2017-04-221-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both `lisp-indent-region' and `lisp-indent-line' now use `syntax-ppss' to get initial state, so they will no longer indent string literal contents. * lisp/emacs-lisp/lisp-mode.el (lisp-ppss): New function, like `syntax-ppss', but with a more dependable item 2. (lisp-indent-region): New function, like `indent-region-line-by-line' but additionally keep a running parse state to avoid reparsing the code repeatedly. Use `lisp-ppss' to get initial state. (lisp-indent-line): Take optional PARSE-STATE argument, pass it to `calculate-lisp-indent', use `lisp-ppss' if not given. (lisp-mode-variables): Set `indent-region-function' to `lisp-indent-region'.
* | Remove ignored argument from lisp-indent-lineNoam Postavsky2017-04-221-13/+7
| | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Remove WHOLE-EXP argument, the behavior has long since been handled in `indent-for-tab-command'. Also remove redundant `beg' and `shift-amt' variables and use `indent-line-to'.
* | * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.Noam Postavsky2017-04-221-7/+9
| |
* | Don't reparse the sexp in indent-sexp (Bug#25122)Noam Postavsky2017-04-221-37/+39
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Let PARSE-START be a parse state that can be reused. (indent-sexp): Pass the running parse state to calculate-lisp-indent instead of the sexp beginning position. Saving the CONTAINING-SEXP-START returned by `calculate-lisp-indent' is no longer needed. Don't bother stopping if we don't descend below init-depth, since we now alway scan the whole buffer (via syntax-ppss) anyway. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp): Add blank line to test case.
* | b-c--cond-jump-table-info: Use correct body for singleton clausesVibhav Pant2017-04-221-2/+2
| | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info): When a clause's body consists of a single constant expression, use that expression as the body to be compiled. This fixes switch bytecode evaluating to nil to such clauses.
* | Improve prefix handling for dash.elStefan Monnier2017-04-211-1/+2
| | | | | | | | | | * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Don't drop dash's "-<letter>" prefixes.
* | * lisp/emacs-lisp/cl-macs.el: Fix symbol-macroletStefan Monnier2017-04-211-4/+13
|/ | | | | | | | | Revert 0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1 (to fix bug#26325) and use a different fix for bug#26068. (cl--symbol-macro-key): New function. (cl--sm-macroexpand, cl-symbol-macrolet): Use it instead of `symbol-name`. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet): Failure is not expected any more.
* bytecomp: Don't inline functions that use byte-switch (Bug#26518)Vibhav Pant2017-04-201-40/+46
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf): Don't inline FORM if the bytecode uses the byte-switch instruction. It is impossible to guess the correct stack depth while inlining such bytecode, resulting in faulty code.
* Don't register "def" as an autoload prefix (Bug#26412)Noam Postavsky2017-04-191-1/+3
| | | | | * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Don't accept "def" as a prefix.
* Remove some explicit runtime loads of pcaseGlenn Morris2017-04-193-3/+0
| | | | | | | | Pcase is macros, so these should have used eval-when-compile. Anyway, pcase entry points are autoloaded, so the compiler handles it. * lisp/profiler.el, lisp/emacs-lisp/eieio-core.el: * lisp/emacs-lisp/generator.el, lisp/emacs-lisp/subr-x.el: * lisp/progmodes/xref.el: No need to require pcase.
* Stop cl-lib loading pcase at runtimeGlenn Morris2017-04-191-1/+2
| | | | | | The cause was an unexpanded pcase-defmacro in cl-loaddefs. * lisp/emacs-lisp/autoload.el (make-autoload): Treat pcase-defmacro like defmacro.
* Tweak bytecomp's loading of cl-extraGlenn Morris2017-04-181-2/+4
| | | | | * lisp/emacs-lisp/bytecomp.el: Don't force load of cl-extra in a post-bootstrap emacs where cl-loaddefs does exist.
* Avoid unnecessary loading of subr-x at run-timeGlenn Morris2017-04-182-1/+4
| | | | | | | | | | * lisp/doc-view.el, lisp/filenotify.el, lisp/info-look.el: * lisp/svg.el, lisp/emacs-lisp/byte-opt.el, lisp/net/shr.el: * lisp/textmodes/sgml-mode.el, test/lisp/dom-tests.el: No need to load subr-x at run-time. * lisp/gnus/nnheader.el: No need to load subr-x. ; * lisp/emacs-lisp/subr-x.el, lisp/gnus/message.el, lisp/net/nsm.el: ; Comments.
* Avoid ert test failuresGlenn Morris2017-04-181-0/+1
| | | | | | | * lisp/emacs-lisp/ert.el (ert--expand-should-1): Avoid errors related to undefined byte-compile-macro-environment. Somehow masked until very recently because loading seq (eg) loads bytecomp. http://hydra.nixos.org/build/51730765
* Fix find-library-name for load-history entries with nil FILE-NAME (Bug#26355)Noam Postavsky2017-04-181-35/+13
| | | | | | | * lisp/emacs-lisp/find-func.el (find-library--from-load-history): Rename from find-library--from-load-path. Check for `load-history' entries with nil FILE-NAMEs. Simplify by not double checking for suffixes and making use of `locate-file'.
* Use user-error for some ert.el errorsGlenn Morris2017-04-131-6/+6
| | | | | | * lisp/emacs-lisp/ert.el (ert-read-test-name, ert-delete-all-tests) (ert-results-find-test-at-point-other-window, ert-describe-test): Use user-error.
* Remove duplicate lisp-eval-defun definitionGlenn Morris2017-04-131-5/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-eval-defun): Autoload rather than defining a stub.
* Create generated lisp files before main loaddefs.elGlenn Morris2017-04-131-1/+1
| | | | | | | | | | | This should improve reproducibility of lisp/loaddefs.el. * lisp/Makefile.in (gen-lisp): New phony target. ($(lisp)/loaddefs.el, compile-main): Depend on gen-lisp. * src/Makefile.in ($(leimdir)/leim-list.el): Depend on all of ../leim. * lisp/cedet/semantic.el (semantic-mode): * lisp/cedet/semantic/fw.el (top-level): * lisp/emacs-lisp/eieio-core.el (top-level): Robustify to generated input files maybe not yet existing.
* Introduce customizable variable 'package-gnupghome-dir'Jens Lechtenboerger2017-04-111-9/+26
| | | | | | | | | * lisp/emacs-lisp/package.el (package-import-keyring) (package--check-signature-content, package-check-signature): Use new variable package-gnupghome-dir to control which GnuPG homedir to use. * doc/emacs/package.texi: Mention package-gnupghome-dir. * etc/NEWS: Mention package-gnupghome-dir.
* Adjust the edebug spec of if-let*Mark Oteiza2017-04-081-1/+2
| | | | | | This was fixed in Bug#24748, but now looking more closely, using gate in the spec seems correct. See (info "(elisp) Backtracking"). * lisp/emacs-lisp/subr-x.el (if-let*): Use gate in edebug spec.
* Deprecate copy-record in favor of copy-sequencePaul Eggert2017-04-072-5/+4
| | | | | | | | | | | | | | | | | Since copy-sequence seems to be needed anyway for records, have it work on records, and remove copy-record as being superfluous. * doc/lispref/records.texi (Records, Record Functions): * lisp/emacs-lisp/cl-macs.el (cl-defstruct): * lisp/emacs-lisp/eieio.el (make-instance, clone): * test/src/alloc-tests.el (record-3): Use copy-sequence, not copy-record, to copy records. * doc/lispref/sequences.texi (Sequence Functions) (Array Functions): Document that aref and copy-sequence work on records. * etc/NEWS: Omit copy-record. * src/alloc.c (Fcopy_record): Remove. * src/data.c (Faref): Document that arg can be a record. * src/fns.c (Fcopy_sequence): Copy records, too.
* make smie.el respect prog-first-columnTom Tromey2017-04-051-1/+3
| | | | * lisp/emacs-lisp/smie.el (smie-indent-bob): Call prog-first-column.
* ; * lisp/emacs-lisp/package.el (describe-package-1): Tweak recent.Glenn Morris2017-04-041-6/+5
|
* Advertise https for homepage of gnu.org packagesGlenn Morris2017-04-041-0/+7
| | | | | * lisp/emacs-lisp/package.el (describe-package-1): Use https, if supported, for the homepage of packages on gnu.org.
* Default to https for elpa.gnu.org if gnutls availableGlenn Morris2017-04-041-3/+5
| | | | | | * lisp/emacs-lisp/package.el (package-archives): Default to https for elpa.gnu.org if gnutls is available. Ref: http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00130.html
* Backward compatibility with pre-existing struct instances.Stefan Monnier2017-04-043-2/+44
| | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-lib.el (cl--old-struct-type-of): New function. (cl-old-struct-compat-mode): New minor mode. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Pass `record' to cl-struct-define to signal use of record objects. * lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class, cl-struct-define): Enable legacy defstruct compatibility. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-old-struct, old-struct): New tests. * doc/lispref/elisp.texi, doc/lispref/records.texi: Document `old-struct-compat'.
* Make EIEIO use records.Stefan Monnier2017-04-045-44/+29
| | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-object-generalizer): Adjust to new tags. * lisp/emacs-lisp/eieio-core.el: Use records, and place the class object directly as tag. (eieio--object-class): Adjust to new tag representation. (eieio-object-p): Rewrite, and adapt to new `type-of' behavior. (eieio-defclass-internal): Use `make-record'. (eieio--generic-generalizer): Adjust generalizer code accordingly. * lisp/emacs-lisp/eieio.el (make-instance, clone): Use copy-record. * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `recordp'. * doc/lispref/records.texi, doc/misc/eieio.texi: Update for records.
* Make cl-defstruct use records.Lars Brinkhoff2017-04-045-47/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-extra.el (cl--describe-class) (cl--describe-class-slots): Use the new `type-of'. * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Use type-of. (cl--generic-struct-specializers): Adjust to new tag. * lisp/emacs-lisp/cl-macs.el (cl-defstruct): When type is nil, use records. Use the type symbol as the tag. Use copy-record to copy structs. (cl--defstruct-predicate): New function. (cl--pcase-mutually-exclusive-p): Use it. (cl-struct-sequence-type): Can now return `record'. * lisp/emacs-lisp/cl-preloaded.el (cl--make-slot-desc): Adjust ad-hoc code to new format. (cl--struct-register-child): Work with records. (cl-struct-define): Don't touch the tag's symbol-value and symbol-function slots when we use the type as tag. * lisp/emacs-lisp/cl-print.el (cl-print-object): Adjust to new tag. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record): New test. * doc/lispref/records.texi, doc/misc/cl.texi: Update for records.
* * lisp/emacs-lisp/ert.el (ert-run-tests): Make INTERACTIVE arg optional.Noam Postavsky2017-03-281-1/+1
|
* Fix obsolete ‘test/automated’ referencesPaul Eggert2017-03-273-4/+2
| | | | | | | | | | | | | | * Makefile.in (mostlyclean, clean, maybeclean_dirs, distclean) (bootstrap-clean, maintainer-clean): Clean ‘test’, not ‘test/automated’. Test for existence of subdirectory only for ‘test’, not for directories that should always exist. * admin/MAINTAINERS, etc/TODO, lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/seq.el, lisp/emacs-lisp/thunk.el: * lisp/man.el (Man-parse-man-k): * lisp/url/url-domsuf.el, make-dist: * test/file-organization.org: Fix obsolete references to test/automated.
* * lisp/emacs-lisp/pcase.el (pcase): Comment debug message (Bug#26177).Paul Pogonyshev2017-03-251-2/+2
|
* Stop edebug getting stuck on backquote (Bug#23651)Jens Uwe Schmidt2017-03-251-2/+2
| | | | | | | * lisp/emacs-lisp/edebug.el (edebug-read-sexp): Move forward after reading backquote or comma. Copyright-paperwork-exempt: yes
* Make it easier to abort a series of tests with C-gHelmut Eller2017-03-241-9/+13
| | | | | | | | * emacs-lisp/ert.el (ert-run-tests): Add "interactively" arg. If interactively is true and a test was aborted then ask if the remaining tests should be aborted too. (ert-run-tests-batch, ert-run-tests-interactively): Pass in interactively arg.
* * lisp/emacs-lisp/lisp-mode.el: Don't highlight \( at BOLStefan Monnier2017-03-241-11/+19
| | | | | (elisp--font-lock-backslash): Extract from lisp-el-font-lock-keywords-2. Don't highlight \ at BOL. Don't assume syntax-ppss preserves match-data.
* * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Fix null endpos caseGraham Dobbins2017-03-211-1/+4
| | | | Copyright-paperwork-exempt: yes
* Merge from origin/emacs-25Paul Eggert2017-03-192-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ab0a60a ; * CONTRIBUTE (Generating ChangeLog entries): Drop duplicate... 7e02a47 Index byte-compile-debug 7c1e598 Document `byte-compile-debug' in the ELisp manual 4d81eb4 Document variable `byte-compile-debug' 72ef710 Fix call to debugger on assertion failure ae8264c Call modification hooks in org-src fontify buffers b3139da ; Fix last change in doc/lispref/strings.texi c331f39 Improve documentation of 'format' conversions 9f52f67 Remove stale functions from ert manual c416b14 Fix a typo in Eshell manual 06695a0 ; Fix a typo in ediff-merg.el 954e9e9 Improve documentation of hooks related to saving buffers 9fcab85 Improve documentation of auto-save-visited-file-name 2236c53 fix typo in mailcap-mime-extensions 85a3e4e Fix typos in flymake.el a1ef10e More NEWS checking for admin.el's set-version # Conflicts: # lisp/emacs-lisp/bytecomp.el
| * Document variable `byte-compile-debug'Philipp Stephani2017-01-311-1/+2
| | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-debug): Document variable.
| * Fix call to debugger on assertion failureNoam Postavsky2017-01-301-1/+1
| | | | | | | | | | | | * lisp/emacs-lisp/cl-preloaded.el (cl--assertion-failed): The first argument must be `error', and the second is a list of arguments for `signal'.