[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114161: * lisp/dired-x.el (dired-mark-sexp): Bind t
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r114161: * lisp/dired-x.el (dired-mark-sexp): Bind the vars lexically rather |
Date: |
Fri, 06 Sep 2013 21:12:25 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114161
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2013-09-06 17:12:22 -0400
message:
* lisp/dired-x.el (dired-mark-sexp): Bind the vars lexically rather
than dynamically.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/dired-x.el diredx.el-20091113204419-o5vbwnq5f7feedwu-649
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-06 20:43:49 +0000
+++ b/lisp/ChangeLog 2013-09-06 21:12:22 +0000
@@ -1,3 +1,8 @@
+2013-09-06 Stefan Monnier <address@hidden>
+
+ * dired-x.el (dired-mark-sexp): Bind the vars lexically rather
+ than dynamically.
+
2013-09-06 Juri Linkov <address@hidden>
* info.el (Info-display-images-node): When image file doesn't exist
=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el 2013-09-05 03:30:07 +0000
+++ b/lisp/dired-x.el 2013-09-06 21:12:22 +0000
@@ -1,4 +1,4 @@
-;;; dired-x.el --- extra Dired functionality
+;;; dired-x.el --- extra Dired functionality -*- lexical-binding:t -*-
;; Copyright (C) 1993-1994, 1997, 2001-2013 Free Software Foundation,
;; Inc.
@@ -1185,7 +1185,7 @@
(setq count (1+ count)
start (1+ start)))
;; ... and prepend a "../" for each slash found:
- (dotimes (n count)
+ (dotimes (_ count)
(setq name1 (concat "../" name1)))))
(make-symbolic-link
(directory-file-name name1) ; must not link to foo/
@@ -1397,22 +1397,6 @@
;; Does anyone use this? - lrd 6/29/93.
;; Apparently people do use it. - lrd 12/22/97.
-(with-no-warnings
- ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
- ;; This is unbearably ugly, but not more than having global variables
- ;; named size, time, name or s, however practical it can be while writing
- ;; `dired-mark-sexp' predicates.
- (defvar inode)
- (defvar s)
- (defvar mode)
- (defvar nlink)
- (defvar uid)
- (defvar gid)
- (defvar size)
- (defvar time)
- (defvar name)
- (defvar sym))
-
(defun dired-mark-sexp (predicate &optional unflag-p)
"Mark files for which PREDICATE returns non-nil.
With a prefix arg, unmark or unflag those files instead.
@@ -1505,7 +1489,17 @@
(line-end-position))
""))
t)
- (eval predicate)))
+ (eval predicate
+ `((inode . ,inode)
+ (s . ,s)
+ (mode . ,mode)
+ (nlink . ,nlink)
+ (uid . ,uid)
+ (gid . ,gid)
+ (size . ,size)
+ (time . ,time)
+ (name . ,name)
+ (sym . ,sym)))))
(format "'%s file" predicate))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114161: * lisp/dired-x.el (dired-mark-sexp): Bind the vars lexically rather,
Stefan Monnier <=