From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-devel@gnu.org
Subject: Re: Proper English Title Capitalization
Date: Wed, 3 Jun 2015 17:05:07 +0200 [thread overview]
Message-ID: <2015-06-03T17-00-43@devnull.Karl-Voit.at> (raw)
In-Reply-To: 2015-05-25T12-45-36@devnull.Karl-Voit.at
* Karl Voit <devnull@Karl-Voit.at> wrote:
>
> ,----
>| (defun my-title-capitalization (beg end)
>| (interactive "r")
>| (save-excursion
>| (let (
>| (do-not-capitalize '("a" "ago" "an" "and" "as" "at" "but" "by" "for"
>| "from" "in" "into" "it" "next" "nor" "of" "off"
>| "on" "onto" "or" "over" "past" "so" "the" "till"
>| "to" "up" "yet" ))
>| )
>| ;; go to begin of first word:
>| (goto-char beg)
>| (forward-word)
>| (backward-word)
>| ;; capitalize first word in any case:
>| (capitalize-word 1)
>| (forward-word)
>| (backward-word)
>| (while (< (point) end)
>| ;; capitalize each word in between except it is list member:
>| (if (member (thing-at-point 'word t) do-not-capitalize)
>| (forward-word)
>| (capitalize-word 1) )
>| (forward-word)
>| (backward-word) )
>| ;; capitalize last word in any case:
>| (backward-word)
>| (capitalize-word 1)
>| )
>| ))
> `----
>
With the version above and the version of others as well, I get
errors on my Windows computer running GNU Emacs 24.3.1
(i386-mingw-nt6.1.7601):
| let: Wrong number of arguments: #[(thing) "<some special characters
| which I can't post here since they are obviously binary or
| something>" [thing bounds thing-at-point bounds-of-thing-at-point] 3
| ("c:/Program Files/emacs-24.3/lisp/thingatpt.elc" . 2271)], 2
The weird text does not occur in the region at all.
--
All in all, one of the most disturbing things today is the definitive
fact that the NSA, GCHQ, and many more government organizations are
massively terrorizing the freedom of us and the next generations.
http://Karl-Voit.at
next prev parent reply other threads:[~2015-06-03 15:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-24 11:10 Proper English Title Capitalization Karl Voit
2015-05-24 21:00 ` Emanuel Berg
2015-05-25 10:13 ` Karl Voit
2015-05-25 10:36 ` Rasmus
2015-05-25 10:47 ` Karl Voit
2015-05-25 12:22 ` Karl Voit
2015-05-25 16:18 ` Rasmus
2015-05-26 15:38 ` Barry Fishman
2015-06-11 20:10 ` Karl Voit
2015-06-03 15:05 ` Karl Voit [this message]
2015-05-25 16:59 ` Emanuel Berg
2015-06-17 13:48 ` Karl Voit
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2015-06-03T17-00-43@devnull.Karl-Voit.at \
--to=devnull@karl-voit.at \
--cc=emacs-devel@gnu.org \
--cc=news1142@Karl-Voit.at \
/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.
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.