Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ab67260b
Commit
ab67260b
authored
Jul 27, 1992
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
8a4c10dc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
80 deletions
+44
-80
lisp/dired-aux.el
lisp/dired-aux.el
+5
-37
lisp/dired.el
lisp/dired.el
+22
-21
lisp/emacs-lisp/lisp-mode.el
lisp/emacs-lisp/lisp-mode.el
+2
-0
lisp/help.el
lisp/help.el
+5
-3
lisp/progmodes/etags.el
lisp/progmodes/etags.el
+2
-0
src/eval.c
src/eval.c
+8
-19
No files found.
lisp/dired-aux.el
View file @
ab67260b
...
...
@@ -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 @@ Prefix arg lets you edit the diff switches. See the command `diff'."
"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
...
...
lisp/dired.el
View file @
ab67260b
;; dired.el --- directory-browsing commands
;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>.
;; 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 @@ This is what the `do' commands look for and what the `mark' commands store.")
"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 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
(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 @@ otherwise, display it in another buffer."
"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 @@ Optional argument means return a file name relative to `default-directory'."
;; (and (file-directory-p fn) (not (file-symlink-p fn)))
;; but more efficient
(
if
(
eq
t
(
car
(
file-attributes
fn
)))
(
remov
e-directory
fn
)
(
delet
e-directory
fn
)
(
delete-file
fn
))
;; if we get here, removing worked
(
setq
succ
(
1+
succ
))
...
...
@@ -1711,17 +1714,17 @@ with a prefix argument."
(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-a
ssoc-
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-a
ssoc-
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-a
ssoc-
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 @@ with a prefix argument."
(
file-name-directory
fn
)))
(
versions
(
mapcar
'backup-extract-version
possibilities
)))
(
if
versions
(
setq
file-version-a
ssoc-
list
(
cons
(
cons
fn
versions
)
file-version-a
ssoc-
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 @@ with a prefix argument."
(
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-a
ssoc-
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 @@ With a prefix argument you can edit the current listing switches instead."
(
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"
...
...
lisp/emacs-lisp/lisp-mode.el
View file @
ab67260b
...
...
@@ -113,6 +113,7 @@ All commands in shared-lisp-mode-map are inherited by this map.")
()
(
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 @@ All commands in `shared-lisp-mode-map' are inherited by this map.")
(
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
()
...
...
lisp/help.el
View file @
ab67260b
...
...
@@ -304,10 +304,12 @@ C-w print information on absence of warranty for GNU Emacs."
((
eq
(
car-safe
def
)
'mocklisp
)
"a mocklisp function."
)
((
eq
(
car-safe
def
)
'autoload
)
(
format
"%s
Lisp %s to autoload from `
%s
'
."
(
format
"%s
autoloaded 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 @@ documentation found."
(
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
)
...
...
lisp/progmodes/etags.el
View file @
ab67260b
...
...
@@ -1098,6 +1098,8 @@ see the doc of that variable if you want to add names to the list."
(
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.
...
...
src/eval.c
View file @
ab67260b
...
...
@@ -1127,32 +1127,21 @@ static int
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 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment