* bug#20564: 24.5; bug in csv-set-comment-start
@ 2015-05-13 5:42 Leo Liu
2015-05-24 10:52 ` Leo Liu
0 siblings, 1 reply; 2+ messages in thread
From: Leo Liu @ 2015-05-13 5:42 UTC (permalink / raw)
To: 20564
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#20564: 24.5; bug in csv-set-comment-start
2015-05-13 5:42 bug#20564: 24.5; bug in csv-set-comment-start Leo Liu
@ 2015-05-24 10:52 ` Leo Liu
0 siblings, 0 replies; 2+ messages in thread
From: Leo Liu @ 2015-05-24 10:52 UTC (permalink / raw)
To: 20564-done
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-24 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13 5:42 bug#20564: 24.5; bug in csv-set-comment-start Leo Liu
2015-05-24 10:52 ` Leo Liu
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.