comparison lisp/info.el @ 5369:4141aeddc55b

Eliminate byte-compile warnings, core Lisp. 2011-03-10 Aidan Kehoe <kehoea@parhasard.net> * etags.el (buffer-tag-table-list): * files.el (find-file-read-only): * files.el (find-file-read-only-other-window): * info.el (Info-dir-outdated-p): * info.el (Info-dump-dir-entries): * info.el (Info-rebuild-dir): * menubar-items.el (default-menubar): * mouse.el (drag-window-divider): * mouse.el (vertical-divider-map): * test-harness.el (emacs-lisp-file-regexp): Eliminate byte-compile warnings, again aside from those linked to Stephen's various non-defined fontconfig functions.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 10 Mar 2011 19:14:25 +0000
parents f00192e1cd49
children 3889ef128488 ac37a5f7e5be
comparison
equal deleted inserted replaced
5368:ed74d2ca7082 5369:4141aeddc55b
1125 dir or localdir are outdated when an info file in the same 1125 dir or localdir are outdated when an info file in the same
1126 directory has been modified more recently." 1126 directory has been modified more recently."
1127 (let ((dir-mod-time (nth 5 (file-attributes file))) 1127 (let ((dir-mod-time (nth 5 (file-attributes file)))
1128 f-mod-time newer) 1128 f-mod-time newer)
1129 (setq Info-dir-newer-info-files nil) 1129 (setq Info-dir-newer-info-files nil)
1130 (mapcar 1130 (mapc
1131 #'(lambda (f) 1131 #'(lambda (f)
1132 (prog2 1132 (prog2
1133 (setq f-mod-time (nth 5 (file-attributes f))) 1133 (setq f-mod-time (nth 5 (file-attributes f)))
1134 (setq newer (or (> (car f-mod-time) (car dir-mod-time)) 1134 (setq newer (or (> (car f-mod-time) (car dir-mod-time))
1135 (and (= (car f-mod-time) (car dir-mod-time)) 1135 (and (= (car f-mod-time) (car dir-mod-time))
1189 1189
1190 (defun Info-dump-dir-entries (entries) 1190 (defun Info-dump-dir-entries (entries)
1191 (let ((tab-width 8) 1191 (let ((tab-width 8)
1192 (description-col 0) 1192 (description-col 0)
1193 len) 1193 len)
1194 (mapcar #'(lambda (e) 1194 (mapc #'(lambda (e)
1195 (setq e (cdr e)) ; Drop filename 1195 (setq e (cdr e)) ; Drop filename
1196 (setq len (length (concat (car e) 1196 (setq len (length (concat (car e)
1197 (car (cdr e))))) 1197 (car (cdr e)))))
1198 (if (> len description-col) 1198 (if (> len description-col)
1199 (setq description-col len))) 1199 (setq description-col len)))
1200 entries) 1200 entries)
1201 (setq description-col (+ 5 description-col)) 1201 (setq description-col (+ 5 description-col))
1202 (mapcar #'(lambda (e) 1202 (mapc #'(lambda (e)
1203 (setq e (cdr e)) ; Drop filename 1203 (setq e (cdr e)) ; Drop filename
1204 (insert "* " (car e) ":" (car (cdr e))) 1204 (insert "* " (car e) ":" (car (cdr e)))
1205 (setq e (car (cdr (cdr e)))) 1205 (setq e (car (cdr (cdr e))))
1206 (while e 1206 (while e
1207 (indent-to-column description-col) 1207 (indent-to-column description-col)
1208 (insert (car e) "\n") 1208 (insert (car e) "\n")
1209 (setq e (cdr e)))) 1209 (setq e (cdr e))))
1210 entries) 1210 entries)
1211 (insert "\n"))) 1211 (insert "\n")))
1212 1212
1213 1213
1214 (defun Info-build-dir-anew (directory) 1214 (defun Info-build-dir-anew (directory)
1215 "Build info directory information for DIRECTORY. 1215 "Build info directory information for DIRECTORY.
1297 (point-max))) 1297 (point-max)))
1298 (while next-section 1298 (while next-section
1299 (narrow-to-region mark next-section) 1299 (narrow-to-region mark next-section)
1300 (setq dir-section-contents (nreverse (Info-parse-dir-entries 1300 (setq dir-section-contents (nreverse (Info-parse-dir-entries
1301 (point-min) (point-max)))) 1301 (point-min) (point-max))))
1302 (mapcar 1302 (mapc
1303 #'(lambda (file) 1303 #'(lambda (file)
1304 (setq dir-entry (assoc (downcase 1304 (setq dir-entry (assoc (downcase
1305 (file-name-sans-extension 1305 (file-name-sans-extension
1306 (file-name-nondirectory file))) 1306 (file-name-nondirectory file)))
1307 dir-section-contents) 1307 dir-section-contents)