;;; 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
(+ (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
(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))
(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")
(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.
(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