1. 19 Jul, 2018 1 commit
    • Charles A. Roelli's avatar
      Add 'font-lock-maximum-decoration' levels for Python · 36b64e08
      Charles A. Roelli authored
      * etc/NEWS: New entry under Python mode.
      * lisp/progmodes/python.el (python-font-lock-keywords-level-1)
      (python-font-lock-keywords-maximum-decoration): New variables
      based off the incumbent 'python-font-lock-keywords'.
      (python-font-lock-keywords): Change it to a list of the new
      symbols, for use in the 'car' of 'font-lock-defaults'.
      (python-mode): Set the 'car' of 'font-lock-defaults' to the
      value of 'python-font-lock-keywords', instead of the symbol
  2. 16 Jun, 2018 1 commit
    • Noam Postavsky's avatar
      Fix off by one error in python-mode assertion (Bug#30964) · 05345bab
      Noam Postavsky authored
      * lisp/progmodes/python.el (python-nav-end-of-statement): Don't assert
      that string-start is strictly greater than last-string-end, because
      the string end is a position outside of the string and may therefore
      be the same as the following string's start.
      * test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-2):
      New test.
  3. 05 Jun, 2018 1 commit
    • João Távora's avatar
      Obsolete Flymake's flymake-diagnostic-types-alist · fa794d1b
      João Távora authored
      That varaiable was an association between symbols and properties,
      effecively duplicating symbol's property lists.  It is simpler to just
      put properties on symbols.  Backward compatibility to the old variable
      has been kept.
      * doc/misc/flymake.texi (Flymake error types): Don't mention
      (Flymake error types): Rework section.
      (Backend functions): Refill a paragraph.
      (Flymake utility functions): Don't mention
      (Proc customization variables): Don't mention
      * etc/NEWS: Mention obsoletion of flymake-diagnostic-types-alist.
      * lisp/progmodes/flymake-proc.el
      (flymake-proc--diagnostics-for-pattern): Don't use
      * lisp/progmodes/flymake.el: Rewrite commentary.
      (flymake-make-diagnostic, flymake-mode, flymake-goto-next-error)
      (flymake-goto-prev-error): Don't mention
      flymake-diagnostic-types-alist in docstring.
      (flymake-diagnostic-types-alist): Make obsolete.
      (:error, :warning, :note): Put flymake-category in these symbols.
      (flymake-error, flymake-warning, flymake-note): Put
      `flymake-bitmap', not `bitmap' in these symbols.
      (flymake--lookup-type-property, flymake--highlight-line): Rewrite.
      Honor flymake-diagnostic-types-alist for backward
      * lisp/progmodes/python.el (python-flymake-msg-alist): Don't
      mention flymake-diagnostic-types-alist.
  4. 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
      * test/lisp/progmodes/python-tests.el (python-tests--bug31398):
      Add test.
  5. 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)
      * 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)
      * lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings):
      * lisp/emacs-lisp/warnings.el (display-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-align-tags-to-column, org-agenda-keymap):
      * lisp/org/org.el (org-special-ctrl-a)
      * lisp/progmodes/flymake-proc.el (flymake-err-line-patterns)
      * lisp/progmodes/make-mode.el (makefile-query-one-target-method):
      * lisp/progmodes/octave.el (inferior-octave-startup-hook):
      * lisp/progmodes/python.el (python-buffer)
      * lisp/progmodes/sql.el (sql-dialect):
      * lisp/textmodes/artist.el (artist-text-renderer):
      * lisp/textmodes/bibtex.el (bibtex-autokey-name-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.
  6. 08 Apr, 2018 1 commit
  7. 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
      (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
  8. 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
      (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.
  9. 16 Feb, 2018 1 commit
  10. 13 Feb, 2018 1 commit
  11. 12 Feb, 2018 1 commit
  12. 01 Jan, 2018 2 commits
  13. 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-completion-pdb-string-code, python-use-skeletons):
      Define aliases to user options before the options are defined.
  14. 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-info-beginning-of-backslash): Doc fixes.
  15. 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.
      * 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-info-current-defun): Replace prog-widen with widen;
      these functions are not called during indentation.
      (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.
  16. 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)
      * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table):
      * lisp/gnus/gnus-cloud.el (gnus-cloud-storage-method)
      * 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)
      * 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)
      * lisp/textmodes/less-css-mode.el (less-css):
      * lisp/textmodes/tex-mode.el (tex-chktex-program)
      (tex-chktex-extra-flags): Add missing :version tags.
  17. 03 Dec, 2017 1 commit
  18. 02 Dec, 2017 1 commit
  19. 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:
      * lisp/progmodes/python.el (python-shell-calculate-exec-path): Use the
      "/path/to/venv/Scripts" for `windows-nt' machines.
      Copyright-paperwork-exempt: yes
    • 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-msg-alist): New defcustom.
      (python--flymake-parse-output): New function, able to parse
      python-flymake-command output accordingly to
      (python-flymake): New function implementing the backend
      interface using python--flymake-parse-output for the real
      (python-mode): Add python-flymake to flymake-diagnostic-functions.
  20. 15 Oct, 2017 1 commit
  21. 07 Oct, 2017 1 commit
  22. 03 Oct, 2017 1 commit
  23. 25 Sep, 2017 1 commit
  24. 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.
  25. 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.
  26. 20 Aug, 2017 1 commit
  27. 05 Jul, 2017 1 commit
  28. 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.
  29. 29 May, 2017 1 commit
  30. 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.
  31. 06 Mar, 2017 1 commit
  32. 08 Feb, 2017 1 commit
  33. 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.
  34. 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.
  35. 09 Jan, 2017 1 commit
  36. 01 Jan, 2017 1 commit
  37. 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
  38. 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.
      * 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.