diff src/category.c @ 105744:b0a732611398

* keymap.c (Fmake_sparse_keymap): Purecopy the name. * eval.c (Fautoload): Purecopy the filename. Simplify. * category.c (Fdefine_category): Purecopy docstring. * international/mule-cmds.el (set-language-info-alist): Purecopy lang-env. (leim-list-header, leim-list-entry-regexp): Change defvars to defconst. (charset): Purecopy the name. (define-char-code-property): Purecopy string arguments. * emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable): Purecopy string arguments. * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): * ediff-hook.el (menu-bar-ediff-menu): * buff-menu.el (Buffer-menu-mode-map): Purecopy names and tooltips. * bookmark.el (menu-bar-bookmark-map): Add :help and purecopy the name.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 24 Oct 2009 06:32:03 +0000
parents 68dd71358159
children 21bdda3ded62
line wrap: on
line diff
--- a/src/category.c	Sat Oct 24 03:54:58 2009 +0000
+++ b/src/category.c	Sat Oct 24 06:32:03 2009 +0000
@@ -136,6 +136,8 @@
 
   if (!NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
     error ("Category `%c' is already defined", XFASTINT (category));
+  if (!NILP (Vpurify_flag))
+    docstring = Fpurecopy (docstring);
   CATEGORY_DOCSTRING (table, XFASTINT (category)) = docstring;
 
   return Qnil;