# HG changeset patch # User Richard M. Stallman # Date 712205788 0 # Node ID 5b1c5b4286e7ab4b0b2cf9fb1bd3a5eef2b60877 # Parent e0dde8b906136e4c78706a458ed97bf6280e27e0 *** empty log message *** diff -r e0dde8b90613 -r 5b1c5b4286e7 lisp/dired-aux.el --- a/lisp/dired-aux.el Mon Jul 27 02:14:20 1992 +0000 +++ b/lisp/dired-aux.el Mon Jul 27 02:56:28 1992 +0000 @@ -37,8 +37,7 @@ (defun dired-diff (file &optional switches) "Compare file at point with file FILE using `diff'. FILE defaults to the file at the mark. -The prompted-for file is the first file given to `diff'. -Prefix arg lets you edit the diff switches. See the command `diff'." +The prompted-for file is the first file given to `diff'." (interactive (let ((default (if (mark) (save-excursion (goto-char (mark)) @@ -60,43 +59,12 @@ "Diff this file with its backup file or vice versa. Uses the latest backup, if there are several numerical backups. If this file is a backup, diff it with its original. -The backup file is the first file given to `diff'. -Prefix arg lets you edit the diff switches. See the command `diff'." +The backup file is the first file given to `diff'." (interactive (list (if (fboundp 'diff-read-switches) (diff-read-switches "Diff with switches: ")))) - (let (bak ori (file (dired-get-filename))) - (if (backup-file-name-p file) - (setq bak file - ori (file-name-sans-versions file)) - (setq bak (or (dired-latest-backup-file file) - (error "No backup found for %s" file)) - ori file)) - (if switches - (diff bak ori switches) - (diff bak ori)))) - -(defun dired-latest-backup-file (fn) ; actually belongs into files.el - "Return the latest existing backup of FILE, or nil." - ;; First try simple backup, then the highest numbered of the - ;; numbered backups. - ;; Ignore the value of version-control because we look for existing - ;; backups, which maybe were made earlier or by another user with - ;; a different value of version-control. - (setq fn (expand-file-name fn)) - (or - (let ((bak (make-backup-file-name fn))) - (if (file-exists-p bak) bak)) - (let* ((dir (file-name-directory fn)) - (base-versions (concat (file-name-nondirectory fn) ".~")) - (bv-length (length base-versions))) - (concat dir - (car (sort - (file-name-all-completions base-versions dir) - ;; bv-length is a fluid var for backup-extract-version: - (function - (lambda (fn1 fn2) - (> (backup-extract-version fn1) - (backup-extract-version fn2)))))))))) + (if switches + (diff-backup (dired-get-filename) switches) + (diff-backup (dired-get-filename)))) (defun dired-do-chxxx (attribute-name program op-symbol arg) ;; Change file attributes (mode, group, owner) of marked files and diff -r e0dde8b90613 -r 5b1c5b4286e7 lisp/dired.el --- a/lisp/dired.el Mon Jul 27 02:14:20 1992 +0000 +++ b/lisp/dired.el Mon Jul 27 02:56:28 1992 +0000 @@ -1,10 +1,9 @@ ;; dired.el --- directory-browsing commands +;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. + ;; Author: Sebastian Kremer . ;; Version: 5.234 -;; Last-Modified: 14 Jul 1992 - -;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -30,12 +29,6 @@ ;;; Code: -;; compatibility package when using Emacs 18.55 -(defvar dired-emacs-19-p (equal (substring emacs-version 0 2) "19")) -;;;>>> install (is there a better way to test for Emacs 19?) -(or dired-emacs-19-p - (require 'emacs-19)) - ;;; Customizable variables ;;; The funny comments are for autoload.el, to automagically update @@ -156,11 +149,15 @@ "Character used to flag files for deletion.") (defvar dired-shrink-to-fit - (if (fboundp 'baud-rate) (> (baud-rate) search-slow-speed) t) + t +;; I see no reason ever to make this nil -- rms. +;; (> baud-rate search-slow-speed) "Non-nil means Dired shrinks the display buffer to fit the marked files.") (defvar dired-flagging-regexp nil);; Last regexp used to flag files. +(defvar dired-file-version-alist) + (defvar dired-directory nil "The directory name or shell wildcard that was used as argument to `ls'. Local to each dired buffer.") @@ -686,6 +683,7 @@ (define-key dired-mode-map "m" 'dired-mark) (define-key dired-mode-map "n" 'dired-next-line) (define-key dired-mode-map "o" 'dired-find-file-other-window) + (define-key dired-mode-map "\C-o" 'dired-display-file) (define-key dired-mode-map "p" 'dired-previous-line) (define-key dired-mode-map "q" 'dired-quit) (define-key dired-mode-map "s" 'dired-sort-toggle-or-edit) @@ -900,6 +898,11 @@ "In dired, visit this file or directory in another window." (interactive) (find-file-other-window (dired-get-filename))) + +(defun dired-display-file () + "In dired, display this file or directory in another window." + (interactive) + (display-buffer (find-file-noselect (dired-get-filename)))) ;;; Functions for extracting and manipulating file names in dired buffers. @@ -1335,7 +1338,7 @@ ;; (and (file-directory-p fn) (not (file-symlink-p fn))) ;; but more efficient (if (eq t (car (file-attributes fn))) - (remove-directory fn) + (delete-directory fn) (delete-file fn)) ;; if we get here, removing worked (setq succ (1+ succ)) @@ -1711,17 +1714,17 @@ (setq keep (if keep (prefix-numeric-value keep) dired-kept-versions)) (let ((early-retention (if (< keep 0) (- keep) kept-old-versions)) (late-retention (if (<= keep 0) dired-kept-versions keep)) - (file-version-assoc-list ())) + (dired-file-version-alist ())) (message "Cleaning numerical backups (keeping %d late, %d old)..." late-retention early-retention) ;; Look at each file. ;; If the file has numeric backup versions, - ;; put on file-version-assoc-list an element of the form + ;; put on dired-file-version-alist an element of the form ;; (FILENAME . VERSION-NUMBER-LIST) (dired-map-dired-file-lines (function dired-collect-file-versions)) ;; Sort each VERSION-NUMBER-LIST, ;; and remove the versions not to be deleted. - (let ((fval file-version-assoc-list)) + (let ((fval dired-file-version-alist)) (while fval (let* ((sorted-v-list (cons 'q (sort (cdr (car fval)) '<))) (v-count (length sorted-v-list))) @@ -1766,8 +1769,8 @@ (file-name-directory fn))) (versions (mapcar 'backup-extract-version possibilities))) (if versions - (setq file-version-assoc-list (cons (cons fn versions) - file-version-assoc-list))))) + (setq dired-file-version-alist (cons (cons fn versions) + dired-file-version-alist))))) (defun dired-trample-file-versions (fn) (let* ((start-vn (string-match "\\.~[0-9]+~$" fn)) @@ -1775,7 +1778,7 @@ (and start-vn (setq base-version-list ; there was a base version to which (assoc (substring fn 0 start-vn) ; this looks like a - file-version-assoc-list)) ; subversion + dired-file-version-alist)) ; subversion (not (memq (string-to-int (substring fn (+ 2 start-vn))) base-version-list)) ; this one doesn't make the cut (progn (beginning-of-line) @@ -1923,16 +1926,14 @@ (autoload 'dired-diff "dired-aux" "Compare file at point with file FILE using `diff'. FILE defaults to the file at the mark. -The prompted-for file is the first file given to `diff'. -Prefix arg lets you edit the diff switches. See the command `diff'." +The prompted-for file is the first file given to `diff'." t) (autoload 'dired-backup-diff "dired-aux" "Diff this file with its backup file or vice versa. Uses the latest backup, if there are several numerical backups. If this file is a backup, diff it with its original. -The backup file is the first file given to `diff'. -Prefix arg lets you edit the diff switches. See the command `diff'." +The backup file is the first file given to `diff'." t) (autoload 'dired-do-chmod "dired-aux" diff -r e0dde8b90613 -r 5b1c5b4286e7 lisp/emacs-lisp/lisp-mode.el --- a/lisp/emacs-lisp/lisp-mode.el Mon Jul 27 02:14:20 1992 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Mon Jul 27 02:56:28 1992 +0000 @@ -113,6 +113,7 @@ () (setq emacs-lisp-mode-map (nconc (make-sparse-keymap) shared-lisp-mode-map)) + (define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol) (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)) (defun emacs-lisp-mode () @@ -178,6 +179,7 @@ (setq lisp-interaction-mode-map (nconc (make-sparse-keymap) shared-lisp-mode-map)) (define-key lisp-interaction-mode-map "\e\C-x" 'eval-defun) + (define-key lisp-interaction-mode-map "\e\t" 'lisp-complete-symbol) (define-key lisp-interaction-mode-map "\n" 'eval-print-last-sexp)) (defun lisp-interaction-mode () diff -r e0dde8b90613 -r 5b1c5b4286e7 lisp/help.el --- a/lisp/help.el Mon Jul 27 02:14:20 1992 +0000 +++ b/lisp/help.el Mon Jul 27 02:56:28 1992 +0000 @@ -304,10 +304,12 @@ ((eq (car-safe def) 'mocklisp) "a mocklisp function.") ((eq (car-safe def) 'autoload) - (format "%sLisp %s to autoload from `%s'." + (format "%sautoloaded Lisp %s." beg (if (nth 4 def) "macro" "function") - (nth 1 def))) +;;; Including the file name made this line too long. +;;; (nth 1 def) + )) (t ""))) (terpri)) (if (documentation function) @@ -365,7 +367,7 @@ (let ((message (let ((standard-output (get-buffer-create "*Help*"))) (print-help-return-message 'identity)))) - (apropos string 'commandp) + (apropos string t 'commandp) (and message (message message)))) (defun locate-library (library &optional nosuffix) diff -r e0dde8b90613 -r 5b1c5b4286e7 lisp/progmodes/etags.el --- a/lisp/progmodes/etags.el Mon Jul 27 02:14:20 1992 +0000 +++ b/lisp/progmodes/etags.el Mon Jul 27 02:56:28 1992 +0000 @@ -1098,6 +1098,8 @@ (or (one-window-p) (delete-window))) +;;;###autoload (define-key esc-map "\t" 'complete-tag) + ;;;###autoload (defun complete-tag () "Perform tags completion on the text around point. diff -r e0dde8b90613 -r 5b1c5b4286e7 src/eval.c --- a/src/eval.c Mon Jul 27 02:14:20 1992 +0000 +++ b/src/eval.c Mon Jul 27 02:56:28 1992 +0000 @@ -1127,32 +1127,21 @@ wants_debugger (list, conditions) Lisp_Object list, conditions; { - static int looking = 0; - - if (looking) - { - /* We got an error while looking in LIST. */ - looking = 0; - return 1; - } - if (NILP (list)) return 0; if (! CONSP (list)) return 1; - looking = 1; - while (!NILP (conditions)) + while (CONSP (conditions)) { - Lisp_Object tem; - tem = Fmemq (XCONS (conditions)->car, list); - if (! NILP (tem)) - { - looking = 0; + Lisp_Object this, tail; + this = XCONS (conditions)->car; + for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) + if (EQ (XCONS (tail)->car, this)) return 1; - } conditions = XCONS (conditions)->cdr; } + return 0; } /* Value of Qlambda means we have called debugger and user has continued. @@ -1174,8 +1163,8 @@ if (wants_debugger (Vstack_trace_on_error, conditions)) internal_with_output_to_temp_buffer ("*Backtrace*", Fbacktrace, Qnil); if (!entering_debugger - && ((EQ (sig, Qquit) && debug_on_quit) - || wants_debugger (Vdebug_on_error, conditions))) + && (EQ (sig, Qquit) ? debug_on_quit + : wants_debugger (Vdebug_on_error, conditions))) { int count = specpdl_ptr - specpdl; specbind (Qdebug_on_error, Qnil);