changeset 105765:db5e4a5897ec

* textmodes/tex-mode.el (tex-dvi-view-command) (tex-show-queue-command, tex-open-quote): * progmodes/ruby-mode.el (auto-mode-alist) (interpreter-mode-alist): Purecopy strings. * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Purecopy item names. * emacs-lisp/derived.el (define-derived-mode): Purecopy the doc string for the hook, keymap and abbrev table. * emacs-lisp/byte-run.el (make-obsolete): Purecopy the current name. * x-dnd.el (x-dnd-xdnd-to-action): * startup.el (fancy-startup-text, fancy-about-text): Change to defconst from defvar. * ps-print.el (ps-page-dimensions-database): Purecopy initial value. * mouse.el (mouse-buffer-menu-mode-groups, x-fixed-font-alist): Purecopy initialization strings. * mail/sendmail.el (mail-header-separator) (mail-personal-alias-file): * mail/rmail.el (rmail-default-dont-reply-to-names) (rmail-ignored-headers, rmail-retry-ignored-headers) (rmail-highlighted-headers, rmail-secondary-file-directory) (rmail-secondary-file-regexp): * files.el (null-device, file-name-invalid-regexp) (locate-dominating-stop-dir-regexp) (inhibit-first-line-modes-regexps): Purecopy initialization strings. (interpreter-mode-alist): Use mapcar instead of mapc. * buff-menu.el (Buffer-menu-mode-map): Purecopy name. * bindings.el (mode-line-major-mode-keymap): Purecopy name. (completion-ignored-extensions): (debug-ignored-errors): Purecopy strings.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 26 Oct 2009 06:43:36 +0000
parents a5db863758a8
children bbf5bbea0d69
files lisp/ChangeLog lisp/bindings.el lisp/buff-menu.el lisp/emacs-lisp/byte-run.el lisp/emacs-lisp/derived.el lisp/emacs-lisp/lisp-mode.el lisp/files.el lisp/mail/rmail.el lisp/mail/sendmail.el lisp/mouse.el lisp/progmodes/ruby-mode.el lisp/ps-print.el lisp/startup.el lisp/textmodes/tex-mode.el lisp/x-dnd.el
diffstat 15 files changed, 141 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/ChangeLog	Mon Oct 26 06:43:36 2009 +0000
@@ -1,3 +1,44 @@
+2009-10-26  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* textmodes/tex-mode.el (tex-dvi-view-command)
+	(tex-show-queue-command, tex-open-quote):
+	* progmodes/ruby-mode.el (auto-mode-alist)
+	(interpreter-mode-alist): Purecopy strings.
+
+	* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Purecopy item names.
+
+	* emacs-lisp/derived.el (define-derived-mode): Purecopy the doc
+	string for the hook, keymap and abbrev table.
+
+	* emacs-lisp/byte-run.el (make-obsolete): Purecopy the current name.
+
+	* x-dnd.el (x-dnd-xdnd-to-action):
+	* startup.el (fancy-startup-text, fancy-about-text): Change to
+	defconst from defvar.
+
+	* ps-print.el (ps-page-dimensions-database): Purecopy initial value.
+
+	* mouse.el (mouse-buffer-menu-mode-groups, x-fixed-font-alist):
+	Purecopy initialization strings.
+
+	* mail/sendmail.el (mail-header-separator)
+	(mail-personal-alias-file):
+	* mail/rmail.el (rmail-default-dont-reply-to-names)
+	(rmail-ignored-headers, rmail-retry-ignored-headers)
+	(rmail-highlighted-headers, rmail-secondary-file-directory)
+	(rmail-secondary-file-regexp):
+	* files.el (null-device, file-name-invalid-regexp)
+	(locate-dominating-stop-dir-regexp)
+	(inhibit-first-line-modes-regexps): Purecopy initialization
+	strings.
+	(interpreter-mode-alist): Use mapcar instead of mapc.
+
+	* buff-menu.el (Buffer-menu-mode-map): Purecopy name.
+
+	* bindings.el (mode-line-major-mode-keymap): Purecopy name.
+	(completion-ignored-extensions):
+	(debug-ignored-errors): Purecopy strings.
+
 2009-10-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* pcomplete.el (pcomplete-std-complete): Obey pcomplete-use-paring.
