1. 21 Aug, 2015 2 commits
    • Fabián Ezequiel Gallina's avatar
      python.el: Enhancements to process environment setup. · 4150b563
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-shell-process-environment)
      (python-shell-extra-pythonpaths, python-shell-exec-path)
      (python-shell-virtualenv-root): Update docstring.  Remove :safe.
      (python-shell-setup-codes): Remove :safe.
      (python-shell-remote-exec-path): New defcustom.
      (python-shell--add-to-path-with-priority): New macro.
      (python-shell-calculate-pythonpath): Give priority to
      python-shell-extra-pythonpaths.  Update docstring.
      (python-shell-calculate-process-environment): Give priority to
      python-shell-process-environment.  Update docstring.
      (python-shell-calculate-exec-path): Give priority to
      python-shell-exec-path and calculated virtualenv bin directory.
      Update docstring.
      (python-shell-tramp-refresh-remote-path): New function.
      (python-shell-with-environment): Use it when working remotely and
      do not modify tramp-remote-path.  Allow nesting.
      (python-shell-calculate-command): Remove useless
      python-shell-with-environment call.
      
      * test/automated/python-tests.el (python-shell-calculate-pythonpath-1)
      (python-shell-calculate-pythonpath-2)
      (python-shell-calculate-process-environment-6)
      (python-shell-calculate-process-environment-7)
      (python-shell-calculate-process-environment-8)
      (python-shell-calculate-exec-path-3)
      (python-shell-calculate-exec-path-4)
      (python-shell-calculate-exec-path-5)
      (python-shell-calculate-exec-path-6)
      (python-shell-with-environment-3): New tests.
      (python-shell-calculate-process-environment-2)
      (python-shell-calculate-process-environment-3)
      (python-shell-calculate-process-environment-4)
      (python-shell-calculate-process-environment-5)
      (python-shell-calculate-exec-path-1)
      (python-shell-calculate-exec-path-2)
      (python-shell-with-environment-1)
      (python-shell-with-environment-2): Update and simplify.
      4150b563
    • Paul Eggert's avatar
      Avoid hard-coding "M-x command" in docstrings · c1cacb09
      Paul Eggert authored
      * lisp/calendar/todo-mode.el (todo-mode):
      * lisp/desktop.el (desktop-save-mode):
      * lisp/edmacro.el (edit-kbd-macro):
      * lisp/emacs-lisp/package.el (package-menu-execute):
      * lisp/emulation/viper-cmd.el (viper-ask-level):
      * lisp/emulation/viper-init.el (viper-expert-level):
      * lisp/filesets.el (filesets-add-buffer):
      * lisp/follow.el (follow-mode):
      * lisp/gnus/auth-source.el (auth-sources):
      * lisp/international/ogonek.el (ogonek-informacja)
      (ogonek-information):
      * lisp/net/tramp.el (tramp-process-actions):
      * lisp/org/org-gnus.el (org-gnus-no-new-news):
      * lisp/org/org.el (org-ellipsis):
      * lisp/progmodes/python.el (python-shell-get-process-or-error):
      * lisp/progmodes/vhdl-mode.el (vhdl-mode):
      * lisp/server.el (server-start):
      * lisp/type-break.el (type-break-noninteractive-query):
      * lisp/userlock.el (ask-user-about-supersession-help):
      * lisp/whitespace.el (whitespace-report-region):
      Prefer (substitute-command-keys "`\\[foo-command]'")
      to "`M-x foo-command'" in docstrings and the like.
      c1cacb09
  2. 12 Aug, 2015 1 commit
  3. 06 Jul, 2015 6 commits
  4. 05 Jul, 2015 1 commit
    • Christoph Wedler's avatar
      Respect `prog-indentation-context' in python.el · 044d4cc0
      Christoph Wedler authored
      * lisp/progmodes/python.el (python-indent-guess-indent-offset)
      (python-indent-context, python-indent--calculate-indentation)
      (python-info-current-defun)
      (python-info-dedenter-opening-block-message)
      (python-info-line-ends-backslash-p)
      (python-info-beginning-of-backslash)
      (python-info-continuation-line-p): Use `prog-widen'.
      (python-indent--calculate-indentation)
      (python-indent--calculate-levels)
      (python-indent-calculate-indentation): Use `prog-first-column'.
      (python-indent--calculate-levels): Simplify.
      
      Ignore also initial empty lines for syntax calculation.
      * lisp/progmodes/python.el (python-indent-context): Return
      :no-indent for first non-empty line, not just in line 1.
      * test/automated/python-tests.el (python-indent-base-case)
      (python-indent-inside-paren-1, python-indent-inside-paren-2)
      (python-indent-inside-paren-3, python-indent-inside-paren-4)
      (python-indent-inside-paren-5, python-indent-inside-paren-6)
      (python-indent-after-backslash-1)
      (python-indent-after-backslash-2)
      (python-indent-after-backslash-3)
      (python-indent-after-backslash-4, python-indent-inside-string-1):
      Expect :no-indent for first non-empty line.
      044d4cc0
  5. 21 May, 2015 1 commit
  6. 11 May, 2015 1 commit
  7. 30 Apr, 2015 1 commit
  8. 20 Apr, 2015 1 commit
  9. 13 Apr, 2015 1 commit
    • Fabián Ezequiel Gallina's avatar
      python.el: Keep symmetry on sexp navigation with parens · 659609d1
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19954
      
      * lisp/progmodes/python.el
      (python-nav--forward-sexp): Add argument skip-parens-p.
      (python-nav-forward-sexp, python-nav-backward-sexp)
      (python-nav-forward-sexp-safe)
      (python-nav-backward-sexp-safe): Use it.
      
      * test/automated/python-tests.el
      (python-nav-forward-sexp-1): Fix test.
      659609d1
  10. 09 Apr, 2015 2 commits
    • Fabián Ezequiel Gallina's avatar
      python.el: Indent docstring lines to base-indent · c9415ccb
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19595
      
      Thanks to immerrr <immerrr@gmail.com> for reporting and providing
      an initial patch.
      
      * lisp/progmodes/python.el
      (python-indent-context): Add :inside-docstring context.
      (python-indent--calculate-indentation): Handle :inside-docstring.
      (python-indent-region): Re-indent docstrings.
      
      * test/automated/python-tests.el (python-indent-region-5)
      (python-indent-inside-string-2): Fix tests.
      c9415ccb
    • Fabián Ezequiel Gallina's avatar
      python.el: Increase native completion robustness · 911ed2eb
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19755
      
      Thanks to Carlos Pita <carlosjosepita@gmail.com> for reporting
      this and providing useful ideas.
      
      * lisp/progmodes/python.el
      (python-shell-completion-native-output-timeout): Increase value.
      (python-shell-completion-native-try-output-timeout): New var.
      (python-shell-completion-native-try): Use it.
      (python-shell-completion-native-setup): New readline setup avoids
      polluting current context, ensures output when no-completions are
      available and includes output end marker.
      (python-shell-completion-native-get-completions): Trigger with one
      tab only.  Call accept-process-output until output end is found or
      python-shell-completion-native-output-timeout is exceeded.
      911ed2eb
  11. 06 Apr, 2015 3 commits
    • Fabián Ezequiel Gallina's avatar
      python.el: Do not break IPython magic completions. · ab9252a0
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19736
      
      * lisp/progmodes/python.el (python-shell-completion-setup-code):
      Cleaner setup; import rlcompleter as last resource.
      ab9252a0
    • Fabián Ezequiel Gallina's avatar
      cf7b034e
    • Fabián Ezequiel Gallina's avatar
      python.el: Enhance docstring detection following PEP-257. · deea36f0
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-docstring-at-p): Remove function.
      (python-info-assignment-statement-p): New function.
      (python-info-assignment-continuation-line-p): Use it.
      (python-info-docstring-p): New function.
      (python-font-lock-syntactic-face-function)
      (python-fill-string): Use it.
      
      * test/automated/python-tests.el (python-info-assignment-statement-p-1)
      (python-info-assignment-statement-p-2)
      (python-info-assignment-statement-p-3, python-info-docstring-p-1)
      (python-info-docstring-p-2, python-info-docstring-p-3)
      (python-info-docstring-p-4, python-info-docstring-p-5)
      (python-info-docstring-p-6): New tests.
      deea36f0
  12. 26 Mar, 2015 1 commit
  13. 21 Feb, 2015 1 commit
  14. 16 Feb, 2015 1 commit
  15. 12 Feb, 2015 1 commit
  16. 10 Feb, 2015 2 commits
  17. 08 Feb, 2015 3 commits
  18. 07 Feb, 2015 3 commits
    • Fabián Ezequiel Gallina's avatar
      python.el: Keep eldoc visible while typing args. · 2155973e
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19637
      
      * lisp/progmodes/python.el (python-eldoc--get-symbol-at-point): New
      function.
      (python-eldoc--get-doc-at-point, python-eldoc-at-point): Use it.
      
      * test/automated/python-tests.el
      (python-eldoc--get-symbol-at-point-1)
      (python-eldoc--get-symbol-at-point-2)
      (python-eldoc--get-symbol-at-point-3)
      (python-eldoc--get-symbol-at-point-4): New tests.
      2155973e
    • Fabián Ezequiel Gallina's avatar
      Fix hideshow integration. · 2d467a0f
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19761
      
      * lisp/progmodes/python.el
      (python-hideshow-forward-sexp-function): New function based on
      Carlos Pita <carlosjosepita@gmail.com> patch.
      (python-mode): Make `hs-special-modes-alist` use it and initialize
      the end regexp with the empty string to avoid skipping parens.
      
      * test/automated/python-tests.el
      (python-tests-visible-string): New function.
      (python-parens-electric-indent-1)
      (python-triple-quote-pairing): Fix indentation, move require calls.
      (python-hideshow-hide-levels-1)
      (python-hideshow-hide-levels-2): New tests.
      2d467a0f
    • Fabián Ezequiel Gallina's avatar
      * lisp/progmodes/python.el (python-check-custom-command): Do not use · 86c50b9a
      Fabián Ezequiel Gallina authored
      defvar-local for compat with Emacs<24.3.
      86c50b9a
  19. 05 Feb, 2015 1 commit
  20. 04 Feb, 2015 1 commit
  21. 30 Jan, 2015 3 commits
  22. 27 Jan, 2015 2 commits
    • Sam Steingold's avatar
      minor tweaks for `python-check' · bd7a1e15
      Sam Steingold authored
      * lisp/progmodes/python.el (python-check-custom-command): Buffer local
      because it usually includes the buffer name.
      (python-check-command): Set to epylint when pyflakes is not available.
      bd7a1e15
    • Fabián Ezequiel Gallina's avatar
      python.el: New non-global state dependent indentation engine. · 5485e3e5
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:18319
      Fixes: debbugs:19595
      
      * lisp/progmodes/python.el (python-syntax-comment-or-string-p): Accept
      PPSS as argument.
      (python-syntax-closing-paren-p): New function.
      (python-indent-current-level)
      (python-indent-levels): Mark obsolete.
      (python-indent-context): Return more context cases.
      (python-indent--calculate-indentation)
      (python-indent--calculate-levels): New functions.
      (python-indent-calculate-levels): Use them.
      (python-indent-calculate-indentation, python-indent-line):
      (python-indent-line-function): Rewritten to use new API.
      (python-indent-dedent-line): Simplify logic.
      (python-indent-dedent-line-backspace): Use `unless`.
      (python-indent-toggle-levels): Delete function.
      
      * test/automated/python-tests.el (python-indent-pep8-1)
      (python-indent-pep8-2, python-indent-pep8-3)
      (python-indent-after-comment-1, python-indent-after-comment-2)
      (python-indent-inside-paren-1, python-indent-inside-paren-2)
      (python-indent-after-block-1, python-indent-after-block-2)
      (python-indent-after-backslash-1, python-indent-after-backslash-2)
      (python-indent-after-backslash-3, python-indent-block-enders-1)
      (python-indent-block-enders-2, python-indent-block-enders-3)
      (python-indent-block-enders-4, python-indent-block-enders-5)
      (python-indent-dedenters-1, python-indent-dedenters-2)
      (python-indent-dedenters-3, python-indent-dedenters-4)
      (python-indent-dedenters-5, python-indent-dedenters-6)
      (python-indent-dedenters-7, python-indent-dedenters-8): Fix tests.
      (python-indent-base-case, python-indent-after-block-3)
      (python-indent-after-backslash-5, python-indent-inside-paren-3)
      (python-indent-inside-paren-4, python-indent-inside-paren-5)
      (python-indent-inside-paren-6, python-indent-inside-string-1)
      (python-indent-inside-string-2, python-indent-inside-string-3)
      (python-indent-dedent-line-backspace-1): New Tests.
      5485e3e5
  23. 20 Jan, 2015 1 commit
    • Michal Nazarewicz's avatar
      eldoc: modify `eldoc-documentation-function' using `add-function' · fd020a29
      Michal Nazarewicz authored
      * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Describe how
      major modes should use `add-function' to alter value of the variable.
      
      * lisp/hexl.el (hexl-mode): Set `eldoc-documentation-function' using
      `add-function' so the default value is always used.
      * lisp/ielm.el (inferior-emacs-lisp-mode): Set
      `eldoc-documentation-function' using `add-function' so the default
      value is always used.
      * lisp/progmodes/cfengine.el (cfengine3-mode): Set
      `eldoc-documentation-function' using `add-function' so the default
      value is always used.
      * lisp/progmodes/elisp-mode (emacs-lisp-mode): Set
      `eldoc-documentation-function' using `add-function' so the default
      value is always used.
      * lisp/progmodes/octave.el (octave-mode): Set
      `eldoc-documentation-function' using `add-function' so the default
      value is always used.
      * lisp/progmodes/python.el (python-mode): Set
      `eldoc-documentation-function' using `add-function' so the default
      value is always used.
      * lisp/simple.el (read--expression): Set `eldoc-documentation-function'
      using `add-function' so the default value is always used.
      fd020a29