aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2013-09-06 17:12:22 -0400
committerStefan Monnier2013-09-06 17:12:22 -0400
commite17d94a507d3ab2b2998880861b28badf8ecf0e7 (patch)
tree6b6d9962ac55679bd08822c60a86e4786377b8bf
parent96727100a742577ce0188d6d91b464b216e924b4 (diff)
downloademacs-e17d94a507d3ab2b2998880861b28badf8ecf0e7.tar.gz
emacs-e17d94a507d3ab2b2998880861b28badf8ecf0e7.zip
* lisp/dired-x.el (dired-mark-sexp): Bind the vars lexically rather
than dynamically.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/dired-x.el32
2 files changed, 18 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ca487ad2fef..4b6245d5791 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * dired-x.el (dired-mark-sexp): Bind the vars lexically rather
4 than dynamically.
5
12013-09-06 Juri Linkov <juri@jurta.org> 62013-09-06 Juri Linkov <juri@jurta.org>
2 7
3 * info.el (Info-display-images-node): When image file doesn't exist 8 * info.el (Info-display-images-node): When image file doesn't exist
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 3527a3fc756..c6ecbf1e718 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1,4 +1,4 @@
1;;; dired-x.el --- extra Dired functionality 1;;; dired-x.el --- extra Dired functionality -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1993-1994, 1997, 2001-2013 Free Software Foundation, 3;; Copyright (C) 1993-1994, 1997, 2001-2013 Free Software Foundation,
4;; Inc. 4;; Inc.
@@ -1185,7 +1185,7 @@ results in
1185 (setq count (1+ count) 1185 (setq count (1+ count)
1186 start (1+ start))) 1186 start (1+ start)))
1187 ;; ... and prepend a "../" for each slash found: 1187 ;; ... and prepend a "../" for each slash found:
1188 (dotimes (n count) 1188 (dotimes (_ count)
1189 (setq name1 (concat "../" name1))))) 1189 (setq name1 (concat "../" name1)))))
1190 (make-symbolic-link 1190 (make-symbolic-link
1191 (directory-file-name name1) ; must not link to foo/ 1191 (directory-file-name name1) ; must not link to foo/
@@ -1397,22 +1397,6 @@ Considers buffers closer to the car of `buffer-list' to be more recent."
1397;; Does anyone use this? - lrd 6/29/93. 1397;; Does anyone use this? - lrd 6/29/93.
1398;; Apparently people do use it. - lrd 12/22/97. 1398;; Apparently people do use it. - lrd 12/22/97.
1399 1399
1400(with-no-warnings
1401 ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
1402 ;; This is unbearably ugly, but not more than having global variables
1403 ;; named size, time, name or s, however practical it can be while writing
1404 ;; `dired-mark-sexp' predicates.
1405 (defvar inode)
1406 (defvar s)
1407 (defvar mode)
1408 (defvar nlink)
1409 (defvar uid)
1410 (defvar gid)
1411 (defvar size)
1412 (defvar time)
1413 (defvar name)
1414 (defvar sym))
1415
1416(defun dired-mark-sexp (predicate &optional unflag-p) 1400(defun dired-mark-sexp (predicate &optional unflag-p)
1417 "Mark files for which PREDICATE returns non-nil. 1401 "Mark files for which PREDICATE returns non-nil.
1418With a prefix arg, unmark or unflag those files instead. 1402With a prefix arg, unmark or unflag those files instead.
@@ -1505,7 +1489,17 @@ to mark all zero length files."
1505 (line-end-position)) 1489 (line-end-position))
1506 "")) 1490 ""))
1507 t) 1491 t)
1508 (eval predicate))) 1492 (eval predicate
1493 `((inode . ,inode)
1494 (s . ,s)
1495 (mode . ,mode)
1496 (nlink . ,nlink)
1497 (uid . ,uid)
1498 (gid . ,gid)
1499 (size . ,size)
1500 (time . ,time)
1501 (name . ,name)
1502 (sym . ,sym)))))
1509 (format "'%s file" predicate)))) 1503 (format "'%s file" predicate))))
1510 1504
1511 1505