help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use of purecopy()


From: Nordlöw
Subject: Use of purecopy()
Date: Tue, 3 Nov 2009 02:00:56 -0800 (PST)
User-agent: G2/1.0

I have seen a lot adding of purecopy() to Emacs CVS.
Why? Does it reduce memory use and performance?
Should it be used everywhere we have static string initializations in
emacs-lisp code?

I discovered it in Emacs CVS python.el and I have seen that emacs/lisp/
ChangeLog contains lots of such changes.
Here are two sample lines taken from python.el
  (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'")  'python-
mode))
  (add-to-list 'same-window-buffer-names (purecopy "*Python*"))
Is this some special case where purecopy() is especially motivated?

Thanks in advance,
Nordlöw


reply via email to

[Prev in Thread] Current Thread [Next in Thread]