emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107317: * lisp/newcomment.el (uncomm


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107317: * lisp/newcomment.el (uncomment-region-default): Don't leave extra space
Date: Fri, 17 Feb 2012 10:44:32 -0500
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107317
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8150
author: Lawrence Mitchell <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-02-17 10:44:32 -0500
message:
  * lisp/newcomment.el (uncomment-region-default): Don't leave extra space
  when an arg is provided.
modified:
  lisp/ChangeLog
  lisp/newcomment.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-02-17 13:05:20 +0000
+++ b/lisp/ChangeLog    2012-02-17 15:44:32 +0000
@@ -1,6 +1,12 @@
+2012-02-17  Lawrence Mitchell <address@hidden>
+            Stefan Monnier  <address@hidden>
+
+       * newcomment.el (uncomment-region-default): Don't leave extra space
+       when an arg is provided (bug#8150).
+
 2012-02-17  Teodor Zlatanov  <address@hidden>
 
-       * net/gnutls.el (gnutls-trustfiles): Fixed Cygwin bundle location.
+       * net/gnutls.el (gnutls-trustfiles): Fix Cygwin bundle location.
 
 2012-02-17  Glenn Morris  <address@hidden>
 
@@ -327,8 +333,8 @@
 
 2012-02-07  Alan Mackenzie  <address@hidden>
 
-       * progmodes/cc-engine.el (c-forward-objc-directive): Prevent
-       looping in "#pragma mark @implementation".
+       * progmodes/cc-engine.el (c-forward-objc-directive):
+       Prevent looping in "#pragma mark @implementation".
 
 2012-02-07  Michael Albinus  <address@hidden>
 
@@ -568,8 +574,8 @@
        (Bug#10254).
        (bibtex-mode): Call bibtex-set-dialect via
        hack-local-variables-hook.
-       (bibtex-dialect): Update docstring.  Add
-       safe-local-variable predicate.
+       (bibtex-dialect): Update docstring.
+       Add safe-local-variable predicate.
        (bibtex-entry-alist, bibtex-field-alist): Initialize via
        bibtex-set-dialect.
        (bibtex-mode-map): Define menu for each dialect.
@@ -610,8 +616,8 @@
 
 2012-01-28  Phil Hagelberg  <address@hidden>
 
-       * emacs-lisp/package.el (package-install): Run
-       package-refresh-contents if there is no archive yet (Bug#9798).
+       * emacs-lisp/package.el (package-install):
+       Run package-refresh-contents if there is no archive yet (Bug#9798).
 
 2012-01-28  Chong Yidong  <address@hidden>
 
@@ -788,8 +794,8 @@
 2012-01-19  Martin Rudalics  <address@hidden>
 
        * window.el (window--state-get-1, window-state-get): Do not use
-       special state value for window-persistent-parameters.  Rename
-       argument IGNORE to WRITABLE.  Rewrite doc-string.
+       special state value for window-persistent-parameters.
+       Rename argument IGNORE to WRITABLE.  Rewrite doc-string.
        (window--state-put-2): Reset all window parameters to nil before
        assigning values of persistent parameters.
 
@@ -879,8 +885,8 @@
        c-mask-paragraph, pass in `fill-paragraph' rather than
        `fill-region-as-paragraph'.  (This is a reversion of a previous
        change.)
-       * progmodes/cc-mode.el (c-basic-common-init): Make
-       fill-paragraph-handle-comment buffer local and set it to nil.
+       * progmodes/cc-mode.el (c-basic-common-init):
+       Make fill-paragraph-handle-comment buffer local and set it to nil.
 
 2012-01-13  Glenn Morris  <address@hidden>
 

=== modified file 'lisp/newcomment.el'
--- a/lisp/newcomment.el        2012-01-19 07:21:25 +0000
+++ b/lisp/newcomment.el        2012-02-17 15:44:32 +0000
@@ -872,14 +872,15 @@
          (when (and sre (looking-at (concat "\\s-*\n\\s-*" srei)))
            (goto-char (match-end 0)))
          (if (null arg) (delete-region (point-min) (point))
-           (skip-syntax-backward " ")
-           (delete-char (- numarg))
-           (unless (or (bobp)
-                       (save-excursion (goto-char (point-min))
-                                       (looking-at comment-start-skip)))
-             ;; If there's something left but it doesn't look like
-             ;; a comment-start any more, just remove it.
-             (delete-region (point-min) (point))))
+            (let* ((opoint (point-marker))
+                   (nchar (skip-syntax-backward " ")))
+              (delete-char (- numarg))
+              (unless (and (not (bobp))
+                           (save-excursion (goto-char (point-min))
+                                           (looking-at comment-start-skip)))
+                ;; If there's something left but it doesn't look like
+                ;; a comment-start any more, just remove it.
+                (delete-region (point-min) opoint))))
 
          ;; Remove the end-comment (and leading padding and such).
          (goto-char (point-max)) (comment-enter-backward)


reply via email to

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