unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
Cc: emacs-devel@gnu.org
Subject: Re: abstracting Lisp strings - macro name convention?
Date: Tue, 02 Jul 2002 22:09:00 -0400	[thread overview]
Message-ID: <tx1u1nhwojn.fsf@raeburn.org> (raw)
In-Reply-To: <200207020737.g627bR501067@aztec.santafe.edu> (Richard Stallman's message of "Tue, 2 Jul 2002 01:37:27 -0600 (MDT)")

Richard Stallman <rms@gnu.org> writes:
> SMBP is too terse.  That won't be used so often
> that we cannot afford a longer and more meaningful name.

Okay, I'll use longer names.  Probably something like this set:

  STRING_DATA(obj)      /* produces a char* */
  STRING_REF(obj,index)
  STRING_SET(obj,index,newbyteval)
  STRING_INTERVALS(obj)
  STRING_SET_INTERVALS(obj,interval)
  STRING_NBYTES(obj)    /* STRING_BYTES exists, takes Lisp_String ptr */
  STRING_NCHARS(obj)
  STRING_MULTIBYTE(obj) /* already present */
  STRING_SET_UNIBYTE(obj) /* all uses of SET_STRING_BYTES are of the
                             form SET_STRING_BYTES(XSTRING(x),-1) */

And I'll remove or rename the macros operating on Lisp_String struct
pointers or with the terse names.

  STRING_SET_BYTES(ptr,-1) -> STRING_SET_UNIBYTE(obj)
  STRING_BYTES(ptr)        -> STRING_NBYTES(obj)
  XSTRING(obj)->foo        -> STRING_foo(obj),STRING_SET_foo(obj,...)
  SREF  -> STRING_REF
  SDATA -> STRING_DATA
  etc


With a pervasive change like this, do you really want separate
checkins for each file and detailed function-level change log and CVS
log entries for everything affected?  It's tedious, but doable; I'm
just unclear on how important you feel that level of detail is for
pervasive changes of such a simple nature.  Occasionally other changes
have been checked in with log entries like "all callers changed"; most
(but not all) of them are for static functions, so it's still
describing changes confined to the one file.

Ken

  reply	other threads:[~2002-07-03  2:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-30 23:13 abstracting Lisp strings - macro name convention? Ken Raeburn
2002-07-02  7:37 ` Richard Stallman
2002-07-03  2:09   ` Ken Raeburn [this message]
2002-07-03 13:13     ` Stefan Monnier
2002-07-03 14:06     ` Kim F. Storm
2002-07-03 13:16       ` Miles Bader
2002-07-03 13:17       ` Henrik Enberg
2002-07-04  7:07     ` Richard Stallman

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=tx1u1nhwojn.fsf@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=emacs-devel@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.
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).