1. 14 May, 2018 1 commit
    • Tino Calancha's avatar
      run-python: Make the buffer running python current · b015fb0c
      Tino Calancha authored
      * lisp/progmodes/python.el (run-python, python-shell-make-comint):
      Make the buffer running the inferior python process the current buffer
      (Bug#31398).
      * test/lisp/progmodes/python-tests.el (python-tests--bug31398):
      Add test.
      b015fb0c
  2. 20 Apr, 2018 1 commit
    • Glenn Morris's avatar
      The tedious game of whack-a-mole with compiler warnings continues · 9c3eeba4
      Glenn Morris authored
      * lisp/abbrev.el (edit-abbrevs-map):
      * lisp/emacs-lock.el (emacs-lock-from-exiting):
      * lisp/htmlfontify.el (hfy-optimisations):
      * lisp/ielm.el (inferior-emacs-lisp-mode-hook)
      (inferior-emacs-lisp-mode-map):
      * lisp/isearch.el (isearch-lazy-highlight-word):
      * lisp/select.el (x-select-enable-clipboard, x-select-enable-primary):
      * lisp/shell.el (shell-dirtrack-mode):
      * lisp/skeleton.el (skeleton-transformation, skeleton-filter):
      * lisp/startup.el (inhibit-splash-screen, inhibit-startup-message):
      * lisp/window.el (even-window-heights):
      * lisp/calendar/timeclock.el (timeclock-modeline-display):
      * lisp/cedet/semantic/db-mode.el (semanticdb-mode-hook)
      (semanticdb-global-mode):
      * lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings):
      * lisp/emacs-lisp/warnings.el (display-warning-minimum-level)
      (log-warning-minimum-level):
      * lisp/erc/erc-dcc.el (erc-dcc-chat-filter-hook):
      * lisp/gnus/nnspool.el (news-path):
      * lisp/org/org-agenda.el (org-agenda-search-view-search-words-only)
      (org-agenda-remove-tags-when-in-prefix)
      (org-agenda-align-tags-to-column, org-agenda-keymap):
      * lisp/org/org.el (org-special-ctrl-a)
      (org-log-state-notes-into-drawer)
      (org-agenda-multi-occur-extra-files):
      * lisp/progmodes/flymake-proc.el (flymake-err-line-patterns)
      (flymake-check-file-limit):
      * lisp/progmodes/make-mode.el (makefile-query-one-target-method):
      * lisp/progmodes/octave.el (inferior-octave-startup-hook):
      * lisp/progmodes/python.el (python-buffer)
      (python-preoutput-result):
      * lisp/progmodes/sql.el (sql-dialect):
      * lisp/textmodes/artist.el (artist-text-renderer):
      * lisp/textmodes/bibtex.el (bibtex-autokey-name-case-convert)
      (bibtex-autokey-titleword-case-convert):
      * lisp/textmodes/flyspell.el (flyspell-generic-check-word-p):
      * lisp/textmodes/ispell.el (ispell-format-word):
      * lisp/textmodes/rst.el (rst-preferred-decorations):
      * lisp/textmodes/sgml-mode.el (sgml-transformation):
      Move aliases before targets, to silence new compiler warning.
      * lisp/term/ns-win.el (ns-option-modifier, ns-right-option-modifier):
      Silence warning.
      9c3eeba4
  3. 08 Apr, 2018 1 commit
  4. 02 Mar, 2018 1 commit
    • Noam Postavsky's avatar
      Fix issues turned up by previous python.el change · 4a093419
      Noam Postavsky authored
      See [1] for more discussion.
      * lisp/progmodes/python.el (python--prettify-symbols-alist): Define
      the obsolete alias before the variable proper, so that we correctly
      get the user's settings regardless of which name they set.
      (python-nav-end-of-statement): Add missing backslash.
      (python-shell-send-file): Call `expand-file-name' before
      `file-local-name', the expansion of "~" could be different on remote
      filenames.
      (python-mode): Declare prettify-symbols-alist instead of checking if
      it's bound.  Use the non-obsolete python-prettify-symbols-alist name,
      rather than checking if the obsolete name is bound (it always is too,
      but the Emacs 24 byte compiler doesn't recognize that
      define-obsolete-variable-alias defines a variable).
      
      [1]: https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00826.html
      4a093419
  5. 28 Feb, 2018 1 commit
    • Noam Postavsky's avatar
      Fix python.el for Emacs 24, bump ELPA version to 0.26.1 (Bug#30633) · 2291d9ae
      Noam Postavsky authored
      Since python.el is distributed via GNU ELPA, it should be functional
      in earlier Emacs versions.  Also fix some compile warnings.
      * lisp/progmodes/python.el: Bump version to 0.26.1.  Define
      `prog-first-column' and `file-local-name' also at compile time, as
      needed.
      (inferior-python-mode-hook): Declare for the benefit of Emacs 24.3.
      (python-nav-end-of-statement): Fix format string for assertion error.
      (python-shell-tramp-refresh-process-environment): Don't `function'
      quote a symbol which might not be fbound.
      (python-mode): Only use prettify-symbols settings if they're bound.
      2291d9ae
  6. 16 Feb, 2018 1 commit
  7. 13 Feb, 2018 1 commit
  8. 12 Feb, 2018 1 commit
  9. 01 Jan, 2018 2 commits
  10. 20 Dec, 2017 1 commit
    • Glenn Morris's avatar
      Fix some more aliases to user options · 7af7f5e1
      Glenn Morris authored
      * lisp/cus-edit.el (custom-mode-hook):
      * lisp/erc/erc.el (erc-default-coding-system):
      * lisp/progmodes/python.el (python-indent, python-guess-indent)
      (python-shell-virtualenv-path)
      (python-shell-completion-module-string-code)
      (python-shell-completion-pdb-string-code, python-use-skeletons):
      Define aliases to user options before the options are defined.
      7af7f5e1
  11. 17 Dec, 2017 1 commit
    • Charles A. Roelli's avatar
      python.el doc fixes · c51e797b
      Charles A. Roelli authored
      * lisp/progmodes/python.el (python-shell-accept-process-output):
      (python-shell-comint-end-of-output-p):
      (python-shell-first-prompt-hook):
      (python-info-beginning-of-backslash): Doc fixes.
      c51e797b
  12. 14 Dec, 2017 1 commit
    • Dmitry Gutov's avatar
      Consolidate 'widen' calls · 7e9eef0f
      Dmitry Gutov authored
      * lisp/progmodes/prog-mode.el (prog-indentation-context):
      Un-document all elements but the first.
      (prog-widen): Remove.
      (http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00321.html)
      
      * doc/lispref/text.texi (Mode-Specific Indent): Update.
      
      * lisp/progmodes/ruby-mode.el (ruby-calculate-indent):
      Don't call widen.
      
      * lisp/progmodes/python.el
      (python-indent-guess-indent-offset)
      (python-info-current-defun): Replace prog-widen with widen;
      these functions are not called during indentation.
      (python-indent-context)
      (python-indent--calculate-indentation)
      (python-info-dedenter-opening-block-message)
      (python-info-line-ends-backslash-p)
      (python-info-beginning-of-backslash)
      (python-info-continuation-line-p)
      (python-info-current-defun): Remove 'widen' calls.
      
      * lisp/indent.el (indent-according-to-mode)
      (indent-for-tab-command, indent-region): Move them here.
      
      * lisp/textmodes/mhtml-mode.el (mhtml-indent-line):
      Bind prog-indentation-context to one-element list.
      7e9eef0f
  13. 13 Dec, 2017 1 commit
    • Glenn Morris's avatar
      Add missing :version tags revealed by cusver-check · 52d2a690
      Glenn Morris authored
      * lisp/comint.el (comint-move-point-for-matching-input):
      * lisp/epa.el (epa-replace-original-text):
      * lisp/image-dired.el (image-dired-cmd-optipng-program)
      (image-dired-cmd-optipng-options):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table):
      * lisp/gnus/gnus-cloud.el (gnus-cloud-storage-method)
      (gnus-cloud-interactive):
      * lisp/net/mailcap.el (mailcap-user-mime-data):
      * lisp/progmodes/cc-vars.el (c-asymmetry-fontification-flag)
      (c-noise-macro-names, c-noise-macro-with-parens-names):
      * lisp/progmodes/flymake.el (flymake-start-on-flymake-mode)
      (flymake-wrap-around):
      * lisp/progmodes/grep.el (grep-use-null-filename-separator):
      * lisp/progmodes/js.el (js-indent-align-list-continuation):
      * lisp/progmodes/perl-mode.el (perl-flymake-command):
      * lisp/progmodes/python.el (python-flymake-command)
      (python-flymake-command-output-pattern, python-flymake-msg-alist):
      * lisp/progmodes/ruby-mode.el (ruby-flymake-use-rubocop-if-available)
      (ruby-rubocop-config):
      * lisp/textmodes/less-css-mode.el (less-css):
      * lisp/textmodes/tex-mode.el (tex-chktex-program)
      (tex-chktex-extra-flags): Add missing :version tags.
      52d2a690
  14. 03 Dec, 2017 1 commit
  15. 02 Dec, 2017 1 commit
  16. 05 Nov, 2017 2 commits
    • Justin Timmons's avatar
      Support python virtualenv on w32 (Bug#24464) · 18af404e
      Justin Timmons authored
      According to the virtualenv docs only POSIX systems follow the
      structure "/path/to/venv/bin/", while windows systems use
      "/path/to/venv/Scripts" for the location of the binary files, most
      importantly including the python interpreter (see:
      https://virtualenv.pypa.io/en/stable/userguide/#windows-notes).
      * lisp/progmodes/python.el (python-shell-calculate-exec-path): Use the
      "/path/to/venv/Scripts" for `windows-nt' machines.
      
      Copyright-paperwork-exempt: yes
      18af404e
    • Lele Gaifax's avatar
      Add a Flymake backend for Python (bug#28808) · 3ad712eb
      Lele Gaifax authored
      Implement new Flymake backend with related customizable settings.
      
      * lisp/progmodes/python.el (python-flymake-command)
      (python-flymake-command-output-pattern)
      (python-flymake-msg-alist): New defcustom.
      (python--flymake-parse-output): New function, able to parse
      python-flymake-command output accordingly to
      python-flymake-command-output-pattern.
      (python-flymake): New function implementing the backend
      interface using python--flymake-parse-output for the real
      work.
      (python-mode): Add python-flymake to flymake-diagnostic-functions.
      3ad712eb
  17. 15 Oct, 2017 1 commit
  18. 07 Oct, 2017 1 commit
  19. 03 Oct, 2017 1 commit
  20. 25 Sep, 2017 1 commit
  21. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  22. 27 Aug, 2017 1 commit
    • Noam Postavsky's avatar
      Disable completion while entering python multiline statements · 5440b238
      Noam Postavsky authored
      The "legacy" completion mechanism sends newlines to the running python
      process to get the list of completions, which confuses things if the
      user is in the middle of entering a multiline statement (Bug#28051).
      It's better to disable completion in this case.
      * lisp/progmodes/python.el (python-shell--block-prompt): New variable.
      (python-shell-prompt-set-calculated-regexps): Set it.
      (python-shell-completion-at-point): Return 'ignore' as the completion
      function when the current prompt is a block prompt.
      5440b238
  23. 20 Aug, 2017 1 commit
  24. 05 Jul, 2017 1 commit
  25. 03 Jun, 2017 1 commit
    • Glenn Morris's avatar
      Add watch for password back to inferior python comint filter · 182912c7
      Glenn Morris authored
      It was removed along with other items for speed (bug#16875),
      but doesn't seem to have been causing an issue, and it's useful to
      have it there (bug#27154).
      * lisp/progmodes/python.el (inferior-python-mode):
      Add comint-watch-for-password-prompt to comint-output-filter-functions.
      182912c7
  26. 29 May, 2017 1 commit
  27. 23 Mar, 2017 1 commit
    • Philipp Stephani's avatar
      Protect against an infloop in python-mode · 4fbd330f
      Philipp Stephani authored
      There appears to be an edge case caused by using `syntax-ppss' in a
      narrowed buffer during JIT lock inside of Python triple-quote strings.
      Unfortunately it is impossible to reproduce without manually
      destroying the syntactic information in the Python buffer, but it has
      been observed in practice.  In that case it can happen that the syntax
      caches get sufficiently out of whack so that there appear to be
      overlapping strings in the buffer.  As Python has no nested strings,
      this situation is impossible and leads to an infloop in
      `python-nav-end-of-statement'.  Protect against this by checking
      whether the search for the end of the current string makes progress.
      
      * python.el (python-nav-end-of-statement): Protect against infloop.
      * progmodes/python-tests.el
      (python-tests--python-nav-end-of-statement--infloop): Add unit test.
      4fbd330f
  28. 06 Mar, 2017 1 commit
  29. 08 Feb, 2017 1 commit
  30. 27 Jan, 2017 1 commit
    • Hong Xu's avatar
      python-mode: Fix detection for opening blocks. · 7cb7a582
      Hong Xu authored
      	* python.el (python-info-dedenter-opening-block-positions): There
      	can't be any back-indented lines between an opening block and the
      	current line.
      
      	* python-tests.el (python-indent-electric-colon-4): Add an indent
      	test case where there is one-more indented previous opening block.
      7cb7a582
  31. 13 Jan, 2017 1 commit
    • Dmitry Lazurkin's avatar
      Fix extracting async def type and name in python mode imenu · d4a97088
      Dmitry Lazurkin authored
      * lisp/progmodes/python.el (python-imenu--get-defun-type-name):
      New function.
      (python-imenu--build-tree): Use python-imenu--get-defun-type-name for
      extract async or simple def type and name at current
      position (Bug#24820).
      * test/lisp/progmodes/python-tests.el (python-imenu-create-index-1):
      (python-imenu-create-flat-index-1): Add async def's.
      d4a97088
  32. 09 Jan, 2017 1 commit
  33. 01 Jan, 2017 1 commit
  34. 09 Dec, 2016 1 commit
    • Noam Postavsky's avatar
      Fix bad quoting of python-shell-interpreter · 8f611e5e
      Noam Postavsky authored
      `python-shell-calculate-command' was using `shell-quote-argument' as if
      it was generating a shell command, but its callers don't pass the result
      to a shell, and they expect to parse it with `split-string-and-unquote'.
      This caused problems depending on the flavor of shell quoting in
      effect (Bug#25025).
      
      * lisp/progmodes/python.el (python-shell-calculate-command): Use
      `combine-and-quote-strings' to quote the interpreter, so that it can be
      parsed by `python-shell-make-comint' successfully using
      `split-string-and-unquote'.
      8f611e5e
  35. 20 Nov, 2016 1 commit
    • Michael Albinus's avatar
      Add file-local-name · 22946702
      Michael Albinus authored
      * doc/lispref/files.texi (Magic File Names): Add `file-local-name'.
      (Unique File Names): Use it.
      
      * etc/NEWS: Mention `file-local-name'.
      
      * lisp/files.el (file-local-name): New defun.
      (file-expand-wildcards):
      * lisp/eshell/em-tramp.el (eshell/su, eshell/sudo):
      * lisp/eshell/esh-ext.el (eshell-remote-command):
      * lisp/eshell/esh-proc.el (eshell-gather-process-output):
      * lisp/org/ob-core.el (org-babel-local-file-name):
      * lisp/progmodes/gud.el (gud-common-init, gud-format-command):
      * lisp/progmodes/python.el (python-shell-send-file):
      * lisp/shell.el (shell):
      * lisp/vc/ediff-diff.el (ediff-same-file-contents):
      * lisp/vc/vc-git.el (vc-git-checkin): Use it.
      22946702
  36. 17 Nov, 2016 1 commit
  37. 08 Nov, 2016 2 commits
    • Daniel Colascione's avatar
      Avoid infloop in python · 3ef4ee84
      Daniel Colascione authored
      Fix bug#24905
      
      * lisp/progmodes/python.el (python-info-docstring-p): Improve
      infloop avoidance: replace (bobp) with generic test for
      forward progress.
      * test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Add
      test for bug#24905
      3ef4ee84
    • Daniel Colascione's avatar
      Avoid infloop in python · 112111c4
      Daniel Colascione authored
      Fix bug#24905
      
      * lisp/progmodes/python.el (python-info-docstring-p): Improve
      infloop avoidance: replace (bobp) with generic test for
      forward progress.
      * test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Add
      test for bug#24905
      112111c4