aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/progmodes/python.el (python-mode): Remove incorrect text from docstring.Bozhidar Batsov2013-11-051-3/+1
| | | | | | | * lisp/progmodes/scheme.el (scheme-mode): Remove incorrect text from docstring. * lisp/progmodes/prolog.el (prolog-mode): Remove incorrect text from docstring. * lisp/emacs-lisp/lisp-mode.el (lisp-mode, lisp-interaction-mode, emacs-lisp-mode): Remove incorrect text from docstring.
* * lisp/progmodes/python.el: Fix up last change.Stefan Monnier2013-11-041-41/+69
| | | | | | | | | | | | | | | (python-shell--save-temp-file): New function. (python-shell-send-string): Use it. Remove `msg' arg. Don't assume `string' comes from the current buffer. (python-shell-send-string-no-output): Remove `msg' arg. (python--use-fake-loc): New var. (python-shell-buffer-substring): Obey it. Try to compensate for the extra coding line added by python-shell--save-temp-file. (python-shell-send-region): Use python-shell--save-temp-file and python-shell-send-file directly. Add `nomain' argument. (python-shell-send-buffer): Use python-shell-send-region. (python-electric-pair-string-delimiter): New function. (python-mode): Use it.
* * lisp/progmodes/python.el (python-shell-get-buffer): New function.Stefan Monnier2013-10-291-12/+29
| | | | | | | | | (python-shell-get-process): Use it. (python-shell-send-string): Always use utf-8 and add a cookie to tell Python which encoding was used. Don't split-string since we only care about the first line. Return the temp-file, if applicable. (python-shell-send-region): Tell compile.el how to turn locations in the temp-file into locations in the source buffer.
* * lisp/electric.el (electric-indent-inhibit): New var.Stefan Monnier2013-10-071-1/+5
| | | | | (electric-indent-post-self-insert-function): Use it. * lisp/progmodes/python.el (python-mode): Set it.
* Improve previous interpreter-mode-alist changeGlenn Morris2013-09-101-1/+1
| | | | | | | | | | | | | * lisp/files.el (interpreter-mode-alist): Remove \\` \\' parts. (set-auto-mode): Don't regexp-quote elements. * lisp/progmodes/python.el (interpreter-mode-alist): Remove \\` \\'. * lisp/progmodes/cc-mode.el (interpreter-mode-alist): * lisp/progmodes/ruby-mode.el (interpreter-mode-alist): Revert previous change. * etc/NEWS: Update.
* Tweak previous changeGlenn Morris2013-09-101-1/+1
|
* Treat interpreter-mode-alist as alist of regexps, not literalsGlenn Morris2013-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Cf http://lists.gnu.org/archive/html/emacs-devel/2005-08/msg00472.html * lisp/files.el (interpreter-mode-alist): Convert to regexps. (set-auto-mode): Adapt for this. * lisp/progmodes/cperl-mode.el (cperl-clobber-mode-lists): Comment out unused variable. * lisp/progmodes/cc-mode.el (interpreter-mode-alist): * lisp/progmodes/python.el (interpreter-mode-alist): * lisp/progmodes/ruby-mode.el (interpreter-mode-alist): Convert to regexps. * lisp/progmodes/sh-script.el (sh-set-shell): No longer use interpreter-mode-alist to get list of shells. * etc/NEWS: Mention this. Fixes: debbugs:15306
* Spelling fixes and tidy up a comment.Paul Eggert2013-09-091-1/+1
|
* * lisp/subr.el (pop): Use `car-safe'.Stefan Monnier2013-09-041-15/+8
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove hack to detect unused `pop' return value. * lisp/emacs-lisp/advice.el (defadvice): Add indent rule. * lisp/international/mule-cmds.el: Require CL. (find-coding-systems-for-charsets): Avoid add-to-list. (sanitize-coding-system-list): New function, extracted from select-safe-coding-system-interactively. (select-safe-coding-system-interactively): Use it. (read-input-method-name): Accept symbols for `default'. * lisp/progmodes/python.el (python-nav-beginning-of-block): Remove unused var `block-regexp'. (python-nav--forward-sexp): Remove unused var `re-search-fn'. (python-fill-string): Remove unused var `marker'. (python-skeleton-add-menu-items): Remove unused var `items'.
* Format code sent to Python shell for robustness.Fabián Ezequiel Gallina2013-09-021-14/+51
| | | | | | * progmodes/python.el (python-shell-buffer-substring): New function. (python-shell-send-region, python-shell-send-buffer): Use it.
* * progmodes/python.el (python-nav-if-name-main): New command.Fabián Ezequiel Gallina2013-09-021-6/+29
|
* * progmodes/python.el (python-shell-completion-get-completions):Fabián Ezequiel Gallina2013-09-021-6/+10
| | | | Drop use of deleted `comint-last-prompt-overlay'.
* * lisp/progmodes/python.el (python-font-lock-keywords): Don't return nilStefan Monnier2013-08-261-17/+12
| | | | | | from a matcher-function unless there's no more matches. Fixes: debbugs:15161
* Spelling fixes.Paul Eggert2013-08-151-6/+6
|
* * lisp/progmodes/python.el (python-imenu--build-tree)Fabián Ezequiel Gallina2013-08-131-82/+32
| | | | | | | (python-imenu--put-parent): Simplify and Fix (GH bug 146). * test/automated/python-tests.el (python-imenu-create-index-4) (python-imenu-create-flat-index-2): New tests.
* * lisp/progmodes/python.el (python-imenu--build-tree): Fix corner caseFabián Ezequiel Gallina2013-07-121-2/+7
| | | | | | | in nested defuns. * test/automated/python-tests.el (python-imenu-create-index-2) (python-imenu-create-index-3): New tests.
* * lisp/progmodes/python.el (ffap-alist): Declare.Glenn Morris2013-06-181-0/+2
|
* Merge from emacs-24; up to 2012-12-27T20:09:45Z!juri@jurta.orgGlenn Morris2013-06-011-2/+3
|\
| * * progmodes/python.el: Fix typo in commentary.Fabián Ezequiel Gallina2013-05-261-1/+1
| |
| * * progmodes/python.el (python-indent-block-enders): Add break,Fabián Ezequiel Gallina2013-05-261-1/+2
| | | | | | | | continue and raise keywords.
* | Fix a bunch of custom types (thank you cus-test.el)Glenn Morris2013-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/bookmark.el (bookmark-search-delay): * lisp/cus-start.el (vertical-centering-font-regexp): * lisp/ps-mule.el (ps-mule-font-info-database-default): * lisp/ps-print.el (ps-default-fg, ps-default-bg): * lisp/type-break.el (type-break-good-break-interval): * lisp/whitespace.el (whitespace-indentation-regexp) (whitespace-space-after-tab-regexp): * lisp/emacs-lisp/testcover.el (testcover-1value-functions) (testcover-noreturn-functions, testcover-progn-functions) (testcover-prog1-functions): * lisp/emulation/viper-init.el (viper-emacs-state-cursor-color): * lisp/erc/erc-desktop-notifications.el (erc-notifications-icon): * lisp/eshell/em-glob.el (eshell-glob-translate-alist): * lisp/gnus/gnus-art.el (gnus-article-date-headers, gnus-blocked-images): * lisp/gnus/gnus-async.el (gnus-async-post-fetch-function): * lisp/gnus/gnus-gravatar.el (gnus-gravatar-size, gnus-gravatar-properties): * lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl): * lisp/gnus/gnus-notifications.el (gnus-notifications-timeout): * lisp/gnus/gnus-picon.el (gnus-picon-properties): * lisp/gnus/gnus-util.el (gnus-completion-styles): * lisp/gnus/gnus.el (gnus-other-frame-resume-function): * lisp/gnus/message.el (message-user-organization-file) (message-cite-reply-position): * lisp/gnus/nnir.el (nnir-summary-line-format) (nnir-retrieve-headers-override-function): * lisp/gnus/shr-color.el (shr-color-visible-luminance-min): * lisp/gnus/shr.el (shr-blocked-images): * lisp/gnus/spam-report.el (spam-report-resend-to): * lisp/gnus/spam.el (spam-summary-exit-behavior): * lisp/mh-e/mh-e.el (mh-sortm-args, mh-default-folder-for-message-function): * lisp/play/tetris.el (tetris-tty-colors): * lisp/progmodes/cpp.el (cpp-face-default-list): * lisp/progmodes/flymake.el (flymake-allowed-file-name-masks): * lisp/progmodes/idlw-help.el (idlwave-help-browser-generic-program) (idlwave-help-browser-generic-args): * lisp/progmodes/make-mode.el (makefile-special-targets-list): * lisp/progmodes/python.el (python-shell-virtualenv-path): * lisp/progmodes/verilog-mode.el (verilog-active-low-regexp) (verilog-auto-input-ignore-regexp, verilog-auto-inout-ignore-regexp) (verilog-auto-output-ignore-regexp, verilog-auto-tieoff-ignore-regexp) (verilog-auto-unused-ignore-regexp, verilog-typedef-regexp): * lisp/textmodes/reftex-vars.el (reftex-format-label-function): * lisp/textmodes/remember.el (remember-diary-file): Fix custom types. * lisp/cedet/semantic/db-find.el (semanticdb-find-throttle-custom-list): Fix value. * lisp/gnus/gnus-salt.el (gnus-selected-tree-face): Fix default.
* | Small fixes to 2013-04-19T02:31:09Z!fgallina@gnu.orgFabián Ezequiel Gallina2013-04-191-4/+5
| | | | | | | | | | | | | | | | * lisp/ChangeLog: Fix Changelog Entry. * progmodes/python.el (python-imenu-create-flat-index): Remove leftover `message' call and give credit to old imenu--flatten-index-alist.
* | New faster Imenu implementation.Fabián Ezequiel Gallina2013-04-181-21/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el: (python-imenu-prev-index-position): (python-imenu-format-item-label-function) (python-imenu-format-parent-item-label-function) (python-imenu-format-parent-item-jump-label-function): New vars. (python-imenu-format-item-label) (python-imenu-format-parent-item-label) (python-imenu-format-parent-item-jump-label) (python-imenu--put-parent, python-imenu--build-tree) (python-imenu-create-index, python-imenu-create-flat-index) (python-util-popn): New functions. (python-mode): Set imenu-create-index-function to python-imenu-create-index. * test/automated/python-tests.el (python-imenu-prev-index-position-1): Removed test. (python-imenu-create-index-1, python-imenu-create-flat-index-1): New tests. Fixes: debbugs:14058
* | * lisp/progmodes/python.el (python-nav--syntactically): Fix cornercasesFabián Ezequiel Gallina2013-04-171-22/+26
| | | | | | | | | | | | | | | | and do not care about match data. * test/automated/python-tests.el (python-nav-backward-defun-2) (python-nav-backward-defun-3, python-nav-forward-defun-2) (python-nav-forward-defun-3): New tests.
* | New defun movement commands.Fabián Ezequiel Gallina2013-04-171-0/+60
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-nav--syntactically) (python-nav--forward-defun, python-nav-backward-defun) (python-nav-forward-defun): New functions. * test/automated/python-tests.el (python-nav-backward-defun-1) (python-nav-forward-defun-1): New tests.
* | * progmodes/python.el (python-syntax--context-compiler-macro): New defun.Fabián Ezequiel Gallina2013-04-161-12/+14
| | | | | | | | | | (python-syntax-context): Use named compiler-macro for backwards compatibility with Emacs 24.x.
* | * lisp/progmodes/python.el (python-mode-skeleton-abbrev-table): Rename fromStefan Monnier2013-04-161-5/+9
| | | | | | | | | | | | | | | | | | | | python-mode-abbrev-table. (python-skeleton-define): Adjust accordingly. (python-mode-abbrev-table): New table that inherits from it so that python-skeleton-autoinsert does not affect non-skeleton abbrevs. * lisp/abbrev.el (abbrev--symbol): New function, extracted from abbrev-symbol. (abbrev-symbol): Use it. (abbrev--before-point): Use it since we already handle inheritance.
* | Merge from emacs-24; up to 2012-12-26T16:22:18Z!michael.albinus@gmx.deGlenn Morris2013-03-301-3/+13
|\ \ | |/
| * Un-indent after "pass" and "return" statementsFabián Ezequiel Gallina2013-03-251-3/+13
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-indent-block-enders): New var. (python-indent-calculate-indentation): Use it. * test/automated/python-tests.el (python-indent-block-enders): New test. (python-info-current-defun-2): Fix test. Fixes: debbugs:13888
* | Merge from emacs-24; up to 2012-12-21T07:35:02Z!ueno@gnu.orgGlenn Morris2013-02-211-32/+33
|\ \ | |/
| * * progmodes/python.el (python-info-current-defun): EnhanceFabián Ezequiel Gallina2013-02-201-35/+33
| | | | | | | | match-data cluttering prevention.
| * * progmodes/python.el (python-info-current-defun): Fix failedFabián Ezequiel Gallina2013-02-191-1/+4
| | | | | | | | defun name retrieval because of unwanted match-data cluttering.
* | Merge from emacs-24; up to 2012-12-20T16:09:05Z!dmantipov@yandex.ruGlenn Morris2013-02-181-13/+12
|\ \ | |/
| * * progmodes/python.el (python-indent-context): FixFabián Ezequiel Gallina2013-02-191-13/+12
| | | | | | | | | | | | | | | | | | | | | | python-info-line-ends-backslash-p call. (python-info-line-ends-backslash-p) (python-info-beginning-of-backslash): Respect line-number argument. (python-info-current-line-comment-p): Fix behavior when not at beginning-of-line. (python-util-position): Remove function. (python-util-goto-line): New function.
* | Merge from emacs-24; up to 2012-12-19T13:01:16Z!michael.albinus@gmx.dePaul Eggert2013-02-141-53/+76
|\ \ | |/
| * * progmodes/python.el: Explain how to restore "cc-mode"-likeFabián Ezequiel Gallina2013-02-131-20/+22
| | | | | | | | | | | | | | | | forward-sexp movement in header documentation. (python-nav--forward-sexp): Behave like emacs-lisp-mode in comments and strings (GH bug 114). Fixes: debbugs:13642
| * * progmodes/python.el (python-info-current-defun): Fix currentFabián Ezequiel Gallina2013-02-131-33/+54
| | | | | | | | | | | | defun detection. Fixes: debbugs:13618
* | Spelling fixes.Paul Eggert2013-02-011-1/+1
| |
* | Merge from emacs-24; up to 2012-12-13T00:52:17Z!yamaoka@jpl.orgGlenn Morris2013-01-301-9/+11
|\ \ | |/
| * * progmodes/python.elFabián Ezequiel Gallina2013-01-301-9/+11
| | | | | | | | | | (python-pdbtrack-comint-output-filter-function): Enhancements on stacktrace detection. (thanks @gnovak)
* | Merge from emacs-24; up to 2012-12-12T22:29:54Z!yamaoka@jpl.orgGlenn Morris2013-01-301-1/+5
|\ \ | |/
| * * progmodes/python.el (python-shell-parse-command): FindFabián Ezequiel Gallina2013-01-281-1/+5
| | | | | | | | python-shell-interpreter with modified environment.
* | Merge from emacs-24; up to 2012-12-11T18:52:31Z!monnier@iro.umontreal.caGlenn Morris2013-01-241-1/+4
|\ \ | |/
| * * lisp/progmodes/python.el: Enhancements to header documentation aboutFabián Ezequiel Gallina2013-01-231-1/+4
| | | | | | | | | | | | skeletons. Fixes: debbugs:5716
* | Merge from emacs-24; up to 2012-12-10T20:27:33Z!eggert@cs.ucla.eduGlenn Morris2013-01-131-2/+11
|\ \ | |/
| * * progmodes/python.el (python-nav-end-of-statement): FixFabián Ezequiel Gallina2013-01-101-2/+11
| | | | | | | | cornercase when handling multiline strings.
* | Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.caPaul Eggert2013-01-021-11/+22
|\ \ | |/
| * Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
| |
| * * progmodes/python.el (python-nav-end-of-statement): Rewrite inFabián Ezequiel Gallina2012-12-311-9/+20
| | | | | | | | | | | | | | order to improve efficiency (Based on Daniel Colascione's <dancol@dancol.org> patch). Fixes: debbugs:13182
| * * progmodes/python.el: Bump defgroup :version to 24.3.Fabián Ezequiel Gallina2012-12-311-1/+1
| |