From: "Davin Pearson" <davin.pearson@gmail.com>
Subject: How to get syntax information in batch mode?
Date: 18 May 2006 22:58:13 -0700 [thread overview]
Message-ID: <1148018293.918822.151520@38g2000cwa.googlegroups.com> (raw)
I have written an automatic code indentation function in ELisp and I
want to be able to invoke this function from Emacs' batch mode so that
it can be invoked from a Makefile, without needing to start Emacs
interactively.
However the function get-char-property always seems to return nil when
noninteractive is set to t. Am I correct about this deduction?
I use get-char-property to tell the automatic indentation function
whether or not we are currently inside a string or a comment. Is
there a different function for telling whether or not we are currently
inside a string or a comment?
If there is no such function, then could Emacs be modified so that
text properties are online in batch mode?
Here is an example of a function that always prints nil when invoked
noninteractively.
(defun test ()
(find-file "~/a.java")
(font-lock-mode)
(goto-char (point-min))
(while (< (point) (point-max))
(message "%s\n" (get-char-property (point) 'face))
(forward-char 1)))
next reply other threads:[~2006-05-19 5:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-19 5:58 Davin Pearson [this message]
2006-05-19 11:19 ` How to get syntax information in batch mode? andlind
-- strict thread matches above, loose matches on Subject: below --
2006-05-20 13:25 martin rudalics
2006-05-21 6:55 ` Davin Pearson
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1148018293.918822.151520@38g2000cwa.googlegroups.com \
--to=davin.pearson@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).