From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: "Sean O'Rourke" <seano@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: patch: {append,prepend}-to-register on empty register
Date: Sat, 03 Nov 2007 18:19:47 +0100 [thread overview]
Message-ID: <87ir4j5jrg.fsf@ambire.localdomain> (raw)
In-Reply-To: <m2640kbgm8.fsf@cs.ucsd.edu> (Sean O'Rourke's message of "Fri, 02 Nov 2007 12:18:55 -0700")
() "Sean O'Rourke" <seano@cs.ucla.edu>
() Fri, 02 Nov 2007 12:18:55 -0700
+ (let ((reg (get-register register)))
+ (cond
+ ((not reg) (set-register register (filter-buffer-substring start end)))
+ ((stringp reg)
+ (set-register register
+ (concat reg (filter-buffer-substring start end))))
+ (t
+ (error "Register does not contain text"))))
i would prefer `(set-register register (cond ...))'.
likewise for other hunk.
thi
next prev parent reply other threads:[~2007-11-03 17:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 19:18 patch: {append,prepend}-to-register on empty register Sean O'Rourke
2007-11-03 17:19 ` Thien-Thi Nguyen [this message]
2007-11-05 6:54 ` Miles Bader
2007-11-05 8:30 ` Thien-Thi Nguyen
2007-11-03 20:48 ` Richard Stallman
2007-11-03 21:02 ` Thien-Thi Nguyen
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=87ir4j5jrg.fsf@ambire.localdomain \
--to=ttn@gnuvola.org \
--cc=emacs-devel@gnu.org \
--cc=seano@cs.ucla.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).