# HG changeset patch # User Stefan Monnier # Date 994633049 0 # Node ID ce45998cedf245aea94e9a00ebebc2a1a84cf3b9 # Parent 1241890094aea7768f52912abc0f77920efba155 (define-minor-mode): Use eval-after-load to delay the call to for global minor modes. (easy-mmode-define-navigation): Only recenter if interactive. diff -r 1241890094ae -r ce45998cedf2 lisp/emacs-lisp/easy-mmode.el --- a/lisp/emacs-lisp/easy-mmode.el Sun Jul 08 16:46:00 2001 +0000 +++ b/lisp/emacs-lisp/easy-mmode.el Sun Jul 08 22:57:29 2001 +0000 @@ -215,7 +215,9 @@ (symbol-value ',keymap-sym)))) ;; If the mode is global, call the function according to the default. - ,(if globalp `(if ,mode (,mode 1)))))) + ,(if globalp + `(if (and load-file-name ,mode) + (eval-after-load load-file-name '(,mode 1))))))) ;;; ;;; make global minor mode @@ -412,7 +414,8 @@ (goto-char (or ,(if endfun `(,endfun)) (point-max))) (error ,(format "No next %s" name))) (goto-char (match-beginning 0)) - (when (eq (current-buffer) (window-buffer (selected-window))) + (when (and (eq (current-buffer) (window-buffer (selected-window))) + (interactive-p)) (let ((endpt (or (save-excursion ,(if endfun `(,endfun) `(re-search-forward ,re nil t 2)))