1328Re: [jasspa] questions: syntax highlighting; confirmations
- Mar 20 4:46 AMs wrote:
> Hello, colleaguesFollowing are some attachments that do it.
> would be grateful if someone could help me finding the answers to the
> following questios:
> 1. how can i create a new syntax highlighting scheme? and how can i
> then apply one to the file?
> the problem is that i want to create a certain highlitighting for the
> .TXT files in order to highlight certain types of these files. i
> surely do not want to apply this scheme to ALL .TXT files, but only to
> a few of them -- how can this be done?
Add the hkextxt.emf file to your local user directory.
Add the following line to your <user>.emf
-1 add-file-hook "-[*!]-[ \t]*extxt.*-[*!]-" fhook-extxt ; -!- extxt -!-
Create your .txt file with the magic string "-!- extxt -!- on the top
line and then you should be running.
Hack the hkextxt file to do what you want.
>Add to your <user>.emf:
> 2. is it possible to check somethere in the options that ME should not
> ask me every time about saving changes to open files and about leaving
> if a modified bufer exists? i rarely leave editor, but if i do close
> it, then i do want to leave it :).
global-bind-key quick-exit "esc z"
global-bind-key quick-exit "C-x C-c"
Note that this saves the changes and exits without prompting.
Dangerous to my mind, but that is your choice.
I do not think that there is a standard exit command that discards the
changes - would need to make a macro to do this. Here is an example
where somebody wanted to be ALWAYS prompted before exiting - which
is the exact opposite of what you want but kind of shows you
how to replace the exit command with something that you
want to write.
!if &iseq @mc1 "Exit Emacs - Are you sure [y/n] ? " "yYnN" "y"
global-bind-key my-exit-emacs "esc z"
global-bind-key my-exit-emacs "C-x C-c"
> thanks :).
- << Previous post in topic