]> code.delx.au - gnu-emacs/blobdiff - lisp/add-log.el
* custom.el (provide-theme): Ban `user' theme name.
[gnu-emacs] / lisp / add-log.el
index 024262a6beee0bd79ace88db3f1d4b76ab65ac52..d7f9f9b98464a183ef81a0786da352a4e26b2de8 100644 (file)
@@ -551,7 +551,7 @@ non-nil, otherwise in local time."
          (forward-line 1)
        (insert (nth (random (length new-entries))
                     new-entries)
-               "\n\n")
+               hard-newline hard-newline)
        (forward-line -1)))
 
     ;; Determine where we should stop searching for a usable
@@ -584,7 +584,7 @@ non-nil, otherwise in local time."
           ;; Delete excess empty lines; make just 2.
           (while (and (not (eobp)) (looking-at "^\\s *$"))
             (delete-region (point) (line-beginning-position 2)))
-          (insert-char ?\n 2)
+          (insert hard-newline hard-newline)
           (forward-line -2)
           (indent-relative-maybe))
          (t
@@ -593,7 +593,7 @@ non-nil, otherwise in local time."
             (forward-line 1))
           (while (and (not (eobp)) (looking-at "^\\s *$"))
             (delete-region (point) (line-beginning-position 2)))
-          (insert-char ?\n 3)
+          (insert hard-newline hard-newline hard-newline)
           (forward-line -2)
           (indent-to left-margin)
           (insert "* ")
@@ -860,7 +860,7 @@ Has a preference of looking backwards."
                                    (skip-syntax-backward " ")
                                   (point))))
                       (if (looking-at "^[+-]")
-                          ;; C++.
+                          ;; Objective-C
                           (change-log-get-method-definition)
                         ;; Ordinary C function syntax.
                         (setq beg (point))
@@ -901,6 +901,13 @@ Has a preference of looking backwards."
                               ;; precede the name.
                               (setq middle (point))
                               (forward-word -1)
+                              ;; Is this C++ method?
+                              (when (and (< 2 middle)
+                                         (string= (buffer-substring (- middle 2)
+                                                                    middle)
+                                                  "::"))
+                                ;; Include "classname::".
+                                (setq middle (point)))
                               ;; Ignore these subparts of a class decl
                               ;; and move back to the class name itself.
                               (while (looking-at "public \\|private ")
@@ -1059,7 +1066,7 @@ old-style time formats for entries are supported."
                        (and (= ?\n (char-before))
                             (or (<= (1- (point)) (point-min))
                                 (= ?\n (char-before (1- (point)))))))
-             (insert "\n"))
+             (insert hard-newline))
            ;; Move to the end of it to terminate outer loop.
            (with-current-buffer other-buf
              (goto-char (point-max)))