From 2f42c75fb05cd3c481dc191436e6f1b28669338a Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sun, 21 Oct 2007 07:33:32 +0000 Subject: [PATCH] * progmodes/gud.el (gud-target-name): Move definition before use. * progmodes/dcl-mode.el: Require imenu at compile time. * progmodes/cc-engine.el (c-maybe-stale-found-type): Pacify byte-compiler. * obsolete/fast-lock.el: Use featurep test instead of string-match. * eshell/esh-mode.el (eshell-handle-ansi-color): Require ansi-color at compile time too. * eshell/em-unix.el (eshell/info): Require info at compile time too. * w32-fns.el: Require w32-vars. * diff-mode.el (diff-refine-hunk): Require smerge-mode at compile time too. --- lisp/ChangeLog | 23 +++++++++++++++++++++++ lisp/diff-mode.el | 2 +- lisp/eshell/em-unix.el | 2 +- lisp/eshell/esh-mode.el | 2 +- lisp/obsolete/fast-lock.el | 2 +- lisp/progmodes/cc-engine.el | 3 +++ lisp/progmodes/dcl-mode.el | 2 +- lisp/progmodes/gud.el | 6 +++--- lisp/w32-fns.el | 1 + 9 files changed, 35 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b4819197172..4573cb38499 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2007-10-21 Dan Nicolaescu + + * progmodes/gud.el (gud-target-name): Move definition before use. + + * progmodes/dcl-mode.el: Require imenu at compile time. + + * progmodes/cc-engine.el (c-maybe-stale-found-type): Pacify + byte-compiler. + + * obsolete/fast-lock.el: Use featurep test instead of + string-match. + + * eshell/esh-mode.el (eshell-handle-ansi-color): Require + ansi-color at compile time too. + + * eshell/em-unix.el (eshell/info): Require info at compile time + too. + + * w32-fns.el: Require w32-vars. + + * diff-mode.el (diff-refine-hunk): Require smerge-mode at compile + time too. + 2007-10-21 Stefan Monnier * double.el ([ignore]): Use ignore. diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 34b116d92c8..9e9eb81797a 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1686,7 +1686,7 @@ For use in `add-log-current-defun-function'." (defun diff-refine-hunk () "Highlight changes of hunk at point at a finer granularity." (interactive) - (require 'smerge-mode) + (eval-and-compile (require 'smerge-mode)) (save-excursion (diff-beginning-of-hunk 'try-harder) (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index aaad664918f..850d51dcac5 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -175,7 +175,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." 'info arg1' => OTHERWISE goes to top info window and then menu item arg1 'info arg1 arg2' => does action for arg1 (either visit-file or menu-item) and then menu item arg2 etc." - (require 'info) + (eval-and-compile (require 'info)) (let ((file (cond ((not (stringp (car args))) nil) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index fd3cfb93996..b8f88981b04 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -1078,7 +1078,7 @@ This function could be in the list `eshell-output-filter-functions'." (defun eshell-handle-ansi-color () "Handle ANSI color codes." - (require 'ansi-color) + (eval-and-compile (require 'ansi-color)) (ansi-color-apply-on-region eshell-last-output-start eshell-last-output-end)) diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 569771143e3..dd33fe0b461 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -768,7 +768,7 @@ See `fast-lock-get-face-properties'." ;; Functions for XEmacs: -(when (save-match-data (string-match "XEmacs" (emacs-version))) +(when (featurep 'xemacs) ;; ;; It would be better to use XEmacs' `map-extents' over extents with a ;; `font-lock' property, but `face' properties are on different extents. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index d1a27d567fd..a019f598918 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -4035,6 +4035,9 @@ comment at the start of cc-engine.el for more info." c-found-types) (sort type-list 'string-lessp))) +;; Shut up the byte compiler. +(defvar c-maybe-stale-found-type) + (defun c-trim-found-types (beg end old-len) ;; An after change function which, in conjunction with the info in ;; c-maybe-stale-found-type (set in c-before-change), removes a type diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 887416f9069..135d90b21f4 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -72,7 +72,7 @@ ;;; Code: (require 'tempo) - +(eval-when-compile (require 'imenu)) ;;; *** Customization ***************************************************** diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d2384232686..8cde32da422 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -106,6 +106,9 @@ Used to grey out relevant toolbar icons.") (defvar gdb-ready nil) +(defvar gud-target-name "--unknown--" + "The apparent name of the program being debugged in a gud buffer.") + ;; Use existing Info buffer, if possible. (defun gud-goto-info () "Go to relevant Emacs info node." @@ -2451,9 +2454,6 @@ comint mode, which see." :group 'gud :type 'boolean) -(defvar gud-target-name "--unknown--" - "The apparent name of the program being debugged in a gud buffer.") - ;; Perform initializations common to all debuggers. ;; The first arg is the specified command line, ;; which starts with the program to debug. diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index f37b4dcb789..3a3695466fa 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -34,6 +34,7 @@ ;; audio bell initialized. ;;; Code: +(require 'w32-vars) (defvar explicit-shell-file-name) -- 2.39.2