all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Lorenzon <devel@pollock-nageoire.net>
To: help-gnu-emacs@gnu.org, monnier@iro.umontreal.ca
Subject: comment-padding type ?
Date: Wed, 26 Aug 2009 09:05:46 +0200 (CEST)	[thread overview]
Message-ID: <20090826.090546.193696420.devel@pollock-nageoire.net> (raw)
In-Reply-To: <87ljldmenu.fsf@opera.com>


Hi All,

comment-padding documentation is as follows :

Padding string that `comment-region' puts between comment chars and text.
Can also be an integer which will be automatically turned into a string
of the corresponding number of spaces.

But in function comment-padright we find this piece of code :

    (let ((s (match-string 1 str))	;actual string
	  (lpad (substring str 0 (match-beginning 1))) ;left padding
	  (rpad (concat (substring str (match-end 1)) ;original right padding
			(substring comment-padding ;additional right padding
				   (min (- (match-end 0) (match-end 1))
					(length comment-padding)))))

where comment-padding is actually supposed to be a sequence and
not an integer. Actually in one mode comment-padding was set to
1 and I got an error when trying to execute
comment-padright. When setting the value to " " everything goes
well ! 

In my opinion the comment-padding documentation is
abusive. Either it should be changed or a conversion mechanism
should be added.

Regards 

Pierre






  parent reply	other threads:[~2009-08-26  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 14:20 partial completion and switch-to-buffer Tobias Gerdin
2009-08-22 15:10 ` Drew Adams
2009-08-24 15:31   ` Tobias Gerdin
2009-08-26  7:05 ` Pierre Lorenzon [this message]
2009-08-26 15:06   ` comment-padding type ? Stefan Monnier
2009-08-26 15:19     ` Pierre Lorenzon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090826.090546.193696420.devel@pollock-nageoire.net \
    --to=devel@pollock-nageoire.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.