From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Problems with the capitalization in Word Abbreviation Mode
Date: Mon, 06 Oct 2008 18:53:34 +0200 [thread overview]
Message-ID: <1223312335.190825@arno.fh-trier.de> (raw)
In-Reply-To: <c7e805f8-bf8e-4d31-abdd-e1f742bb93fd@75g2000hso.googlegroups.com>
Hans-Christian Mick wrote:
>
> That's just what I wanted, thanks a lot!
>
> I've just pasted into my abbrev-defs-file. Although this lisp-stuff
> looks really complicated to me... How long does it take to learn this
> stuff?
>
Mh, you shouldn't paste it in this file. Paste it in the scratch buffer
, eval* it and make emacs save the abbrevs (e.g. by C-x s). Now you
can delete the code.
There is an introduction to elisp for non-programmers in the info files.
(info "(eintr)")
*Place point behind the last paren and type C-x C-e.
> Am I right in thinking that in order to add more of these literal-
> abbrevs to my abbrev-defs file I should have to write something like
> this:
>
> (define-literal-abbrev global-abbrev-table (
> ("DAs" "Das")
> ("DIe" "Die")
> ("WEr" "Wer")
> ))
>
No, but maybe a command is more convenient. Note
the updated function.
(defun define-literal-abbrev (table name expansion &optional count system-flag)
(define-abbrev table (downcase name) 'literal-abbrev
`(lambda ()
(let (case-fold-search
(start (- (point) ,(length name))))
(when (looking-back ,(regexp-quote name) start)
(delete-region start (point))
(insert ,expansion))))
count system-flag))
(defun add-literal-global-abbrev (name expansion)
(interactive "MAbbrev : \nMExpansion : ")
(define-literal-abbrev global-abbrev-table name expansion))
> Although I have to admit that now it sounds like the theme of the
> German Sesame-Street...:)
>
> Thanks again!
-ap
next prev parent reply other threads:[~2008-10-06 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 8:12 Problems with the capitalization in Word Abbreviation Mode Hans-Christian Mick
2008-10-06 13:12 ` Andreas Politz
2008-10-06 14:31 ` Hans-Christian Mick
2008-10-06 16:53 ` Andreas Politz [this message]
2008-10-07 4:06 ` Xah
-- strict thread matches above, loose matches on Subject: below --
2008-10-06 16:06 martin rudalics
[not found] <mailman.381.1223309323.25473.help-gnu-emacs@gnu.org>
2008-10-07 18:35 ` Xah
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=1223312335.190825@arno.fh-trier.de \
--to=politza@fh-trier.de \
--cc=help-gnu-emacs@gnu.org \
/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).