aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/info.el
diff options
context:
space:
mode:
authorKaroly Lorentey2005-06-15 12:57:51 +0000
committerKaroly Lorentey2005-06-15 12:57:51 +0000
commitef85512e51f043d73788f00a2aed13cccde0682c (patch)
treefc1fa1378533250f260ef8eaa9a84ae882d9df84 /lisp/info.el
parent8736257554f49445f7b4402ac7a9436b38ce6452 (diff)
parentef88a9999004e6c26148c8d280d6a41f623d7249 (diff)
downloademacs-ef85512e51f043d73788f00a2aed13cccde0682c.tar.gz
emacs-ef85512e51f043d73788f00a2aed13cccde0682c.zip
Merged from miles@gnu.org--gnu-2005 (patch 80-82, 350-422)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-350 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-351 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-352 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-353 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-354 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-355 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-356 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-357 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-358 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-359 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-360 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-361 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-362 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-363 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364 Remove "-face" suffix from widget faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365 Remove "-face" suffix from custom faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366 Remove "-face" suffix from change-log faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367 Remove "-face" suffix from compilation faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368 Remove "-face" suffix from diff-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369 lisp/longlines.el (longlines-visible-face): Face removed * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370 Remove "-face" suffix from woman faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371 Remove "-face" suffix from whitespace-highlight face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372 Remove "-face" suffix from ruler-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373 Remove "-face" suffix from show-paren faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374 Remove "-face" suffix from log-view faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375 Remove "-face" suffix from smerge faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376 Remove "-face" suffix from show-tabs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377 Remove "-face" suffix from highlight-changes faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378 Remove "-face" suffix from and downcase info faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379 Remove "-face" suffix from pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380 Update uses of renamed pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381 Tweak ChangeLog * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-382 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383 Remove "-face" suffix from strokes-char face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384 Remove "-face" suffix from compare-windows face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385 Remove "-face" suffix from calendar faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386 Remove "-face" suffix from diary-button face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387 Remove "-face" suffix from testcover faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388 Remove "-face" suffix from viper faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389 Remove "-face" suffix from org faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390 Remove "-face" suffix from sgml-namespace face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391 Remove "-face" suffix from table-cell face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392 Remove "-face" suffix from tex-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393 Remove "-face" suffix from texinfo-heading face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394 Remove "-face" suffix from flyspell faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-395 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-396 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397 Remove "-face" suffix from gomoku faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398 Remove "-face" suffix from mpuz faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-399 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-400 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-401 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-402 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-403 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-404 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-405 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-407 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408 Remove "-face" suffix from Buffer-menu-buffer face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409 Remove "-face" suffix from antlr-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410 Remove "-face" suffix from ebrowse faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-411 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412 Remove "-face" suffix from flymake faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413 Remove "-face" suffix from idlwave faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414 Remove "-face" suffix from sh-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415 Remove "-face" suffix from vhdl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-416 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417 Remove "-face" suffix from which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418 Remove "-face" suffix from cperl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419 Remove "-face" suffix from ld-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420 Fix cperl-mode font-lock problem * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421 Tweak which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-422 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-80 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-81 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-82 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-350
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el90
1 files changed, 70 insertions, 20 deletions
diff --git a/lisp/info.el b/lisp/info.el
index c36554e6a7a..b34fd013df3 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1379,6 +1379,43 @@ If FORK is a string, it is the name to use for the new buffer."
1379 1379
1380(defvar Info-read-node-completion-table) 1380(defvar Info-read-node-completion-table)
1381 1381
1382(defun Info-read-node-name-2 (string path-and-suffixes action)
1383 "Virtual completion table for file names input in Info node names.
1384PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
1385 (let* ((names nil)
1386 (suffixes (remove "" (cdr path-and-suffixes)))
1387 (suffix (concat (regexp-opt suffixes t) "\\'"))
1388 (string-dir (file-name-directory string))
1389 (dirs
1390 (if (file-name-absolute-p string)
1391 (list (file-name-directory string))
1392 (car path-and-suffixes))))
1393 (dolist (dir dirs)
1394 (unless dir
1395 (setq dir default-directory))
1396 (if string-dir (setq dir (expand-file-name string-dir dir)))
1397 (when (file-directory-p dir)
1398 (dolist (file (file-name-all-completions
1399 (file-name-nondirectory string) dir))
1400 ;; If the file name has no suffix or a standard suffix,
1401 ;; include it.
1402 (and (or (null (file-name-extension file))
1403 (string-match suffix file))
1404 ;; But exclude subfiles of split info files.
1405 (not (string-match "-[0-9]+\\'" file))
1406 ;; And exclude backup files.
1407 (not (string-match "~\\'" file))
1408 (push (if string-dir (concat string-dir file) file) names))
1409 ;; If the file name ends in a standard suffix,
1410 ;; add the unsuffixed name as a completion option.
1411 (when (string-match suffix file)
1412 (setq file (substring file 0 (match-beginning 0)))
1413 (push (if string-dir (concat string-dir file) file) names)))))
1414 (cond
1415 ((eq action t) (all-completions string names))
1416 ((null action) (try-completion string names))
1417 (t (test-completion string names)))))
1418
1382;; This function is used as the "completion table" while reading a node name. 1419;; This function is used as the "completion table" while reading a node name.
1383;; It does completion using the alist in Info-read-node-completion-table 1420;; It does completion using the alist in Info-read-node-completion-table
1384;; unless STRING starts with an open-paren. 1421;; unless STRING starts with an open-paren.
@@ -1389,15 +1426,16 @@ If FORK is a string, it is the name to use for the new buffer."
1389 (let ((file (substring string 1))) 1426 (let ((file (substring string 1)))
1390 (cond 1427 (cond
1391 ((eq code nil) 1428 ((eq code nil)
1392 (let ((comp (try-completion file 'locate-file-completion 1429 (let ((comp (try-completion file 'Info-read-node-name-2
1393 (cons Info-directory-list 1430 (cons Info-directory-list
1394 (mapcar 'car Info-suffix-list))))) 1431 (mapcar 'car Info-suffix-list)))))
1395 (cond 1432 (cond
1396 ((eq comp t) (concat string ")")) 1433 ((eq comp t) (concat string ")"))
1397 (comp (concat "(" comp))))) 1434 (comp (concat "(" comp)))))
1398 ((eq code t) (all-completions file 'locate-file-completion 1435 ((eq code t)
1399 (cons Info-directory-list 1436 (all-completions file 'Info-read-node-name-2
1400 (mapcar 'car Info-suffix-list)))) 1437 (cons Info-directory-list
1438 (mapcar 'car Info-suffix-list))))
1401 (t nil)))) 1439 (t nil))))
1402 ;; If a file name was given, then any node is fair game. 1440 ;; If a file name was given, then any node is fair game.
1403 ((string-match "\\`(" string) 1441 ((string-match "\\`(" string)
@@ -1413,6 +1451,10 @@ If FORK is a string, it is the name to use for the new buffer."
1413 (t 1451 (t
1414 (test-completion string Info-read-node-completion-table predicate)))) 1452 (test-completion string Info-read-node-completion-table predicate))))
1415 1453
1454;; Arrange to highlight the proper letters in the completion list buffer.
1455(put 'Info-read-node-name-1 'completion-base-size-function
1456 (lambda () 1))
1457
1416(defun Info-read-node-name (prompt &optional default) 1458(defun Info-read-node-name (prompt &optional default)
1417 (let* ((completion-ignore-case t) 1459 (let* ((completion-ignore-case t)
1418 (Info-read-node-completion-table (Info-build-node-completions)) 1460 (Info-read-node-completion-table (Info-build-node-completions))
@@ -3482,29 +3524,37 @@ the variable `Info-file-list-for-emacs'."
3482 (t 3524 (t
3483 (Info-goto-emacs-command-node command))))) 3525 (Info-goto-emacs-command-node command)))))
3484 3526
3485(defface Info-title-1-face 3527(defface info-title-1
3486 '((((type tty pc) (class color)) :foreground "yellow" :weight bold) 3528 '((((type tty pc) (class color)) :foreground "green" :weight bold)
3487 (t :height 1.2 :inherit Info-title-2-face)) 3529 (t :height 1.2 :inherit info-title-2))
3488 "Face for Info titles at level 1." 3530 "Face for info titles at level 1."
3489 :group 'info) 3531 :group 'info)
3532;; backward-compatibility alias
3533(put 'Info-title-1-face 'face-alias 'info-title-1)
3490 3534
3491(defface Info-title-2-face 3535(defface info-title-2
3492 '((((type tty pc) (class color)) :foreground "lightblue" :weight bold) 3536 '((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
3493 (t :height 1.2 :inherit Info-title-3-face)) 3537 (t :height 1.2 :inherit info-title-3))
3494 "Face for Info titles at level 2." 3538 "Face for info titles at level 2."
3495 :group 'info) 3539 :group 'info)
3540;; backward-compatibility alias
3541(put 'Info-title-2-face 'face-alias 'info-title-2)
3496 3542
3497(defface Info-title-3-face 3543(defface info-title-3
3498 '((((type tty pc) (class color)) :weight bold) 3544 '((((type tty pc) (class color)) :weight bold)
3499 (t :height 1.2 :inherit Info-title-4-face)) 3545 (t :height 1.2 :inherit info-title-4))
3500 "Face for Info titles at level 3." 3546 "Face for info titles at level 3."
3501 :group 'info) 3547 :group 'info)
3548;; backward-compatibility alias
3549(put 'Info-title-3-face 'face-alias 'info-title-3)
3502 3550
3503(defface Info-title-4-face 3551(defface info-title-4
3504 '((((type tty pc) (class color)) :weight bold) 3552 '((((type tty pc) (class color)) :weight bold)
3505 (t :weight bold :inherit variable-pitch)) 3553 (t :weight bold :inherit variable-pitch))
3506 "Face for Info titles at level 4." 3554 "Face for info titles at level 4."
3507 :group 'info) 3555 :group 'info)
3556;; backward-compatibility alias
3557(put 'Info-title-4-face 'face-alias 'info-title-4)
3508 3558
3509(defface info-menu-header 3559(defface info-menu-header
3510 '((((type tty pc)) 3560 '((((type tty pc))
@@ -3644,10 +3694,10 @@ Preserve text properties."
3644 nil t) 3694 nil t)
3645 (let* ((c (preceding-char)) 3695 (let* ((c (preceding-char))
3646 (face 3696 (face
3647 (cond ((= c ?*) 'Info-title-1-face) 3697 (cond ((= c ?*) 'info-title-1)
3648 ((= c ?=) 'Info-title-2-face) 3698 ((= c ?=) 'info-title-2)
3649 ((= c ?-) 'Info-title-3-face) 3699 ((= c ?-) 'info-title-3)
3650 (t 'Info-title-4-face)))) 3700 (t 'info-title-4))))
3651 (put-text-property (match-beginning 1) (match-end 1) 3701 (put-text-property (match-beginning 1) (match-end 1)
3652 'font-lock-face face)) 3702 'font-lock-face face))
3653 ;; This is a serious problem for trying to handle multiple 3703 ;; This is a serious problem for trying to handle multiple