]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cperl-mode.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / progmodes / cperl-mode.el
index cc6c8234dd24863ce45d190a8b9d5fd057e7d0b1..3b8742ee842f8ba0d1a1e3c14b0f435406a268e5 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cperl-mode.el --- Perl code editing commands for Emacs
 
-;; Copyright (C) 1985-1987, 1991-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1991-2015 Free Software Foundation, Inc.
 
 ;; Author: Ilya Zakharevich
 ;;     Bob Olson
@@ -3124,7 +3124,7 @@ and closing parentheses and brackets."
          (+ (if (or (memq (elt i 2) (append "}])" nil)) ; char-after
                      (eq 'continuation ; do not stagger continuations
                          (elt (cperl-sniff-for-indent parse-data) 0)))
-                0 ; Closing parenth or continuation of a continuation
+                0 ; Closing parenthesis or continuation of a continuation
               cperl-continued-statement-offset)
             (if (or (elt i 3)          ; is-block
                     (not (elt i 4))            ; is-brace
@@ -4828,9 +4828,9 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
       (and (memq (char-syntax (preceding-char)) '(?w ?_))
           (progn
             (backward-sexp)
-            ;; sub {BLK}, print {BLK} $data, but NOT `bless', `return', `tr'
+            ;; sub {BLK}, print {BLK} $data, but NOT `bless', `return', `tr', `constant'
             (or (and (looking-at "[a-zA-Z0-9_:]+[ \t\n\f]*[{#]") ; Method call syntax
-                     (not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\)\\>")))
+                     (not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\|constant\\)\\>")))
                 ;; sub bless::foo {}
                 (progn
                   (cperl-backward-to-noncomment (point-min))
@@ -5145,7 +5145,7 @@ Returns some position at the last line."
              (if (eq (following-char) ?\( )
                  (progn
                    (forward-sexp 1)
-                   (setq pp (point)))  ; past parenth-group
+                   (setq pp (point)))  ; past parenthesis-group
                ;; after `else' or nothing
                (if ml                  ; after `else'
                    (skip-chars-backward " \t\n")
@@ -6535,7 +6535,7 @@ side-effect of memorizing only.  Examples in `cperl-style-examples'."
     (eval '(mode-compile))))           ; Avoid a warning
 
 (declare-function Info-find-node "info"
-                 (filename nodename &optional no-going-back))
+                 (filename nodename &optional no-going-back strict-case))
 
 (defun cperl-info-buffer (type)
   ;; Returns buffer with documentation.  Creates if missing.
@@ -8900,8 +8900,9 @@ do extra unwind via `cperl-unwind-to-safe'."
                  (beginning-of-line)
                  (eq (get-text-property (setq beg (point)) 'syntax-type)
                      'multiline)))
-      (if (setq beg (cperl-beginning-of-property beg 'syntax-type))
-         (goto-char beg)))
+      (let ((new-beg (cperl-beginning-of-property beg 'syntax-type)))
+       (setq beg (if (= new-beg beg) nil new-beg))
+       (goto-char new-beg)))
     (setq beg (point))
     (goto-char end)
     (while (and end