1. 29 May, 2017 1 commit
    • Dmitry Gutov's avatar
      Turn global-eldoc-mode into a globalized minor mode · 2349f1df
      Dmitry Gutov authored
      * lisp/emacs-lisp/eldoc.el (global-eldoc-mode):
      Turn into globalized mode (bug#19853).
      (turn-on-eldoc-mode): Make it into a wrapper instead of alias.
      (eldoc-mode): Only show the message when called interactively.
      2349f1df
  2. 27 May, 2017 3 commits
  3. 26 May, 2017 1 commit
  4. 24 May, 2017 2 commits
  5. 23 May, 2017 1 commit
  6. 21 May, 2017 1 commit
  7. 20 May, 2017 2 commits
  8. 19 May, 2017 2 commits
  9. 17 May, 2017 1 commit
  10. 16 May, 2017 1 commit
  11. 14 May, 2017 2 commits
    • Gemini Lasswell's avatar
      Make edebug-step-in work on generic methods (Bug#22294) · e6f64df9
      Gemini Lasswell authored
      * lisp/emacs-lisp/edebug.el (edebug-match-cl-generic-method-args):
      New function to implement the edebug-form-spec property of
      the symbol cl-generic-method-args.
      (edebug-instrument-function): If the function is a generic
      function, find and instrument all of its methods. Return a list
      instead of a single symbol.
      (edebug-instrument-callee): Now returns a list. Update docstring.
      (edebug-step-in): Handle the list returned by edebug-instrument-callee.
      * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Use name and
      cl-generic-method-args in its Edebug spec.
      * lisp/emacs-lisp/eieio-compat.el (defmethod): Use name and
      cl-generic-method-args in its Edebug spec.
      * lisp/subr.el (method-files): New function.
      * test/lisp/subr-tests.el (subr-tests--method-files--finds-methods)
      (subr-tests--method-files--nonexistent-methods): New tests.
      e6f64df9
    • Mark Oteiza's avatar
      ; Revert "Adjust the edebug spec of if-let*" · 4e088755
      Mark Oteiza authored
      This reverts commit fd4b83ca.
      4e088755
  12. 13 May, 2017 2 commits
    • Philipp's avatar
      Make `old-style-backquotes' variable internal · a1d46159
      Philipp authored
      * src/lread.c (load_warn_old_style_backquotes, Fload, read1)
      (syms_of_lread): Rename `old-style-backquotes' to
      `lread--old-style-backquotes', and clarify that it's for internal
      use only.
      * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Rename
      variable.
      * test/src/lread-tests.el (lread-tests--old-style-backquotes): Add
      unit test.
      * emacs-lisp/bytecomp-tests.el
      (bytecomp-tests--old-style-backquotes): Add unit test.
      a1d46159
    • Philipp Stephani's avatar
      Improve unescaped character literal warnings · 16004397
      Philipp Stephani authored
      * src/lread.c (load_warn_unescaped_character_literals)
      (syms_of_lread):
      lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Improve
      formatting of unescaped character literal warnings.
      
      * test/src/lread-tests.el (lread-tests--unescaped-char-literals):
      test/lisp/emacs-lisp/bytecomp-tests.el
      (bytecomp-tests--unescaped-char-literals): Adapt unit tests.
      16004397
  13. 12 May, 2017 3 commits
    • Noam Postavsky's avatar
      Modify `beginning-of-defun-comments' · aa779b0f
      Noam Postavsky authored
      * lisp/emacs-lisp/lisp.el (beginning-of-defun-comments): Try not to stop
      in the middle of a multiline comment.
      aa779b0f
    • Noam Postavsky's avatar
    • Marcin Borkowski's avatar
      Fix Bug#21072 and rework `mark-defun' · 22fc9170
      Marcin Borkowski authored
      * test/lisp/progmodes/elisp-mode-tests.el (mark-defun-test-buffer):
        New variable
      (mark-defun-no-arg-region-inactive)
      (mark-defun-no-arg-region-active)
      (mark-defun-arg-region-active)
      (mark-defun-pos-arg-region-inactive)
      (mark-defun-neg-arg-region-inactive, mark-defun-bob): Add tests for
      the new `mark-defun'.
      
      * lisp/emacs-lisp/lisp.el (beginning-of-defun--in-emptyish-line-p):
        New function.
      (beginning-of-defun-comments): New function.
      (mark-defun): Fix bug#21072, also rewrite large parts of `mark-defun'
      to accept a numerical prefix argument.
      22fc9170
  14. 10 May, 2017 1 commit
    • Noam Postavsky's avatar
      Fix lisp-indent-region and indent-sexp (Bug#26619) · e7b6751c
      Noam Postavsky authored
      The new lisp-indent-region introduced in 2017-04-22 "Add new
      `lisp-indent-region' that doesn't reparse the code." is broken because
      it doesn't save the calculated indent amounts for already seen sexp
      depths.  Fix this by unifying the indent-sexp and lisp-indent-region
      code.  Furthermore, only preserve position 2 of the running parse
      when the depth doesn't change.
      * lisp/emacs-lisp/lisp-mode.el (lisp-ppss): Use an OLDSTATE that
      corresponds with the start point when calling parse-partial-sexp.
      (lisp-indent-state): New struct.
      (lisp-indent-calc-next): New function, extracted from indent-sexp.
      (indent-sexp, lisp-indent-region): Use it.
      (lisp-indent-line): Take indentation, instead of parse state.
      * test/lisp/emacs-lisp/lisp-mode-tests.el
      (lisp-mode-tests--correctly-indented-sexp): New constant.
      (lisp-indent-region, lisp-indent-region-defun-with-docstring):
      (lisp-indent-region-open-paren, lisp-indent-region-in-sexp): New
      tests.
      e7b6751c
  15. 09 May, 2017 1 commit
    • Glenn Morris's avatar
      Don't duplicate autoload code in package.el · d6d5020c
      Glenn Morris authored
      * lisp/emacs-lisp/autoload.el (autoload-rubric): Add a package option.
      * lisp/emacs-lisp/package.el (autoload-rubric): Declare.
      (package-autoload-ensure-default-file): Use autoload-rubric.
      d6d5020c
  16. 07 May, 2017 3 commits
    • Glenn Morris's avatar
      Remove obsolete method of changing byte-compile-dest-file · 233cfb0e
      Glenn Morris authored
      * lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file):
      Define unconditionally.
      233cfb0e
    • Glenn Morris's avatar
      Write autoloads file atomically · 7f3d6390
      Glenn Morris authored
      * 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.
      7f3d6390
    • Glenn Morris's avatar
      Write autoloads file once only · 03d94198
      Glenn Morris authored
      * 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.
      03d94198
  17. 05 May, 2017 3 commits
  18. 04 May, 2017 3 commits
  19. 02 May, 2017 1 commit
    • Gemini Lasswell's avatar
      Fix Edebug specs for 'cl-defmethod' and 'defmethod' · d895f6c1
      Gemini Lasswell authored
      * 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).
      d895f6c1
  20. 01 May, 2017 1 commit
    • Philipp Stephani's avatar
      Warn about missing backslashes during load · c2bbdc33
      Philipp Stephani authored
      * 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.
      c2bbdc33
  21. 23 Apr, 2017 1 commit
    • Noam Postavsky's avatar
      Don't require bytecomp for running ert tests · b20d05c6
      Noam Postavsky authored
      "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'.
      b20d05c6
  22. 22 Apr, 2017 4 commits
    • Noam Postavsky's avatar
      Add new `lisp-indent-region' that doesn't reparse the code. · 4713dd42
      Noam Postavsky authored
      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'.
      4713dd42
    • Noam Postavsky's avatar
      Remove ignored argument from lisp-indent-line · 2f6769f9
      Noam Postavsky authored
      * 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'.
      2f6769f9
    • Noam Postavsky's avatar
    • Noam Postavsky's avatar
      Don't reparse the sexp in indent-sexp (Bug#25122) · 43c84577
      Noam Postavsky authored
      * 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.
      43c84577