From d31e8e871c1942771b8b1296338cde5434882e84 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Tue, 25 Dec 2007 19:21:38 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 22 ++++++++++++++++++++++ lisp/calculator.el | 4 ---- lisp/dframe.el | 29 ----------------------------- lisp/emacs-lisp/checkdoc.el | 15 --------------- lisp/iswitchb.el | 14 -------------- lisp/mail/feedmail.el | 16 ---------------- lisp/net/quickurl.el | 8 -------- lisp/obsolete/fast-lock.el | 20 +------------------- lisp/play/5x5.el | 7 ------- lisp/progmodes/delphi.el | 23 ----------------------- lisp/progmodes/idlw-shell.el | 12 ------------ lisp/progmodes/idlwave.el | 10 ---------- lisp/textmodes/artist.el | 14 -------------- lisp/textmodes/ispell.el | 13 ------------- lisp/textmodes/texinfmt.el | 7 ------- lisp/textmodes/texinfo.el | 7 ------- lisp/whitespace.el | 12 ------------ lisp/winner.el | 7 ------- 18 files changed, 23 insertions(+), 217 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 788df528289..cca6ee0b296 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,25 @@ +2007-12-25 Dan Nicolaescu + + * 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 * progmodes/verilog-mode.el: Fit parts to 80 columns. diff --git a/lisp/calculator.el b/lisp/calculator.el index aca37dd7cda..14b6b1dfa71 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -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: diff --git a/lisp/dframe.el b/lisp/dframe.el index 53a07ff3811..43cf6212d2a 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -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 ;; diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 742e13412bb..ad52466377e 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -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) diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 233997285c9..792e610fa4a 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -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. diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index ab8611424db..9b52b1dcbbd 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -286,22 +286,6 @@ (defconst feedmail-patch-level "8") - -;; from : -;; 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") diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index e8449f57313..27765ed0742 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -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 diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index f34427c3140..cee4b094069 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -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." diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index bea52cbe3a5..c3d3f62e187 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -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 diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 7c2417fde1a..0cefa73b592 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -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" diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 1f184ea157d..732310d761e 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -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 diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 49e88597665..590f9d6c356 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -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") diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 63a9e8f615a..09127483fb0 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -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 diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 7fb6aed139a..82d11c47e8e 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -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) diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 812fcca06d6..a96086cb968 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -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) diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 004e57bc21a..df8af8bac40 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -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) diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 896668fd569..e36a0f84818 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -131,18 +131,6 @@ visited by the buffers.") "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 diff --git a/lisp/winner.el b/lisp/winner.el index ed840d37622..1eb39a13399 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -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. -- 2.39.2