]> git.eshelyaron.com Git - emacs.git/commitdiff
(define-minor-mode): Use eval-after-load
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 8 Jul 2001 22:58:10 +0000 (22:58 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 8 Jul 2001 22:58:10 +0000 (22:58 +0000)
to delay the call to <mode> for global minor modes.
(easy-mmode-define-navigation): Only recenter if interactive.

lisp/ChangeLog
lisp/emacs-lisp/easy-mmode.el

index c2816bd12dd0416b3f66b7fd4ed44f90efcbfdf6..6a67be5a1ac7b5693767b54b1daecf6ebb167cd6 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-08  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * emacs-lisp/easy-mmode.el (define-minor-mode): Use eval-after-load
+       to delay the call to <mode> for global minor modes.
+       (easy-mmode-define-navigation): Only recenter if interactive.
+
 2001-07-06  Gerd Moellmann  <gerd@gnu.org>
 
        * emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Bind TAB
@@ -15,8 +21,8 @@
 
 2001-07-06  Vinicius Jose Latorre  <vinicius@cpqd.com.br>
 
-       * ps-print.el: Use locale dependant date to print date in header.  Doc
-       fix.
+       * ps-print.el: Use locale dependant date to print date in header.
+       Doc fix.
        (ps-print-version): New version number (6.5.3).
        (ps-right-header, ps-right-footer): Initialization and doc fix.
        (ps-time-stamp-locale-default): New fun.
        like `struct X Y', finish with point after Y.
 
 2001-07-04  Simon Josefsson  <jas@extundo.com>
-       
+
        * mail/sendmail.el (sendmail-send-it): Look at `sendmail-program'
-       in caller buffer.  
+       in caller buffer.
 
 2001-07-03  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * find-file.el (ff-find-the-other-file): Use file-name-nondirectory
-       instead of string-match to find the basename of the file.  From
-       Pascal Obry <p.obry@wanadoo.fr>.
+       instead of string-match to find the basename of the file.
+       From Pascal Obry <p.obry@wanadoo.fr>.
 
-       * net/browse-url.el (browse-url-default-windows-browser): Support
-       the MS-DOS port when it runs on Windows.
+       * net/browse-url.el (browse-url-default-windows-browser):
+       Support the MS-DOS port when it runs on Windows.
        (browse-url-browser-function) [ms-dos]: Default to
        browse-url-default-windows-browser.
 
index e1cda3bbf737fb54fd9dca9a0a46b498611a0572..9d99e5fe097026787640f72105791c1dbfdf6a6e 100644 (file)
@@ -215,7 +215,9 @@ With zero or negative ARG turn mode off.
                               (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)))))))
 \f
 ;;;
 ;;; make global minor mode
@@ -412,7 +414,8 @@ ENDFUN should return the end position (with or without moving point)."
                   (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)))