unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Patch] Fix python-fill-paragraph when font-lock is disabled
@ 2010-07-29 22:36 Nathan Weizenbaum
  0 siblings, 0 replies; only message in thread
From: Nathan Weizenbaum @ 2010-07-29 22:36 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 296 bytes --]

Hi,

Attached is a patch that makes python-fill-region in a multiline string work
when font-lock is disabled. The old version checked that (nth 3 syntax) was
explicitly t, rather than non-nil; this is the case when font-lock is
enabled, but when it's disabled (nth 3 syntax) is a number instead.

[-- Attachment #1.2: Type: text/html, Size: 327 bytes --]

[-- Attachment #2: 0001-Fix-python-fill-paragraph-when-font-lock-is-disabled.patch --]
[-- Type: text/x-patch, Size: 898 bytes --]

From f187ecce1e2a86b8e712546a84f585ed5ff4d873 Mon Sep 17 00:00:00 2001
From: Nathan Weizenbaum <nex342@gmail.com>
Date: Thu, 29 Jul 2010 11:31:02 -0700
Subject: [PATCH] Fix python-fill-paragraph when font-lock is disabled.

---
 lisp/progmodes/python.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 4e0f326..8d540be 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1960,7 +1960,7 @@ the string's indentation."
 		;; paragraph in a multi-line string properly, so narrow
 		;; to the string and then fill around (the end of) the
 		;; current line.
-		((eq t (nth 3 syntax))	; in fenced string
+		((nth 3 syntax)	; in fenced string
 		 (goto-char (nth 8 syntax)) ; string start
 		 (setq start (line-beginning-position))
 		 (setq end (condition-case () ; for unbalanced quotes
-- 
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-29 22:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 22:36 [Patch] Fix python-fill-paragraph when font-lock is disabled Nathan Weizenbaum

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).