[Python-checkins] CVS: python/dist/src/Misc python-mode.el,4.6,4.6.18.1

Michael Hudson mwh@users.sourceforge.net
Sat, 16 Mar 2002 10:03:45 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv24218

Modified Files:
      Tag: release22-maint
	python-mode.el 
Log Message:
backport bwarsaw's checkin of
    revision 4.7 of python-mode.el

(py-honor-comment-indentation, py-compute-indentation): Fix the
implementation to match the documentation for
py-honor-comment-indentation w.r.t. not nil or t value.  In that case
it should still ignore ## for indentation purposes.  Closes SF bug
#523825, w/ patch provided by Christian Stork (mod'd by Barry).

Python 2.2.1 candidate.


Index: python-mode.el
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/python-mode.el,v
retrieving revision 4.6
retrieving revision 4.6.18.1
diff -C2 -d -r4.6 -r4.6.18.1
*** python-mode.el	6 Jul 2001 20:38:11 -0000	4.6
--- python-mode.el	16 Mar 2002 18:03:42 -0000	4.6.18.1
***************
*** 185,190 ****
  purposes.
  
! When not nil or t, comment lines that begin with a `#' are used as
! indentation hints, unless the comment character is in column zero."
    :type '(choice
  	  (const :tag "Skip all comment lines (fast)" nil)
--- 185,190 ----
  purposes.
  
! When not nil or t, comment lines that begin with a single `#' are used
! as indentation hints, unless the comment character is in column zero."
    :type '(choice
  	  (const :tag "Skip all comment lines (fast)" nil)
***************
*** 1903,1907 ****
  				  (save-excursion
  				    (back-to-indentation)
! 				    (not (zerop (current-column)))))
  			     ))
  	      )))
--- 1903,1911 ----
  				  (save-excursion
  				    (back-to-indentation)
! 				    (and (not (looking-at prefix-re))
! 					 (or (looking-at "[^#]")
! 					     (not (zerop (current-column)))
! 					     ))
! 				    ))
  			     ))
  	      )))