emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113484: lisp/dired-x.el: Fix bug#14927.


From: Juanma Barranquero
Subject: [Emacs-diffs] trunk r113484: lisp/dired-x.el: Fix bug#14927.
Date: Mon, 22 Jul 2013 01:04:17 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113484
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14927
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Mon 2013-07-22 03:04:10 +0200
message:
  lisp/dired-x.el: Fix bug#14927.
  (dired-mark-unmarked-files, dired-virtual, dired-guess-default)
  (dired-mark-sexp, dired-filename-at-point): Use string-match-p, looking-at-p.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/dired-x.el                diredx.el-20091113204419-o5vbwnq5f7feedwu-649
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-21 17:45:12 +0000
+++ b/lisp/ChangeLog    2013-07-22 01:04:10 +0000
@@ -1,3 +1,9 @@
+2013-07-22  Juanma Barranquero  <address@hidden>
+
+       * dired-x.el (dired-mark-unmarked-files, dired-virtual)
+       (dired-guess-default, dired-mark-sexp, dired-filename-at-point):
+       Use string-match-p, looking-at-p (bug#14927).
+
 2013-07-21  Juanma Barranquero  <address@hidden>
 
        * desktop.el (desktop-saved-frame-states):

=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el   2013-06-21 12:24:37 +0000
+++ b/lisp/dired-x.el   2013-07-22 01:04:10 +0000
@@ -563,10 +563,10 @@
     (dired-mark-if
      (and
       ;; not already marked
-      (looking-at " ")
+      (looking-at-p " ")
       ;; uninteresting
       (let ((fn (dired-get-filename localp t)))
-        (and fn (string-match regexp fn))))
+        (and fn (string-match-p regexp fn))))
      msg)))
 
 
@@ -610,7 +610,7 @@
   (interactive
    (list (read-string "Virtual Dired directory: " (dired-virtual-guess-dir))))
   (goto-char (point-min))
-  (or (looking-at "  ")
+  (or (looking-at-p "  ")
       ;; if not already indented, do it now:
       (indent-region (point-min) (point-max) 2))
   (or dirname (setq dirname default-directory))
@@ -627,7 +627,7 @@
   ;; If raw ls listing (not a saved old dired buffer), give it a
   ;; decent subdir headerline:
   (goto-char (point-min))
-  (or (looking-at dired-subdir-regexp)
+  (or (looking-at-p dired-subdir-regexp)
       (insert "  "
              (directory-file-name (file-name-directory default-directory))
              ":\n"))
@@ -1089,13 +1089,13 @@
       (setq elt (car alist)
             regexp (car elt)
             alist (cdr alist))
-      (if (string-match regexp file)
+      (if (string-match-p regexp file)
           (setq cmds (cdr elt)
                 alist nil)))
 
     ;; If more than one file, see if all of FILES match regular expression.
     (while (and flist
-                (string-match regexp (car flist)))
+                (string-match-p regexp (car flist)))
       (setq flist (cdr flist)))
 
     ;; If flist is still non-nil, then do not guess since this means that not
@@ -1500,7 +1500,7 @@
                                        (or
                                         (dired-move-to-end-of-filename t)
                                         (point)))
-                sym (if (looking-at " -> ")
+                sym (if (looking-at-p " -> ")
                         (buffer-substring (progn (forward-char 4) (point))
                                           (line-end-position))
                       ""))
@@ -1564,12 +1564,12 @@
   (save-excursion
     ;; First see if just past a filename.
     (or (eobp)                             ; why?
-        (when (looking-at "[] \t\n[{}()]") ; whitespace or some parens
+        (when (looking-at-p "[] \t\n[{}()]") ; whitespace or some parens
           (skip-chars-backward " \n\t\r({[]})")
           (or (bobp) (backward-char 1))))
     (let ((filename-chars "-.[:alnum:]_/:$+@")
           start prefix)
-      (if (looking-at (format "[%s]" filename-chars))
+      (if (looking-at-p (format "[%s]" filename-chars))
           (progn
             (skip-chars-backward filename-chars)
             (setq start (point)
@@ -1577,11 +1577,11 @@
                   ;; This is something to do with ange-ftp filenames.
                   ;; It convert address@hidden to /address@hidden
                   ;; But when does the former occur in dired buffers?
-                 (and (string-match
+                 (and (string-match-p
                        "^\\w+@"
                        (buffer-substring start (line-end-position)))
                       "/"))
-            (if (string-match "[/~]" (char-to-string (preceding-char)))
+            (if (string-match-p "[/~]" (char-to-string (preceding-char)))
                 (setq start (1- start)))
             (skip-chars-forward filename-chars))
         (error "No file found around point!"))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]