--- a/lisp/bindings.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/bindings.el	Mon Oct 26 06:43:36 2009 +0000
@@ -294,7 +294,7 @@
 (defvar mode-line-major-mode-keymap
   (let ((map (make-sparse-keymap)))
     (define-key map [mode-line down-mouse-1]
-      '(menu-item "Menu Bar" ignore
+      `(menu-item ,(purecopy "Menu Bar") ignore
         :filter (lambda (_) (mouse-menu-major-mode-map))))
     (define-key map [mode-line mouse-2] 'describe-mode)
     (define-key map [mode-line down-mouse-3] mode-line-mode-menu)
@@ -593,11 +593,14 @@
 (setq completion-ignored-extensions
       (append
        (cond ((memq system-type '(ms-dos windows-nt))
+	      (mapcar 'purecopy
 	      '(".o" "~" ".bin" ".bak" ".obj" ".map" ".ico" ".pif" ".lnk"
-		".a" ".ln" ".blg" ".bbl" ".dll" ".drv" ".vxd" ".386"))
+		".a" ".ln" ".blg" ".bbl" ".dll" ".drv" ".vxd" ".386")))
 	     (t
+	      (mapcar 'purecopy
 	      '(".o" "~" ".bin" ".lbin" ".so"
-		".a" ".ln" ".blg" ".bbl")))
+		".a" ".ln" ".blg" ".bbl"))))
+       (mapcar 'purecopy
        '(".elc" ".lof"
 	 ".glo" ".idx" ".lot"
 	 ;; VCS metadata directories
@@ -624,7 +627,7 @@
 	 ".cp" ".fn" ".ky" ".pg" ".tp" ".vr"
 	 ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs"
 	 ;; Python byte-compiled
-	 ".pyc" ".pyo")))
+	 ".pyc" ".pyo"))))
 
 ;; Suffixes used for executables.
 (setq exec-suffixes
@@ -637,24 +640,24 @@
 ;; Packages should add to this list appropriately when they are
 ;; loaded, rather than listing everything here.
 (setq debug-ignored-errors
-      '(beginning-of-line beginning-of-buffer end-of-line
+      `(beginning-of-line beginning-of-buffer end-of-line
 	end-of-buffer end-of-file buffer-read-only
 	file-supersession
-      	"^Previous command was not a yank$"
-	"^Minibuffer window is not active$"
-	"^No previous history search regexp$"
-	"^No later matching history item$"
-	"^No earlier matching history item$"
-	"^End of history; no default available$"
-	"^End of defaults; no next item$"
-	"^Beginning of history; no preceding item$"
-	"^No recursive edit is in progress$"
-	"^Changes to be undone are outside visible portion of buffer$"
-	"^No undo information in this buffer$"
-	"^No further undo information"
-	"^Save not confirmed$"
-	"^Recover-file cancelled\\.$"
-	"^Cannot switch buffers in a dedicated window$"
+      	,(purecopy "^Previous command was not a yank$")
+	,(purecopy "^Minibuffer window is not active$")
+	,(purecopy "^No previous history search regexp$")
+	,(purecopy "^No later matching history item$")
+	,(purecopy "^No earlier matching history item$")
+	,(purecopy "^End of history; no default available$")
+	,(purecopy "^End of defaults; no next item$")
+	,(purecopy "^Beginning of history; no preceding item$")
+	,(purecopy "^No recursive edit is in progress$")
+	,(purecopy "^Changes to be undone are outside visible portion of buffer$")
+	,(purecopy "^No undo information in this buffer$")
+	,(purecopy "^No further undo information")
+	,(purecopy "^Save not confirmed$")
+	,(purecopy "^Recover-file cancelled\\.$")
+	,(purecopy "^Cannot switch buffers in a dedicated window$")
         ))
 
 
--- a/lisp/buff-menu.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/buff-menu.el	Mon Oct 26 06:43:36 2009 +0000
@@ -151,7 +151,7 @@
     (define-key map [follow-link] 'mouse-face)
     (define-key map (kbd "M-s a C-s")   'Buffer-menu-isearch-buffers)
     (define-key map (kbd "M-s a M-C-s") 'Buffer-menu-isearch-buffers-regexp)
-    (define-key map [menu-bar Buffer-menu-mode] (cons "Buffer Menu" menu-map))
+    (define-key map [menu-bar Buffer-menu-mode] (cons (purecopy "Buffer Menu") menu-map))
     (define-key menu-map [quit]
       `(menu-item ,(purecopy "Quit") quit-window
 		 :help ,(purecopy "Mark buffer on this line to be deleted by x command")))
--- a/lisp/emacs-lisp/byte-run.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/emacs-lisp/byte-run.el	Mon Oct 26 06:43:36 2009 +0000
@@ -127,7 +127,8 @@
     (if (eq 'byte-compile-obsolete handler)
 	(setq handler (nth 1 (get obsolete-name 'byte-obsolete-info)))
       (put obsolete-name 'byte-compile 'byte-compile-obsolete))
-    (put obsolete-name 'byte-obsolete-info (list current-name handler (purecopy when))))
+    (put obsolete-name 'byte-obsolete-info
+	 (list (purecopy current-name) handler (purecopy when))))
   obsolete-name)
 (set-advertised-calling-convention
  ;; New code should always provide the `when' argument.
--- a/lisp/emacs-lisp/derived.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/emacs-lisp/derived.el	Mon Oct 26 06:43:36 2009 +0000
@@ -195,16 +195,16 @@
     `(progn
        (unless (get ',hook 'variable-documentation)
 	 (put ',hook 'variable-documentation
-	      ,(format "Hook run when entering %s mode.
+	      (purecopy ,(format "Hook run when entering %s mode.
 No problems result if this variable is not bound.
 `add-hook' automatically binds it.  (This is true for all hook variables.)"
-		       name)))
+		       name))))
        (unless (boundp ',map)
 	 (put ',map 'definition-name ',child))
        (defvar ,map (make-sparse-keymap))
        (unless (get ',map 'variable-documentation)
 	 (put ',map 'variable-documentation
-	      ,(format "Keymap for `%s'." child)))
+	      (purecopy ,(format "Keymap for `%s'." child))))
        ,(if declare-syntax
 	    `(progn
 	       (unless (boundp ',syntax)
@@ -212,7 +212,7 @@
 	       (defvar ,syntax (make-syntax-table))
 	       (unless (get ',syntax 'variable-documentation)
 		 (put ',syntax 'variable-documentation
-		      ,(format "Syntax table for `%s'." child)))))
+		      (purecopy ,(format "Syntax table for `%s'." child))))))
        ,(if declare-abbrev
 	    `(progn
 	       (put ',abbrev 'definition-name ',child)
@@ -220,7 +220,7 @@
 		 (progn (define-abbrev-table ',abbrev nil) ,abbrev))
 	       (unless (get ',abbrev 'variable-documentation)
 		 (put ',abbrev 'variable-documentation
-		      ,(format "Abbrev table for `%s'." child)))))
+		      (purecopy ,(format "Abbrev table for `%s'." child))))))
        (put ',child 'derived-mode-parent ',parent)
        ,(if group `(put ',child 'custom-mode-group ,group))
 
--- a/lisp/emacs-lisp/lisp-mode.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Mon Oct 26 06:43:36 2009 +0000
@@ -283,7 +283,7 @@
     (define-key map "\e\t" 'lisp-complete-symbol)
     (define-key map "\e\C-x" 'eval-defun)
     (define-key map "\e\C-q" 'indent-pp-sexp)
-    (define-key map [menu-bar emacs-lisp] (cons "Emacs-Lisp" menu-map))
+    (define-key map [menu-bar emacs-lisp] (cons (purecopy "Emacs-Lisp") menu-map))
     (define-key menu-map [eldoc]
       `(menu-item ,(purecopy "Auto-Display Documentation Strings") eldoc-mode
 		  :button (:toggle . (bound-and-true-p eldoc-mode))
@@ -294,7 +294,7 @@
     (define-key menu-map [re-builder]
       `(menu-item ,(purecopy "Construct Regexp") re-builder
 		  :help ,(purecopy "Construct a regexp interactively")))
-    (define-key menu-map [tracing] (cons "Tracing" tracing-map))
+    (define-key menu-map [tracing] (cons (purecopy "Tracing") tracing-map))
     (define-key tracing-map [tr-a]
       `(menu-item ,(purecopy "Untrace all") untrace-all
 		  :help ,(purecopy "Untrace all currently traced functions")))
@@ -308,7 +308,7 @@
     (define-key tracing-map [tr-f]
       `(menu-item ,(purecopy "Trace function...") trace-function
 		  :help ,(purecopy "Trace the function given as an argument")))
-    (define-key menu-map [profiling] (cons "Profiling" prof-map))
+    (define-key menu-map [profiling] (cons (purecopy "Profiling") prof-map))
     (define-key prof-map [prof-restall]
       `(menu-item ,(purecopy "Remove Instrumentation for All Functions") elp-restore-all
 		  :help ,(purecopy "Restore the original definitions of all functions being profiled")))
@@ -332,7 +332,7 @@
     (define-key prof-map [prof-func]
       `(menu-item ,(purecopy "Instrument Function...") elp-instrument-function
 		  :help ,(purecopy "Instrument a function for profiling")))
-    (define-key menu-map [lint] (cons "Linting" lint-map))
+    (define-key menu-map [lint] (cons (purecopy "Linting") lint-map))
     (define-key lint-map [lint-di]
       `(menu-item ,(purecopy "Lint Directory...") elint-directory
 		  :help ,(purecopy "Lint a directory")))
@@ -456,7 +456,7 @@
     (set-keymap-parent map lisp-mode-shared-map)
     (define-key map "\e\C-x" 'lisp-eval-defun)
     (define-key map "\C-c\C-z" 'run-lisp)
-    (define-key map [menu-bar lisp] (cons "Lisp" menu-map))
+    (define-key map [menu-bar lisp] (cons (purecopy "Lisp") menu-map))
     (define-key menu-map [run-lisp]
       `(menu-item ,(purecopy "Run inferior Lisp") run-lisp
 		  :help ,(purecopy "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'")))
@@ -520,7 +520,7 @@
     (define-key map "\e\C-q" 'indent-pp-sexp)
     (define-key map "\e\t" 'lisp-complete-symbol)
     (define-key map "\n" 'eval-print-last-sexp)
-    (define-key map [menu-bar lisp-interaction] (cons "Lisp-Interaction" menu-map))
+    (define-key map [menu-bar lisp-interaction] (cons (purecopy "Lisp-Interaction") menu-map))
     (define-key menu-map [eval-defun]
       `(menu-item ,(purecopy "Evaluate Defun") eval-defun
 		  :help ,(purecopy "Evaluate the top-level form containing point, or after point")))
--- a/lisp/files.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/files.el	Mon Oct 26 06:43:36 2009 +0000
@@ -209,7 +209,7 @@
   :type '(choice (const nil) directory))
 
 ;; The system null device. (Should reference NULL_DEVICE from C.)
-(defvar null-device "/dev/null" "The system null device.")
+(defvar null-device (purecopy "/dev/null") "The system null device.")
 
 (declare-function msdos-long-file-names "msdos.c")
 (declare-function w32-long-file-name "w32proc.c")
@@ -222,15 +222,17 @@
 
 (defvar file-name-invalid-regexp
   (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names)))
+	 (purecopy
 	 (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive
 		 "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|"  ; invalid characters
 		 "[\000-\037]\\|"		  ; control characters
 		 "\\(/\\.\\.?[^/]\\)\\|"	  ; leading dots
-		 "\\(/[^/.]+\\.[^/.]*\\.\\)"))	  ; more than a single dot
+		 "\\(/[^/.]+\\.[^/.]*\\.\\)")))	  ; more than a single dot
 	((memq system-type '(ms-dos windows-nt cygwin))
+	 (purecopy
 	 (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive
-		 "[|<>\"?*\000-\037]"))		  ; invalid characters
-	(t "[\000]"))
+		 "[|<>\"?*\000-\037]")))		  ; invalid characters
+	(t (purecopy "[\000]")))
   "Regexp recognizing file names which aren't allowed by the filesystem.")
 
 (defcustom file-precious-flag nil
@@ -766,7 +768,7 @@
 (make-obsolete 'locate-file-completion 'locate-file-completion-table "23.1")
 
 (defvar locate-dominating-stop-dir-regexp
-  "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'"
+  (purecopy "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'")
   "Regexp of directory names which stop the search in `locate-dominating-file'.
 Any directory whose name matches this regexp will be treated like
 a kind of root directory by `locate-dominating-file' which will stop its search
@@ -2359,7 +2361,7 @@
   ;; and pike-mode) are added through autoload directives in that
   ;; file.  That way is discouraged since it spreads out the
   ;; definition of the initial value.
-  (mapc
+  (mapcar
    (lambda (l)
      (cons (purecopy (car l)) (cdr l)))
    '(("perl" . perl-mode)
@@ -2404,7 +2406,7 @@
 
 See also `auto-mode-alist'.")
 
-(defvar inhibit-first-line-modes-regexps '("\\.tar\\'" "\\.tgz\\'")
+(defvar inhibit-first-line-modes-regexps (mapcar 'purecopy '("\\.tar\\'" "\\.tgz\\'"))
   "List of regexps; if one matches a file name, don't look for `-*-'.")
 
 (defvar inhibit-first-line-modes-suffixes nil
--- a/lisp/mail/rmail.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/mail/rmail.el	Mon Oct 26 06:43:36 2009 +0000
@@ -297,7 +297,7 @@
   :group 'rmail-reply)
 
 ;;;###autoload
-(defvar rmail-default-dont-reply-to-names "\\`info-"
+(defvar rmail-default-dont-reply-to-names (purecopy "\\`info-")
   "Regexp specifying part of the default value of `rmail-dont-reply-to-names'.
 This is used when the user does not set `rmail-dont-reply-to-names'
 explicitly.  (The other part of the default value is the user's
@@ -308,6 +308,7 @@
 
 ;;;###autoload
 (defcustom rmail-ignored-headers
+  (purecopy
   (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:"
 	  "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:"
 	  "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:"
@@ -324,7 +325,7 @@
 	  "\\|^mbox-line:\\|^cancel-lock:"
 	  "\\|^DomainKey-Signature:\\|^dkim-signature:"
 	  "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:"
-	  "\\|^x-.*:")
+	  "\\|^x-.*:"))
   "Regexp to match header fields that Rmail should normally hide.
 \(See also `rmail-nonignored-headers', which overrides this regexp.)
 This variable is used for reformatting the message header,
@@ -360,14 +361,14 @@
   :group 'rmail-headers)
 
 ;;;###autoload
-(defcustom rmail-retry-ignored-headers "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:"
+(defcustom rmail-retry-ignored-headers (purecopy "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:")
   "Headers that should be stripped when retrying a failed message."
   :type '(choice regexp (const nil :tag "None"))
   :group 'rmail-headers
   :version "23.2")	   ; added x-detected-operating-system, x-spam
 
 ;;;###autoload
-(defcustom rmail-highlighted-headers "^From:\\|^Subject:"
+(defcustom rmail-highlighted-headers (purecopy "^From:\\|^Subject:")
   "Regexp to match Header fields that Rmail should normally highlight.
 A value of nil means don't highlight.  Uses the face `rmail-highlight'."
   :type 'regexp
@@ -418,12 +419,12 @@
   :group 'rmail-reply)
 
 ;;;###autoload
-(defcustom rmail-secondary-file-directory "~/"
+(defcustom rmail-secondary-file-directory (purecopy "~/")
   "Directory for additional secondary Rmail files."
   :type 'directory
   :group 'rmail-files)
 ;;;###autoload
-(defcustom rmail-secondary-file-regexp "\\.xmail$"
+(defcustom rmail-secondary-file-regexp (purecopy "\\.xmail$")
   "Regexp for which files are secondary Rmail files."
   :type 'regexp
   :group 'rmail-files)
--- a/lisp/mail/sendmail.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/mail/sendmail.el	Mon Oct 26 06:43:36 2009 +0000
@@ -172,7 +172,7 @@
   :group 'sendmail)
 
 ;;;###autoload
-(defcustom mail-header-separator "--text follows this line--"
+(defcustom mail-header-separator (purecopy "--text follows this line--")
   "Line used to separate headers from text in messages being composed."
   :type 'string
   :group 'sendmail)
@@ -212,7 +212,7 @@
   :group 'sendmail)
 
 ;;;###autoload
-(defcustom mail-personal-alias-file "~/.mailrc"
+(defcustom mail-personal-alias-file (purecopy "~/.mailrc")
   "If non-nil, the name of the user's personal mail alias file.
 This file typically should be in same format as the `.mailrc' file used by
 the `Mail' or `mailx' program.
--- a/lisp/mouse.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/mouse.el	Mon Oct 26 06:43:36 2009 +0000
@@ -1850,6 +1850,7 @@
   :version "20.3")
 
 (defvar mouse-buffer-menu-mode-groups
+  (mapcar (lambda (arg) (cons  (purecopy (car arg)) (purecopy (cdr arg))))
   '(("Info\\|Help\\|Apropos\\|Man" . "Help")
     ("\\bVM\\b\\|\\bMH\\b\\|Message\\|Mail\\|Group\\|Score\\|Summary\\|Article"
      . "Mail/News")
@@ -1859,7 +1860,7 @@
     ("Outline" . "Text")
     ("\\(HT\\|SG\\|X\\|XHT\\)ML" . "SGML")
     ("log\\|diff\\|vc\\|cvs\\|Annotate" . "Version Control") ; "Change Management"?
-    ("Lisp" . "Lisp"))
+    ("Lisp" . "Lisp")))
   "How to group various major modes together in \\[mouse-buffer-menu].
 Each element has the form (REGEXP . GROUPNAME).
 If the major mode's name string matches REGEXP, use GROUPNAME instead.")
@@ -2353,10 +2354,14 @@
 		  (cdr elt)))))
 
 (defvar x-fixed-font-alist
-  '("Font Menu"
-    ("Misc"
+  (list
+   (purecopy "Font Menu")
+   (cons
+    (purecopy "Misc")
+    (mapcar
+     (lambda (arg) (cons  (purecopy (car arg)) (purecopy (cdr arg))))
      ;; For these, we specify the pixel height and width.
-     ("fixed" "fixed")
+    '(("fixed" "fixed")
      ("6x10" "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso8859-1" "6x10")
      ("6x12"
       "-misc-fixed-medium-r-semicondensed--12-*-*-*-c-60-iso8859-1" "6x12")
@@ -2393,10 +2398,14 @@
       "-b&h-lucidatypewriter-bold-r-normal-sans-*-240-*-*-*-*-iso8859-1")
      ;; ("lucidatypewriter-bold-r-24" "-b&h-lucidatypewriter-bold-r-normal-sans-24-240-75-75-m-140-iso8859-1")
      ;; ("fixed-medium-20" "-misc-fixed-medium-*-*-*-20-*-*-*-*-*-*-*")
-     )
-    ("Courier"
+     )))
+
+   (cons
+    (purecopy "Courier")
+    (mapcar
+     (lambda (arg) (cons  (purecopy (car arg)) (purecopy (cdr arg))))
      ;; For these, we specify the point height.
-     ("8" "-adobe-courier-medium-r-normal--*-80-*-*-m-*-iso8859-1")
+     '(("8" "-adobe-courier-medium-r-normal--*-80-*-*-m-*-iso8859-1")
      ("10" "-adobe-courier-medium-r-normal--*-100-*-*-m-*-iso8859-1")
      ("12" "-adobe-courier-medium-r-normal--*-120-*-*-m-*-iso8859-1")
      ("14" "-adobe-courier-medium-r-normal--*-140-*-*-m-*-iso8859-1")
@@ -2419,8 +2428,8 @@
      ("12 bold slant" "-adobe-courier-bold-o-normal--*-120-*-*-m-*-iso8859-1")
      ("14 bold slant" "-adobe-courier-bold-o-normal--*-140-*-*-m-*-iso8859-1")
      ("18 bold slant" "-adobe-courier-bold-o-normal--*-180-*-*-m-*-iso8859-1")
-     ("24 bold slant" "-adobe-courier-bold-o-normal--*-240-*-*-m-*-iso8859-1"))
-    )
+     ("24 bold slant" "-adobe-courier-bold-o-normal--*-240-*-*-m-*-iso8859-1")
+    ))))
   "X fonts suitable for use in Emacs.")
 
 (declare-function generate-fontset-menu "fontset" ())
--- a/lisp/progmodes/ruby-mode.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/progmodes/ruby-mode.el	Mon Oct 26 06:43:36 2009 +0000
@@ -1419,11 +1419,11 @@
 ;;; Invoke ruby-mode when appropriate
 
 ;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode))
+(add-to-list 'auto-mode-alist (cons (purecopy "\\.rb\\'") 'ruby-mode))
 
 ;;;###autoload
 (dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8"))
-  (add-to-list 'interpreter-mode-alist (cons name 'ruby-mode)))
+  (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
 
 (provide 'ruby-mode)
 
--- a/lisp/ps-print.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/ps-print.el	Mon Oct 26 06:43:36 2009 +0000
@@ -1832,6 +1832,7 @@
 
 ;;;###autoload
 (defcustom ps-page-dimensions-database
+ (purecopy
   (list (list 'a4    (/ (* 72 21.0) 2.54)  (/ (* 72 29.7) 2.54) "A4")
 	(list 'a3    (/ (* 72 29.7) 2.54)  (/ (* 72 42.0) 2.54) "A3")
 	(list 'letter       (* 72  8.5)    (* 72 11.0)          "Letter")
@@ -1868,7 +1869,7 @@
 	'(topcoatedpaper     396.0     136.0 "TopcoatedPaper150")
 	'(vhsface            205.0     127.0 "VHSFace")
 	'(vhsspine           400.0      50.0 "VHSSpine")
-	'(zipdisk            156.0     136.0 "ZipDisk"))
+	'(zipdisk            156.0     136.0 "ZipDisk")))
   "List associating a symbolic paper type to its width, height and doc media.
 See `ps-paper-type'."
   :type '(repeat (list :tag "Paper Type"
--- a/lisp/startup.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/startup.el	Mon Oct 26 06:43:36 2009 +0000
@@ -1240,7 +1240,7 @@
 ;;; Fancy splash screen
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defvar fancy-startup-text
+(defconst fancy-startup-text
   '((:face (variable-pitch (:foreground "red"))
      "Welcome to "
      :link ("GNU Emacs"
@@ -1296,7 +1296,7 @@
 Each element in the list should be a list of strings or pairs
 `:face FACE', like `fancy-splash-insert' accepts them.")
 
-(defvar fancy-about-text
+(defconst fancy-about-text
   '((:face (variable-pitch (:foreground "red"))
      "This is "
      :link ("GNU Emacs"
--- a/lisp/textmodes/tex-mode.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/textmodes/tex-mode.el	Mon Oct 26 06:43:36 2009 +0000
@@ -199,10 +199,10 @@
 
 ;;;###autoload
 (defcustom tex-dvi-view-command
-  '(cond
-    ((eq window-system 'x) "xdvi")
-    ((eq window-system 'w32) "yap")
-    (t "dvi2tty * | cat -s"))
+  `(cond
+    ((eq window-system 'x) ,(purecopy "xdvi"))
+    ((eq window-system 'w32) ,(purecopy "yap"))
+    (t ,(purecopy "dvi2tty * | cat -s")))
   "*Command used by \\[tex-view] to display a `.dvi' file.
 If it is a string, that specifies the command directly.
 If this string contains an asterisk (`*'), that is replaced by the file name;
@@ -213,7 +213,7 @@
   :group 'tex-view)
 
 ;;;###autoload
-(defcustom tex-show-queue-command "lpq"
+(defcustom tex-show-queue-command (purecopy "lpq")
   "*Command used by \\[tex-show-print-queue] to show the print queue.
 Should show the queue(s) that \\[tex-print] puts jobs on."
   :type 'string
@@ -229,14 +229,14 @@
   :group 'tex)
 
 ;;;###autoload
-(defcustom tex-open-quote "``"
+(defcustom tex-open-quote (purecopy "``")
   "*String inserted by typing \\[tex-insert-quote] to open a quotation."
   :type 'string
   :options '("``" "\"<" "\"`" "<<" "«")
   :group 'tex)
 
 ;;;###autoload
-(defcustom tex-close-quote "''"
+(defcustom tex-close-quote (purecopy "''")
   "*String inserted by typing \\[tex-insert-quote] to close a quotation."
   :type 'string
   :options '("''" "\">" "\"'" ">>" "»")
--- a/lisp/x-dnd.el	Mon Oct 26 04:06:01 2009 +0000
+++ b/lisp/x-dnd.el	Mon Oct 26 06:43:36 2009 +0000
@@ -52,19 +52,19 @@
 
 
 (defcustom x-dnd-types-alist
-  '(
-    ("text/uri-list" . x-dnd-handle-uri-list)
-    ("text/x-moz-url" . x-dnd-handle-moz-url)
-    ("_NETSCAPE_URL" . x-dnd-handle-uri-list)
-    ("FILE_NAME" . x-dnd-handle-file-name)
-    ("UTF8_STRING" . x-dnd-insert-utf8-text)
-    ("text/plain;charset=UTF-8" . x-dnd-insert-utf8-text)
-    ("text/plain;charset=utf-8" . x-dnd-insert-utf8-text)
-    ("text/unicode" . x-dnd-insert-utf16-text)
-    ("text/plain" . dnd-insert-text)
-    ("COMPOUND_TEXT" . x-dnd-insert-ctext)
-    ("STRING" . dnd-insert-text)
-    ("TEXT"   . dnd-insert-text)
+  `(
+    (,(purecopy "text/uri-list") . x-dnd-handle-uri-list)
+    (,(purecopy "text/x-moz-url") . x-dnd-handle-moz-url)
+    (,(purecopy "_NETSCAPE_URL") . x-dnd-handle-uri-list)
+    (,(purecopy "FILE_NAME") . x-dnd-handle-file-name)
+    (,(purecopy "UTF8_STRING") . x-dnd-insert-utf8-text)
+    (,(purecopy "text/plain;charset=UTF-8") . x-dnd-insert-utf8-text)
+    (,(purecopy "text/plain;charset=utf-8") . x-dnd-insert-utf8-text)
+    (,(purecopy "text/unicode") . x-dnd-insert-utf16-text)
+    (,(purecopy "text/plain") . dnd-insert-text)
+    (,(purecopy "COMPOUND_TEXT") . x-dnd-insert-ctext)
+    (,(purecopy "STRING") . dnd-insert-text)
+    (,(purecopy "TEXT")   . dnd-insert-text)
     )
   "Which function to call to handle a drop of that type.
 If the type for the drop is not present, or the function is nil,
@@ -372,7 +372,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;  XDND protocol.
 
-(defvar x-dnd-xdnd-to-action
+(defconst x-dnd-xdnd-to-action
   '(("XdndActionPrivate" . private)
     ("XdndActionCopy" . copy)
     ("XdndActionMove" . move)