emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/progmodes/cperl-mode.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cperl-mode.el
Date: Tue, 30 Aug 2005 06:46:43 -0400

Index: emacs/lisp/progmodes/cperl-mode.el
diff -c emacs/lisp/progmodes/cperl-mode.el:1.74 
emacs/lisp/progmodes/cperl-mode.el:1.75
*** emacs/lisp/progmodes/cperl-mode.el:1.74     Mon Aug  1 08:37:48 2005
--- emacs/lisp/progmodes/cperl-mode.el  Tue Aug 30 10:46:43 2005
***************
*** 68,73 ****
--- 68,76 ----
  
  ;;; Code:
  
+ (defvar vc-rcs-header)
+ (defvar vc-sccs-header)
+ 
  ;; Some macros are needed for `defcustom'
  (eval-when-compile
    (condition-case nil
***************
*** 1775,1781 ****
         (save-excursion
           (skip-chars-backward "$")
           (looking-at "\\(\\$\\$\\)*\\$\\([^\\$]\\|$\\)"))
!        (insert ?\ ))
      ;; Check whether we are in comment
      (if (and
         (save-excursion
--- 1778,1784 ----
         (save-excursion
           (skip-chars-backward "$")
           (looking-at "\\(\\$\\$\\)*\\$\\([^\\$]\\|$\\)"))
!        (insert ?\s))
      ;; Check whether we are in comment
      (if (and
         (save-excursion
***************
*** 1871,1877 ****
    (let ((beg (save-excursion (beginning-of-line) (point)))
        (dollar (and (eq last-command-char ?$)
                     (eq this-command 'self-insert-command)))
!       (delete (and (memq last-command-char '(?\  ?\n ?\t ?\f))
                     (memq this-command '(self-insert-command newline))))
        my do)
      (and (save-excursion
--- 1874,1880 ----
    (let ((beg (save-excursion (beginning-of-line) (point)))
        (dollar (and (eq last-command-char ?$)
                     (eq this-command 'self-insert-command)))
!       (delete (and (memq last-command-char '(?\s ?\n ?\t ?\f))
                     (memq this-command '(self-insert-command newline))))
        my do)
      (and (save-excursion
***************
*** 1946,1952 ****
  
  (defun cperl-electric-pod ()
    "Insert a POD chunk appropriate after a =POD directive."
!   (let ((delete (and (memq last-command-char '(?\  ?\n ?\t ?\f))
                     (memq this-command '(self-insert-command newline))))
        head1 notlast name p really-delete over)
      (and (save-excursion
--- 1949,1955 ----
  
  (defun cperl-electric-pod ()
    "Insert a POD chunk appropriate after a =POD directive."
!   (let ((delete (and (memq last-command-char '(?\s ?\n ?\t ?\f))
                     (memq this-command '(self-insert-command newline))))
        head1 notlast name p really-delete over)
      (and (save-excursion
***************
*** 2224,2230 ****
           (memq last-command '(cperl-electric-semi
                                cperl-electric-terminator
                                cperl-electric-lbrace))
!          (memq (preceding-char) '(?\  ?\t ?\n)))
        (let (p)
        (if (eq last-command 'cperl-electric-lbrace)
            (skip-chars-forward " \t\n"))
--- 2227,2233 ----
           (memq last-command '(cperl-electric-semi
                                cperl-electric-terminator
                                cperl-electric-lbrace))
!          (memq (preceding-char) '(?\s ?\t ?\n)))
        (let (p)
        (if (eq last-command 'cperl-electric-lbrace)
            (skip-chars-forward " \t\n"))
***************
*** 2236,2242 ****
         (setq this-command 'cperl-electric-else-really))
      (if (and cperl-auto-newline
             (eq last-command 'cperl-electric-else-really)
!            (memq (preceding-char) '(?\  ?\t ?\n)))
        (let (p)
          (skip-chars-forward " \t\n")
          (setq p (point))
--- 2239,2245 ----
         (setq this-command 'cperl-electric-else-really))
      (if (and cperl-auto-newline
             (eq last-command 'cperl-electric-else-really)
!            (memq (preceding-char) '(?\s ?\t ?\n)))
        (let (p)
          (skip-chars-forward " \t\n")
          (setq p (point))
***************
*** 3039,3045 ****
              (progn
                (setq i (point) i2 i)
                (if ender
!                   (if (memq (following-char) '(?\  ?\t ?\n ?\f))
                        (progn
                          (if (looking-at "[ \t\n\f]+\\(#[^\n]*\n[ 
\t\n\f]*\\)+")
                              (goto-char (match-end 0))
--- 3042,3048 ----
              (progn
                (setq i (point) i2 i)
                (if ender
!                   (if (memq (following-char) '(?\s ?\t ?\n ?\f))
                        (progn
                          (if (looking-at "[ \t\n\f]+\\(#[^\n]*\n[ 
\t\n\f]*\\)+")
                              (goto-char (match-end 0))
***************
*** 4031,4037 ****
              (setq p (point))
              (skip-chars-forward " \t\n")
              (delete-region p (point))
!             (insert (make-string cperl-indent-region-fix-constructs ?\ ))
              (beginning-of-line)))
        ;; Looking at:
        ;; }     else
--- 4034,4040 ----
              (setq p (point))
              (skip-chars-forward " \t\n")
              (delete-region p (point))
!             (insert (make-string cperl-indent-region-fix-constructs ?\s))
              (beginning-of-line)))
        ;; Looking at:
        ;; }     else
***************
*** 4039,4045 ****
            (progn
              (search-forward "}")
              (delete-horizontal-space)
!             (insert (make-string cperl-indent-region-fix-constructs ?\ ))
              (beginning-of-line)))
        ;; Looking at:
        ;; else   {
--- 4042,4048 ----
            (progn
              (search-forward "}")
              (delete-horizontal-space)
!             (insert (make-string cperl-indent-region-fix-constructs ?\s))
              (beginning-of-line)))
        ;; Looking at:
        ;; else   {
***************
*** 4048,4054 ****
            (progn
              (forward-word 1)
              (delete-horizontal-space)
!             (insert (make-string cperl-indent-region-fix-constructs ?\ ))
              (beginning-of-line)))
        ;; Looking at:
        ;; foreach my    $var
--- 4051,4057 ----
            (progn
              (forward-word 1)
              (delete-horizontal-space)
!             (insert (make-string cperl-indent-region-fix-constructs ?\s))
              (beginning-of-line)))
        ;; Looking at:
        ;; foreach my    $var
***************
*** 4057,4063 ****
            (progn
              (forward-word 2)
              (delete-horizontal-space)
!             (insert (make-string cperl-indent-region-fix-constructs ?\ ))
              (beginning-of-line)))
        ;; Looking at:
        ;; foreach my $var     (
--- 4060,4066 ----
            (progn
              (forward-word 2)
              (delete-horizontal-space)
!             (insert (make-string cperl-indent-region-fix-constructs ?\s))
              (beginning-of-line)))
        ;; Looking at:
        ;; foreach my $var     (
***************
*** 4067,4073 ****
              (forward-sexp 3)
              (delete-horizontal-space)
              (insert
!              (make-string cperl-indent-region-fix-constructs ?\ ))
              (beginning-of-line)))
        ;; Looking at:
        ;; } foreach my $var ()    {
--- 4070,4076 ----
              (forward-sexp 3)
              (delete-horizontal-space)
              (insert
!              (make-string cperl-indent-region-fix-constructs ?\s))
              (beginning-of-line)))
        ;; Looking at:
        ;; } foreach my $var ()    {
***************
*** 4111,4117 ****
                                  (cperl-fix-line-spacing end parse-data)
                                  (setq ret (point)))))
                        (insert
!                        (make-string cperl-indent-region-fix-constructs ?\ ))))
                     ((and (looking-at "[ \t]*\n")
                           (not (if ml
                                    cperl-extra-newline-before-brace-multiline
--- 4114,4120 ----
                                  (cperl-fix-line-spacing end parse-data)
                                  (setq ret (point)))))
                        (insert
!                        (make-string cperl-indent-region-fix-constructs ?\s))))
                     ((and (looking-at "[ \t]*\n")
                           (not (if ml
                                    cperl-extra-newline-before-brace-multiline
***************
*** 4120,4126 ****
                      (skip-chars-forward " \t\n")
                      (delete-region pp (point))
                      (insert
!                      (make-string cperl-indent-region-fix-constructs ?\ ))))
                    ;; Now we are before `{'
                    (if (looking-at "[ \t\n]*{[ \t]*[^ \t\n#]")
                        (progn
--- 4123,4129 ----
                      (skip-chars-forward " \t\n")
                      (delete-region pp (point))
                      (insert
!                      (make-string cperl-indent-region-fix-constructs ?\s))))
                    ;; Now we are before `{'
                    (if (looking-at "[ \t\n]*{[ \t]*[^ \t\n#]")
                        (progn
***************
*** 4297,4303 ****
        (looking-at "#+[ \t]*")
        (setq start (point) c (current-column)
              comment-fill-prefix
!             (concat (make-string (current-column) ?\ )
                      (buffer-substring (match-beginning 0) (match-end 0)))
              spaces (progn (skip-chars-backward " \t")
                            (buffer-substring (point) start))
--- 4300,4306 ----
        (looking-at "#+[ \t]*")
        (setq start (point) c (current-column)
              comment-fill-prefix
!             (concat (make-string (current-column) ?\s)
                      (buffer-substring (match-beginning 0) (match-end 0)))
              spaces (progn (skip-chars-backward " \t")
                            (buffer-substring (point) start))
***************
*** 5449,5455 ****
            (setq e (point))
            (skip-chars-backward " \t")
            (delete-region (point) e)
!           (indent-to-column col) ;(make-string (- col (current-column)) ?\ ))
            (beginning-of-line 2)
            (and (< (point) end)
                 (re-search-forward search end t)
--- 5452,5458 ----
            (setq e (point))
            (skip-chars-backward " \t")
            (delete-region (point) e)
!           (indent-to-column col) ;(make-string (- col (current-column)) ?\s))
            (beginning-of-line 2)
            (and (< (point) end)
                 (re-search-forward search end t)




reply via email to

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