comparison lisp/locate.el @ 74233:4267b07f90ba

(locate-main-listing-line-p, locate-mode, locate-do-setup): "?\ " -> "?\s".
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 27 Nov 2006 13:54:56 +0000
parents 3e504dad08cd
children e3694f1cb928 f1d13e615070
comparison
equal deleted inserted replaced
74232:4accd8d9cc3c 74233:4267b07f90ba
428 This function returns nil if the current line either contains no 428 This function returns nil if the current line either contains no
429 file name or is inside a subdirectory." 429 file name or is inside a subdirectory."
430 (save-excursion 430 (save-excursion
431 (forward-line 0) 431 (forward-line 0)
432 (looking-at (concat "." 432 (looking-at (concat "."
433 (make-string (1- locate-filename-indentation) ?\ ) 433 (make-string (1- locate-filename-indentation) ?\s)
434 "\\(/\\|[A-Za-z]:\\)")))) 434 "\\(/\\|[A-Za-z]:\\)"))))
435 435
436 (defun locate-mouse-view-file (event) 436 (defun locate-mouse-view-file (event)
437 "In Locate mode, view a file, using the mouse." 437 "In Locate mode, view a file, using the mouse."
438 (interactive "@e") 438 (interactive "@e")
476 (setq dired-switches-alist nil) 476 (setq dired-switches-alist nil)
477 (make-local-variable 'directory-listing-before-filename-regexp) 477 (make-local-variable 'directory-listing-before-filename-regexp)
478 ;; This should support both Unix and Windoze style names 478 ;; This should support both Unix and Windoze style names
479 (setq directory-listing-before-filename-regexp 479 (setq directory-listing-before-filename-regexp
480 (concat "^." 480 (concat "^."
481 (make-string (1- locate-filename-indentation) ?\ ) 481 (make-string (1- locate-filename-indentation) ?\s)
482 "\\(/\\|[A-Za-z]:\\)\\|" 482 "\\(/\\|[A-Za-z]:\\)\\|"
483 (default-value 'directory-listing-before-filename-regexp))) 483 (default-value 'directory-listing-before-filename-regexp)))
484 (make-local-variable 'dired-actual-switches) 484 (make-local-variable 'dired-actual-switches)
485 (setq dired-actual-switches "") 485 (setq dired-actual-switches "")
486 (make-local-variable 'dired-permission-flags-regexp) 486 (make-local-variable 'dired-permission-flags-regexp)
487 (setq dired-permission-flags-regexp 487 (setq dired-permission-flags-regexp
488 (concat "^.\\(" 488 (concat "^.\\("
489 (make-string (1- locate-filename-indentation) ?\ ) 489 (make-string (1- locate-filename-indentation) ?\s)
490 "\\)\\|" 490 "\\)\\|"
491 (default-value 'dired-permission-flags-regexp))) 491 (default-value 'dired-permission-flags-regexp)))
492 (make-local-variable 'revert-buffer-function) 492 (make-local-variable 'revert-buffer-function)
493 (setq revert-buffer-function 'locate-update) 493 (setq revert-buffer-function 'locate-update)
494 (set (make-local-variable 'page-delimiter) "\n\n") 494 (set (make-local-variable 'page-delimiter) "\n\n")
509 (error "Locate: no match for %s in database" search-string))))) 509 (error "Locate: no match for %s in database" search-string)))))
510 510
511 (locate-insert-header search-string) 511 (locate-insert-header search-string)
512 512
513 (while (not (eobp)) 513 (while (not (eobp))
514 (insert-char ?\ locate-filename-indentation t) 514 (insert-char ?\s locate-filename-indentation t)
515 (locate-set-properties) 515 (locate-set-properties)
516 (forward-line 1))) 516 (forward-line 1)))
517 (goto-char (point-min))) 517 (goto-char (point-min)))
518 518
519 (defun locate-set-properties () 519 (defun locate-set-properties ()