changeset 87384:20bb7aaa7b12

* calculator.el: * dframe.el: * iswitchb.el: * whitespace.el: * winner.el: * emacs-lisp/checkdoc.el: * mail/feedmail.el: * net/quickurl.el: * obsolete/fast-lock.el: * play/5x5.el: * progmodes/delphi.el: * progmodes/idlw-shell.el: * progmodes/idlwave.el: * textmodes/artist.el: * textmodes/ispell.el: * textmodes/texinfmt.el: * textmodes/texinfo.el: Remove obsolete definitions of backward compatibility macros for defcustom, defgroup, defface, when, unless, with-current-buffer and with-temp-message.
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 25 Dec 2007 19:21:38 +0000
parents e8864ce8543f
children 4f4b8e4f7e4e
files lisp/ChangeLog lisp/calculator.el lisp/dframe.el lisp/emacs-lisp/checkdoc.el lisp/iswitchb.el lisp/mail/feedmail.el lisp/net/quickurl.el lisp/obsolete/fast-lock.el lisp/play/5x5.el lisp/progmodes/delphi.el lisp/progmodes/idlw-shell.el lisp/progmodes/idlwave.el lisp/textmodes/artist.el lisp/textmodes/ispell.el lisp/textmodes/texinfmt.el lisp/textmodes/texinfo.el lisp/whitespace.el lisp/winner.el
diffstat 18 files changed, 23 insertions(+), 217 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/ChangeLog	Tue Dec 25 19:21:38 2007 +0000
@@ -1,3 +1,25 @@
+2007-12-25  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* calculator.el:
+	* dframe.el:
+	* iswitchb.el:
+	* whitespace.el:
+	* winner.el:
+	* emacs-lisp/checkdoc.el:
+	* mail/feedmail.el:
+	* net/quickurl.el:
+	* obsolete/fast-lock.el:
+	* play/5x5.el:
+	* progmodes/delphi.el:
+	* progmodes/idlw-shell.el:
+	* progmodes/idlwave.el:
+	* textmodes/artist.el:
+	* textmodes/ispell.el:
+	* textmodes/texinfmt.el:
+	* textmodes/texinfo.el: Remove obsolete definitions of backward
+	compatibility macros for defcustom, defgroup, defface, when,
+	unless, with-current-buffer and with-temp-message.
+
 2007-12-24  Nick Roberts  <nickrob@snap.net.nz>
 
 	* progmodes/verilog-mode.el: Fit parts to 80 columns.
