]> git.eshelyaron.com Git - emacs.git/commitdiff
* minibuffer.el (read-file-name): Check for repeat before putting
authorChong Yidong <cyd@stupidchicken.com>
Sun, 18 Oct 2009 22:25:36 +0000 (22:25 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 18 Oct 2009 22:25:36 +0000 (22:25 +0000)
a default argument in file-name-history (Bug#4657).

* emacs-lisp/lisp-mode.el (preceding-sexp): Recognize hash table
read syntax (Bug#4737).

* textmodes/sgml-mode.el (sgml-delete-tag): Use
sgml-looking-back-at.

lisp/ChangeLog
lisp/emacs-lisp/lisp-mode.el
lisp/minibuffer.el
lisp/textmodes/sgml-mode.el

index 39829c2c3d7421ca5eb017b910aa9c47920dc071..e689b83cf0dd9c3298ef25fb72fc61ee96d61b2e 100644 (file)
@@ -1,3 +1,14 @@
+2009-10-18  Chong Yidong  <cyd@stupidchicken.com>
+
+       * minibuffer.el (read-file-name): Check for repeat before putting
+       a default argument in file-name-history (Bug#4657).
+
+       * emacs-lisp/lisp-mode.el (preceding-sexp): Recognize hash table
+       read syntax (Bug#4737).
+
+       * textmodes/sgml-mode.el (sgml-delete-tag): Use
+       sgml-looking-back-at.
+
 2009-10-18  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
 
        * textmodes/sgml-mode.el (sgml-tag-help): Prompt user for tag.
index b9b7c6ad8f9468247059da9b8dd5acd36c69af13..362c75a8cafcf8fe0490885531d34b3fa131f2c2 100644 (file)
@@ -673,6 +673,11 @@ If CHAR is not a character, return nil."
          (when (eq (preceding-char) ??)
            (forward-char -1)))
 
+       ;; Skip over hash table read syntax.
+       (and (> (point) (1+ (point-min)))
+            (looking-back "#s" (- (point) 2))
+            (forward-char -2))
+
        ;; Skip over `#N='s.
        (when (eq (preceding-char) ?=)
          (let (labeled-p)
index ca2a5fc6b64528900c5c6ab2b3c5c47e21669e9e..c8bb26002af6a92c8abe991f29a37beed18f0721 100644 (file)
@@ -1289,12 +1289,16 @@ and `read-file-name-function'."
 
           (if replace-in-history
               ;; Replace what Fcompleting_read added to the history
-              ;; with what we will actually return.
+              ;; with what we will actually return.  As an exception,
+              ;; if that's the same as the second item in
+              ;; file-name-history, it's really a repeat (Bug#4657).
               (let ((val1 (minibuffer--double-dollars val)))
                 (if history-delete-duplicates
                     (setcdr file-name-history
                             (delete val1 (cdr file-name-history))))
-                (setcar file-name-history val1))
+               (if (string= val1 (cadr file-name-history))
+                   (pop file-name-history)
+                 (setcar file-name-history val1)))
             (if add-to-history
                 ;; Add the value to the history--but not if it matches
                 ;; the last value already there.
index d009e77adb20b4a951a3bef708ba3e78911ccfe2..ff3054423b976c2ccd6cf1c572fa0d942de6dc34 100644 (file)
@@ -909,7 +909,7 @@ With prefix argument ARG, repeat this ARG times."
              (kill-sexp 1))
          (setq open (point))
          (when (and (sgml-skip-tag-forward 1)
-                    (not (looking-back "/>")))
+                    (not (sgml-looking-back-at "/>")))
            (kill-sexp -1)))
        ;; Delete any resulting empty line.  If we didn't kill-sexp,
        ;; this *should* do nothing, because we're right after the tag.