Subject: bug#20564: closed (Re: bug#20564: 24.5; bug in csv-set-comment-start)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 24 May 2015 10:54:03 +0000

Your bug report

#20564: 24.5; bug in csv-set-comment-start

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20564: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20564
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20564: 24.5; bug in csv-set-comment-start
From: Leo Liu <[email-masked]>
To: [email-masked]
Date: Sun, 24 May 2015 18:52:39 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

csv-mode: 1.4

On 2015-05-13 13:42 +0800, Leo Liu wrote:
> The ELSE branch of the IF form doesn't make any sense and generates an
> error on NIL, i.e. (csv-set-comment-start nil)

Subject: 24.5; bug in csv-set-comment-start
From: Leo Liu <[email-masked]>
To: [email-masked]
Date: Wed, 13 May 2015 13:42:33 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Using csv-mode version: 1.3.

    (defun csv-set-comment-start (string)
      "Set comment start for this CSV mode buffer to STRING.
    It must be either a string or nil."
      (interactive
       (list (edit-and-eval-command
              "Comment start (string or nil): " csv-comment-start)))
      ;; Paragraph means a group of contiguous records:
      (setq csv-comment-start string)
      (set (make-local-variable 'paragraph-separate) "[:space:]*$") ; White space.
      (set (make-local-variable 'paragraph-start) "\n");Must include \n explicitly!
      (if string
          (progn
            (setq paragraph-separate (concat paragraph-separate "\\|" string)
                  paragraph-start (concat paragraph-start "\\|" string))
            (set (make-local-variable 'comment-start) string)
            (modify-syntax-entry
             (string-to-char string) "<" csv-mode-syntax-table)
            (modify-syntax-entry ?\n ">" csv-mode-syntax-table))
        (with-syntax-table text-mode-syntax-table
          (modify-syntax-entry (string-to-char string)
                               (string (char-syntax (string-to-char string)))
                               csv-mode-syntax-table)
          (modify-syntax-entry ?\n
                               (string (char-syntax ?\n))
                               csv-mode-syntax-table))))

The ELSE branch of the IF form doesn't make any sense and generates an
error on NIL, i.e. (csv-set-comment-start nil)

Another question is why set a comment syntax. I checked RFC 4180 and
nothing is said on comment syntax.

Leo