--- a/lisp/calculator.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/calculator.el	Tue Dec 25 19:21:38 2007 +0000
@@ -48,10 +48,6 @@
 ;; I hate history.
 
 (eval-when-compile (require 'cl))
-(eval-and-compile
-  (if (fboundp 'defgroup) nil
-    (defmacro defgroup (&rest forms) nil)
-    (defmacro defcustom (s v d &rest r) (list 'defvar s v d))))
 
 ;;;=====================================================================
 ;;; Customization:
--- a/lisp/dframe.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/dframe.el	Tue Dec 25 19:21:38 2007 +0000
@@ -114,35 +114,6 @@
 (defvar x-pointer-top-left-arrow)
 
 ;;; Code:
-
-;; From custom web page for compatibility between versions of custom
-;; with help from ptype@dera.gov.uk (Proto Type)
-(eval-and-compile
-  (condition-case ()
-      (require 'custom)
-    (error nil))
-  (if (and (featurep 'custom) (fboundp 'custom-declare-variable)
-	   ;; Some XEmacsen w/ custom don't have :set keyword.
-	   ;; This protects them against custom.
-	   (fboundp 'custom-initialize-set))
-      nil ;; We've got what we needed
-    ;; We have the old custom-library, hack around it!
-    (if (boundp 'defgroup)
-	nil
-      (defmacro defgroup (&rest args)
-	nil))
-    (if (boundp 'defface)
-	nil
-      (defmacro defface (var values doc &rest args)
-        ;; To make colors for your faces you need to set your .Xdefaults
-        ;; or set them up ahead of time in your .emacs file.
-        `(make-face ,var)
-        ))
-    (if (boundp 'defcustom)
-	nil
-      (defmacro defcustom (var value doc &rest args)
-	`(defvar ,var ,value ,doc)))))
-
 
 ;;; Compatibility functions
 ;;
--- a/lisp/emacs-lisp/checkdoc.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/emacs-lisp/checkdoc.el	Tue Dec 25 19:21:38 2007 +0000
@@ -175,21 +175,6 @@
 (defvar checkdoc-version "0.6.1"
   "Release version of checkdoc you are currently running.")
 
-;; From custom web page for compatibility between versions of custom:
-(eval-and-compile
- (condition-case ()
-     (require 'custom)
-   (error nil))
- (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
-     nil ;; We've got what we needed
-     ;; We have the old custom-library, hack around it!
-     (defmacro defgroup (&rest args)
-       nil)
-     (defmacro custom-add-option (&rest args)
-       nil)
-     (defmacro defcustom (var value doc &rest args)
-       `(defvar ,var ,value ,doc))))
-
 (defvar compilation-error-regexp-alist)
 (defvar compilation-mode-font-lock-keywords)
 
--- a/lisp/iswitchb.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/iswitchb.el	Tue Dec 25 19:21:38 2007 +0000
@@ -251,20 +251,6 @@
 
 (require 'font-lock)
 
-;; Set up the custom library.
-;; taken from http://www.dina.kvl.dk/~abraham/custom/
-(eval-and-compile
-  (condition-case ()
-      (require 'custom)
-    (error nil))
-  (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
-      nil ;; We've got what we needed
-    ;; We have the old custom-library, hack around it!
-    (defmacro defgroup (&rest args)
-      nil)
-    (defmacro defcustom (var value doc &rest args)
-      `(defvar ,var ,value ,doc))))
-
 ;;; User Variables
 ;;
 ;; These are some things you might want to change.
--- a/lisp/mail/feedmail.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/mail/feedmail.el	Tue Dec 25 19:21:38 2007 +0000
@@ -286,22 +286,6 @@
 
 (defconst feedmail-patch-level "8")
 
-
-;; from <URL:http://www.dina.kvl.dk/~abraham/custom/>:
-;; If you write software that must work without the new custom, you
-;; can use this hack stolen from w3-cus.el:
-(eval-and-compile
- (condition-case ()
-     (require 'custom)
-   (error nil))
- (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
-     nil ;; We've got what we needed
-     ;; We have the old custom-library, hack around it!
-     (defmacro defgroup (&rest args)
-       nil)
-     (defmacro defcustom (var value doc &rest args)
-       `(defvar ,var ,value ,doc))))
-
 (eval-when-compile (require 'smtpmail))
 (autoload 'mail-do-fcc "sendmail")
 
--- a/lisp/net/quickurl.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/net/quickurl.el	Tue Dec 25 19:21:38 2007 +0000
@@ -90,14 +90,6 @@
 (require 'pp)
 (require 'browse-url)
 
-;; Attempt to handle older/other emacs.
-(eval-and-compile
-  ;; If customize isn't available just use defvar instead.
-  (unless (fboundp 'defgroup)
-    (defmacro defgroup  (&rest rest) nil)
-    (defmacro defcustom (symbol init docstring &rest rest)
-      `(defvar ,symbol ,init ,docstring))))
-
 ;; Customize options.
 
 (defgroup quickurl nil
--- a/lisp/obsolete/fast-lock.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/obsolete/fast-lock.el	Tue Dec 25 19:21:38 2007 +0000
@@ -218,25 +218,7 @@
          (let ((faces ,face))
            (while (unless (memq (car faces) fast-lock-save-faces)
                     (setq faces (cdr faces))))
-           faces))))
- ;;
- ;; We use this for compatibility with a future Emacs.
- (or (fboundp 'with-temp-message)
-     (defmacro with-temp-message (message &rest body)
-       `(let ((temp-message ,message) current-message)
-         (unwind-protect
-              (progn
-                (when temp-message
-                  (setq current-message (current-message))
-                  (message "%s" temp-message))
-                ,@body)
-           (when temp-message
-             (message "%s" current-message))))))
- ;;
- ;; We use this for compatibility with a future Emacs.
- (or (fboundp 'defcustom)
-     (defmacro defcustom (symbol value doc &rest args)
-       `(defvar ,symbol ,value ,doc))))
+           faces)))))
 
 ;;(defun fast-lock-submit-bug-report ()
 ;;  "Submit via mail a bug report on fast-lock.el."
--- a/lisp/play/5x5.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/play/5x5.el	Tue Dec 25 19:21:38 2007 +0000
@@ -53,13 +53,6 @@
 (eval-when-compile
   (require 'cl))
 
-;; If customize isn't available just use defvar instead.
-(eval-and-compile
-  (unless (fboundp 'defgroup)
-    (defmacro defgroup  (&rest rest) nil)
-    (defmacro defcustom (symbol init docstring &rest rest)
-      `(defvar ,symbol ,init ,docstring))))
-
 ;; Customize options.
 
 (defgroup 5x5 nil
--- a/lisp/progmodes/delphi.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/progmodes/delphi.el	Tue Dec 25 19:21:38 2007 +0000
@@ -66,29 +66,6 @@
 
 (provide 'delphi)
 
-(eval-and-compile
-  ;; Allow execution on pre Emacs 20 versions.
-  (or (fboundp 'when)
-      (defmacro when (test &rest body)
-        `(if ,test (progn ,@body))))
-  (or (fboundp 'unless)
-      (defmacro unless (test &rest body)
-        `(if (not ,test) (progn ,@body))))
-  (or (fboundp 'defgroup)
-      (defmacro defgroup (group val docs &rest group-attributes)
-        `(defvar ,group ,val ,docs)))
-  (or (fboundp 'defcustom)
-      (defmacro defcustom (val-name val docs &rest custom-attributes)
-        `(defvar ,val-name ,val ,docs)))
-  (or (fboundp 'cadr)
-      (defmacro cadr (list) `(car (cdr ,list))))
-  (or (fboundp 'cddr)
-      (defmacro cddr (list) `(cdr (cdr ,list))))
-  (or (fboundp 'with-current-buffer)
-      (defmacro with-current-buffer (buf &rest forms)
-        `(save-excursion (set-buffer ,buf) ,@forms)))
-  )
-
 (defgroup delphi nil
   "Major mode for editing Delphi source in Emacs."
   :version "21.1"
--- a/lisp/progmodes/idlw-shell.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/progmodes/idlw-shell.el	Tue Dec 25 19:21:38 2007 +0000
@@ -98,18 +98,6 @@
 (eval-when-compile (require 'cl))
 
 (defvar idlwave-shell-have-new-custom nil)
-(eval-and-compile
-  ;; Kludge to allow `defcustom' for Emacs 19.
-  (condition-case () (require 'custom) (error nil))
-  (if (and (featurep 'custom)
-	   (fboundp 'custom-declare-variable)
-	   (fboundp 'defface))	   
-      ;; We've got what we needed
-      (setq idlwave-shell-have-new-custom t)
-    ;; We have the old or no custom-library, hack around it!
-    (defmacro defgroup (&rest args) nil)
-    (defmacro defcustom (var value doc &rest args) 
-      `(defvar ,var ,value ,doc))))
 
 ;;; Customizations: idlwave-shell group
 
--- a/lisp/progmodes/idlwave.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/progmodes/idlwave.el	Tue Dec 25 19:21:38 2007 +0000
@@ -172,16 +172,6 @@
 	(require 'timer)
       (error nil)))
 
-(eval-and-compile
-  ;; Kludge to allow `defcustom' for Emacs 19.
-  (condition-case () (require 'custom) (error nil))
-  (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
-      nil ;; We've got what we needed
-    ;; We have the old or no custom-library, hack around it!
-    (defmacro defgroup (&rest args) nil)
-    (defmacro defcustom (var value doc &rest args)
-      `(defvar ,var ,value ,doc))))
-
 (declare-function idlwave-shell-get-path-info "idlw-shell")
 (declare-function idlwave-shell-temp-file "idlw-shell")
 (declare-function idlwave-shell-is-running "idlw-shell")
--- a/lisp/textmodes/artist.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/textmodes/artist.el	Tue Dec 25 19:21:38 2007 +0000
@@ -201,20 +201,6 @@
 
 (defvar x-pointer-crosshair)
 
-(eval-and-compile
- (condition-case ()
-     (require 'custom)
-   (error nil))
- (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
-     nil ;; We've got what we needed
-     ;; We have the old custom-library, hack around it!
-     (defmacro defgroup (&rest args)
-       nil)
-     (defmacro defface (var values doc &rest args)
-       `(make-face ,var))
-     (defmacro defcustom (var value doc &rest args)
-       `(defvar ,var ,value ,doc))))
-
 ;; User options
 ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
 
--- a/lisp/textmodes/ispell.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/textmodes/ispell.el	Tue Dec 25 19:21:38 2007 +0000
@@ -203,19 +203,6 @@
 
 (defvar mail-yank-prefix)
 
-;;; Custom.el macros require recompiling this when they are not present.
-;;; Add in backward compatible custom support.
-(eval-when-compile
-  (if (not (fboundp 'defcustom))
-      (defmacro defcustom (symbol value doc &rest args)
-	"Empty replacement for defcustom when not supplied."
-	`(defvar ,symbol ,value ,doc))))
-
-(eval-when-compile
-  (if (not (fboundp 'defgroup))
-      (defmacro defgroup (&rest args)
-	"Empty replacement for defgroup when not supplied.")))
-
 (defgroup ispell nil
   "User variables for Emacs ispell interface."
   :group 'applications)
--- a/lisp/textmodes/texinfmt.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/textmodes/texinfmt.el	Tue Dec 25 19:21:38 2007 +0000
@@ -30,13 +30,6 @@
 
 ;;; Emacs lisp functions to convert Texinfo files to Info files.
 
-(or (fboundp 'defgroup)
-    (defmacro defgroup (&rest ignore) nil))
-
-(or (fboundp 'defcustom)
-    (defmacro defcustom (var value doc &rest ignore)
-      `(defvar ,var ,value ,doc)))
-
 (defvar texinfmt-version "2.42 of  7 Jul 2006")
 
 (defun texinfmt-version (&optional here)
--- a/lisp/textmodes/texinfo.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/textmodes/texinfo.el	Tue Dec 25 19:21:38 2007 +0000
@@ -34,13 +34,6 @@
 
 ;;; Code:
 
-(or (fboundp 'defgroup)
-    (defmacro defgroup (&rest ignore) nil))
-
-(or (fboundp 'defcustom)
-    (defmacro defcustom (var value doc &rest ignore)
-      `(defvar ,var ,value ,doc)))
-
 (eval-when-compile (require 'tex-mode) (require 'cl))
 (defvar outline-heading-alist)
 
--- a/lisp/whitespace.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/whitespace.el	Tue Dec 25 19:21:38 2007 +0000
@@ -131,18 +131,6 @@
   "The variable to store the extent to highlight.")
 (make-variable-buffer-local 'whitespace-highlighted-space)
 
-;; For flavors of Emacs which don't define `defgroup' and `defcustom'.
-(eval-when-compile
-  (if (not (fboundp 'defgroup))
-      (defmacro defgroup (sym memb doc &rest args)
-	"Null macro for `defgroup' in all versions of Emacs that don't define it."
-	t))
-  (if (not (fboundp 'defcustom))
-      (defmacro defcustom (sym val doc &rest args)
-	"Macro to alias `defcustom' to `defvar' in all versions of Emacs that
-don't define it."
-	`(defvar ,sym ,val ,doc))))
-
 (defalias 'whitespace-make-overlay
   (if (featurep 'xemacs) 'make-extent 'make-overlay))
 (defalias 'whitespace-overlay-put
--- a/lisp/winner.el	Mon Dec 24 08:00:52 2007 +0000
+++ b/lisp/winner.el	Tue Dec 25 19:21:38 2007 +0000
@@ -65,17 +65,10 @@
 
 (require 'ring)
 
-(unless (fboundp 'defgroup)
-  (defmacro defgroup (&rest rest)))
-
 (defgroup winner nil
   "Restoring window configurations."
   :group 'windows)
 
-(unless (fboundp 'defcustom)
-  (defmacro defcustom (symbol &optional initvalue docs &rest rest)
-    (list 'defvar symbol initvalue docs)))
-
 ;;;###autoload
 (defcustom winner-mode nil
   "Toggle Winner mode.