[gnu.emacs.bug] Minor comment indentation bug in prolog.el

anund@idt.unit.no (Anund Lie) (09/21/89)

GNU Emacs 18.52, lisp/prolog.el

indent-new-comment-line inserts one space too much, i.e.

%%%  indent-new-comment-line (M-LFD) was called at this point ->
 %%% and the comment continues like this.

(The extra space is removed by reindenting the line with TAB, i.e.
prolog-indent-line.) 

Inserting a test for beginning of line in 'prolog-comment-indent seems
to be sufficient:

*** prolog.el.18.52	Thu Sep 21 17:13:21 1989
--- prolog.el	Thu Sep 21 17:18:41 1989
***************
*** 175,181 ****
  	(t
  	 (save-excursion
  	       (skip-chars-backward " \t")
! 	       (max (1+ (current-column)) ;Insert one space at least
  		    comment-column)))
  	))
  
--- 175,182 ----
  	(t
  	 (save-excursion
  	       (skip-chars-backward " \t")
! 	       ;; Insert one space at least
! 	       (max (+ (current-column) (if (bolp) 0 1))
  		    comment-column)))
  	))
  
! 	       (max (+ (current-column) (if (bolp) 0 1))
  		    comment-column)))
  	))
  


Anund Lie
Division of Computer Systems and Telematics 
Norwegian Inst. of Technology, N-7034 Trondheim, Norway

Email: anund@idt.unit.no       (Internet, preferred)
       anund@loke.idt.unit.no  (if your mailer does not support MX rec.)