]> code.delx.au - gnu-emacs/blobdiff - lisp/startup.el
Merge changes from emacs-24 branch
[gnu-emacs] / lisp / startup.el
index 5c905954c862bfaaad98a6fd2fbae68df55f558e..d6e730236996eacb649384ea9785c1cb1ea8a10b 100644 (file)
@@ -490,13 +490,20 @@ It is the default value of the variable `top-level'."
     ;; of that dir into load-path,
     ;; Look for a leim-list.el file too.  Loading it will register
     ;; available input methods.
-    (let ((tail load-path) dir)
+    (let ((tail load-path)
+          (lispdir (expand-file-name "../lisp" data-directory))
+         ;; For out-of-tree builds, leim-list is generated in the build dir.
+;;;          (leimdir (expand-file-name "../leim" doc-directory))
+          dir)
       (while tail
         (setq dir (car tail))
         (let ((default-directory dir))
           (load (expand-file-name "subdirs.el") t t t))
-        (let ((default-directory dir))
-          (load (expand-file-name "leim-list.el") t t t))
+       ;; Do not scan standard directories that won't contain a leim-list.el.
+       ;; http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00502.html
+       (or (string-match (concat "\\`" lispdir) dir)
+           (let ((default-directory dir))
+             (load (expand-file-name "leim-list.el") t t t)))
         ;; We don't use a dolist loop and we put this "setq-cdr" command at
         ;; the end, because the subdirs.el files may add elements to the end
         ;; of load-path and we want to take it into account.
@@ -1162,38 +1169,6 @@ the `--debug-init' option to view a complete error backtrace."
                                            (or mail-host-address
                                                (system-name))))))
 
-    ;; Originally face attributes were specified via
-    ;; `font-lock-face-attributes'.  Users then changed the default
-    ;; face attributes by setting that variable.  However, we try and
-    ;; be back-compatible and respect its value if set except for
-    ;; faces where M-x customize has been used to save changes for the
-    ;; face.
-    (when (boundp 'font-lock-face-attributes)
-      (let ((face-attributes font-lock-face-attributes))
-       (while face-attributes
-         (let* ((face-attribute (pop face-attributes))
-                (face (car face-attribute)))
-           ;; Rustle up a `defface' SPEC from a
-           ;; `font-lock-face-attributes' entry.
-           (unless (get face 'saved-face)
-             (let ((foreground (nth 1 face-attribute))
-                   (background (nth 2 face-attribute))
-                   (bold-p (nth 3 face-attribute))
-                   (italic-p (nth 4 face-attribute))
-                   (underline-p (nth 5 face-attribute))
-                   face-spec)
-               (when foreground
-                 (setq face-spec (cons ':foreground (cons foreground face-spec))))
-               (when background
-                 (setq face-spec (cons ':background (cons background face-spec))))
-               (when bold-p
-                 (setq face-spec (append '(:weight bold) face-spec)))
-               (when italic-p
-                 (setq face-spec (append '(:slant italic) face-spec)))
-               (when underline-p
-                 (setq face-spec (append '(:underline t) face-spec)))
-               (face-spec-set face (list (list t face-spec)) nil)))))))
-
     ;; If parameter have been changed in the init file which influence
     ;; face realization, clear the face cache so that new faces will
     ;; be realized.