GNU bug report logs -
#20564
24.5; bug in csv-set-comment-start
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Wed, 13 May 2015 05:43:02 UTC
Severity: normal
Found in version 24.5
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 10 years and 61 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.