[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cperl-mode.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cperl-mode.el |
Date: |
Wed, 26 Jun 2002 04:51:46 -0400 |
Index: emacs/lisp/progmodes/cperl-mode.el
diff -c emacs/lisp/progmodes/cperl-mode.el:1.33
emacs/lisp/progmodes/cperl-mode.el:1.34
*** emacs/lisp/progmodes/cperl-mode.el:1.33 Mon Apr 8 18:39:00 2002
--- emacs/lisp/progmodes/cperl-mode.el Wed Jun 26 04:51:45 2002
***************
*** 38,44 ****
;;; DO NOT FORGET to read micro-docs (available from `Perl' menu) <<<<<<
;;; or as help on variables `cperl-tips', `cperl-problems', <<<<<<
! ;;; `cperl-non-problems', `cperl-praise', `cperl-speed'. <<<<<<
;;; The mode information (on C-h m) provides some customization help.
;;; If you use font-lock feature of this mode, it is advisable to use
--- 38,44 ----
;;; DO NOT FORGET to read micro-docs (available from `Perl' menu) <<<<<<
;;; or as help on variables `cperl-tips', `cperl-problems', <<<<<<
! ;;; `cperl-praise', `cperl-speed'. <<<<<<
;;; The mode information (on C-h m) provides some customization help.
;;; If you use font-lock feature of this mode, it is advisable to use
***************
*** 390,396 ****
Currently only changes how scalar variables are highlighted.
Note that that variable is only read at initialization time for
the variable `cperl-font-lock-keywords-2', so changing it after you've
! entered `cperl-mode' the first time will have no effect."
:type 'boolean
:group 'cperl)
--- 390,396 ----
Currently only changes how scalar variables are highlighted.
Note that that variable is only read at initialization time for
the variable `cperl-font-lock-keywords-2', so changing it after you've
! entered CPerl mode the first time will have no effect."
:type 'boolean
:group 'cperl)
***************
*** 519,525 ****
(defcustom cperl-syntaxify-unwind
t
! "*Non-nil means that CPerl unwinds to a start of along construction
when syntaxifying a chunk of buffer."
:type 'boolean
:group 'cperl-speed)
--- 519,525 ----
(defcustom cperl-syntaxify-unwind
t
! "*Non-nil means that CPerl unwinds to a start of a long construction
when syntaxifying a chunk of buffer."
:type 'boolean
:group 'cperl-speed)
***************
*** 653,659 ****
micro-docs on what I know about CPerl problems.")
(defvar cperl-problems 'please-ignore-this-line
! "Some faces will not be shown on some versions of Emacs unless you
install choose-color.el, available from
ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/
--- 653,660 ----
micro-docs on what I know about CPerl problems.")
(defvar cperl-problems 'please-ignore-this-line
! "Description of problems in CPerl mode.
! Some faces will not be shown on some versions of Emacs unless you
install choose-color.el, available from
ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/
***************
*** 701,763 ****
environment and cannot recompile), you may still disable all the fancy stuff
via `cperl-use-syntax-table-text-property'." )
- (defvar cperl-non-problems 'please-ignore-this-line
- "As you know from `problems' section, Perl syntax is too hard for CPerl on
- older Emacsen. Here is what you can do if you cannot upgrade, or if
- you want to switch off these capabilities on Emacs 20.2 (+patches) or 20.3
- or better. Please skip this docs if you run a capable Emacs already.
-
- Most of the time, if you write your own code, you may find an equivalent
- \(and almost as readable) expression (what is discussed below is usually
- not relevant on newer Emacsen, since they can do it automatically).
-
- Try to help CPerl: add comments with embedded quotes to fix CPerl
- misunderstandings about the end of quotation:
-
- $a='500$'; # ';
-
- You won't need it too often. The reason: $ \"quotes\" the following
- character (this saves a life a lot of times in CPerl), thus due to
- Emacs parsing rules it does not consider tick (i.e., ' ) after a
- dollar as a closing one, but as a usual character. This is usually
- correct, but not in the above context.
-
- Even with older Emacsen the indentation code is pretty wise. The only
- drawback is that it relied on Emacs parsing to find matching
- parentheses. And Emacs *could not* match parentheses in Perl 100%
- correctly. So
- 1 if s#//#/#;
- would not break indentation, but
- 1 if ( s#//#/# );
- would. Upgrade.
-
- By similar reasons
- s\"abc\"def\";
- could confuse CPerl a lot.
-
- If you still get wrong indentation in situation that you think the
- code should be able to parse, try:
-
- a) Check what Emacs thinks about balance of your parentheses.
- b) Supply the code to me (IZ).
-
- Pods were treated _very_ rudimentally. Here-documents were not
- treated at all (except highlighting and inhibiting indentation). Upgrade.
-
- To speed up coloring the following compromises exist:
- a) sub in $mypackage::sub may be highlighted.
- b) -z in [a-z] may be highlighted.
- c) if your regexp contains a keyword (like \"s\"), it may be highlighted.
-
-
- Imenu in 19.31 is broken. Set `imenu-use-keymap-menu' to t, and remove
- `car' before `imenu-choose-buffer-index' in `imenu'.
- `imenu-add-to-menubar' in 20.2 is broken.
-
- A lot of things on XEmacs may be broken too, judging by bug reports I
- receive. Note that some releases of XEmacs are better than the others
- as far as bugs reports I see are concerned.")
-
(defvar cperl-praise 'please-ignore-this-line
"Advantages of CPerl mode.
--- 702,707 ----
***************
*** 987,993 ****
to cperl-do-not-fontify t)))
(defcustom cperl-mode-hook nil
! "Hook run by `cperl-mode'."
:type 'hook
:group 'cperl)
--- 931,937 ----
to cperl-do-not-fontify t)))
(defcustom cperl-mode-hook nil
! "Hook run by CPerl mode."
:type 'hook
:group 'cperl)
***************
*** 1041,1047 ****
(require 'cl))
(defvar cperl-mode-abbrev-table nil
! "Abbrev table in use in Cperl-mode buffers.")
(add-hook 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-")))
--- 985,991 ----
(require 'cl))
(defvar cperl-mode-abbrev-table nil
! "Abbrev table in use in CPerl mode buffers.")
(add-hook 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-")))
***************
*** 1226,1232 ****
("Micro-docs"
["Tips" (describe-variable 'cperl-tips) t]
["Problems" (describe-variable 'cperl-problems) t]
- ["Non-problems" (describe-variable 'cperl-non-problems) t]
["Speed" (describe-variable 'cperl-speed) t]
["Praise" (describe-variable 'cperl-praise) t]
["Faces" (describe-variable 'cperl-tips-faces) t]
--- 1170,1175 ----
***************
*** 1253,1262 ****
(concat cperl-imenu--function-name-regexp-perl "\\|" "\\`"))
(defvar cperl-mode-syntax-table nil
! "Syntax table in use in Cperl-mode buffers.")
(defvar cperl-string-syntax-table nil
! "Syntax table in use in Cperl-mode string-like chunks.")
(if cperl-mode-syntax-table
()
--- 1196,1205 ----
(concat cperl-imenu--function-name-regexp-perl "\\|" "\\`"))
(defvar cperl-mode-syntax-table nil
! "Syntax table in use in CPerl mode buffers.")
(defvar cperl-string-syntax-table nil
! "Syntax table in use in CPerl mode string-like chunks.")
(if cperl-mode-syntax-table
()
***************
*** 1303,1309 ****
well, with optional special formatting done on {}. (Disabled by
default.) You can always quote (with \\[quoted-insert]) the left
\"paren\" to avoid the expansion. The processing of < is special,
! since most the time you mean \"less\". Cperl mode tries to guess
whether you want to type pair <>, and inserts is if it
appropriate. You can set `cperl-electric-parens-string' to the string that
contains the parenths from the above list you want to be electrical.
--- 1246,1252 ----
well, with optional special formatting done on {}. (Disabled by
default.) You can always quote (with \\[quoted-insert]) the left
\"paren\" to avoid the expansion. The processing of < is special,
! since most the time you mean \"less\". CPerl mode tries to guess
whether you want to type pair <>, and inserts is if it
appropriate. You can set `cperl-electric-parens-string' to the string that
contains the parenths from the above list you want to be electrical.
***************
*** 1454,1460 ****
DO NOT FORGET to read micro-docs (available from `Perl' menu)
or as help on variables `cperl-tips', `cperl-problems',
! `cperl-non-problems', `cperl-praise', `cperl-speed'."
(interactive)
(kill-all-local-variables)
(use-local-map cperl-mode-map)
--- 1397,1403 ----
DO NOT FORGET to read micro-docs (available from `Perl' menu)
or as help on variables `cperl-tips', `cperl-problems',
! `cperl-praise', `cperl-speed'."
(interactive)
(kill-all-local-variables)
(use-local-map cperl-mode-map)
***************
*** 2626,2632 ****
(- (current-indentation) cperl-label-offset)
;; Do not move `parse-data', this should
;; be quick anyway (this comment comes
! ;;from different location):
(cperl-calculate-indent))
(current-column))
(if (eq char-after ?\{)
--- 2569,2575 ----
(- (current-indentation) cperl-label-offset)
;; Do not move `parse-data', this should
;; be quick anyway (this comment comes
! ;; from different location):
(cperl-calculate-indent))
(current-column))
(if (eq char-after ?\{)
***************
*** 5140,5146 ****
Should be used via `cperl-set-style' or via Perl menu.")
(defun cperl-set-style (style)
! "Set CPerl-mode variables to use one of several different indentation
styles.
The arguments are a string representing the desired style.
The list of styles is in `cperl-style-alist', available styles
are GNU, K&R, BSD, C++ and Whitesmith.
--- 5083,5089 ----
Should be used via `cperl-set-style' or via Perl menu.")
(defun cperl-set-style (style)
! "Set CPerl mode variables to use one of several different indentation
styles.
The arguments are a string representing the desired style.
The list of styles is in `cperl-style-alist', available styles
are GNU, K&R, BSD, C++ and Whitesmith.
***************
*** 5209,5215 ****
(current-buffer)))))
(defun cperl-word-at-point (&optional p)
! ;; Returns the word at point or at P.
(save-excursion
(if p (goto-char p))
(or (cperl-word-at-point-hard)
--- 5152,5158 ----
(current-buffer)))))
(defun cperl-word-at-point (&optional p)
! "Return the word at point or at P."
(save-excursion
(if p (goto-char p))
(or (cperl-word-at-point-hard)
***************
*** 5223,5229 ****
'find-tag-default))))))
(defun cperl-info-on-command (command)
! "Show documentation for Perl command in other window.
If perl-info buffer is shown in some frame, uses this frame.
Customized by setting variables `cperl-shrink-wrap-info-frame',
`cperl-max-help-size'."
--- 5166,5172 ----
'find-tag-default))))))
(defun cperl-info-on-command (command)
! "Show documentation for Perl command COMMAND in other window.
If perl-info buffer is shown in some frame, uses this frame.
Customized by setting variables `cperl-shrink-wrap-info-frame',
`cperl-max-help-size'."
***************
*** 5738,5744 ****
"\\)"))
(defvar cperl-hierarchy '(() ())
! "Global hierarchy of classes")
(defun cperl-tags-hier-fill ()
;; Suppose we are in a tag table cooked by cperl.
--- 5681,5687 ----
"\\)"))
(defvar cperl-hierarchy '(() ())
! "Global hierarchy of classes.")
(defun cperl-tags-hier-fill ()
;; Suppose we are in a tag table cooked by cperl.
***************
*** 6803,6809 ****
(insert " "))
(skip-chars-forward " \t"))
(or (looking-at "[#\n]")
! (error "unknown code \"%s\" in a regexp"
(buffer-substring (point) (1+ (point)))))
(and inline (end-of-line 2)))
;; Special-case the last line of group
--- 6746,6752 ----
(insert " "))
(skip-chars-forward " \t"))
(or (looking-at "[#\n]")
! (error "Unknown code `%s' in a regexp"
(buffer-substring (point) (1+ (point)))))
(and inline (end-of-line 2)))
;; Special-case the last line of group
***************
*** 6851,6857 ****
b)))
(defun cperl-beautify-regexp (&optional deep)
! "do it. (Experimental, may change semantics, recheck the result.)
We suppose that the regexp is scanned already."
(interactive "P")
(if deep
--- 6794,6800 ----
b)))
(defun cperl-beautify-regexp (&optional deep)
! "Do it. (Experimental, may change semantics, recheck the result.)
We suppose that the regexp is scanned already."
(interactive "P")
(if deep
***************
*** 7023,7029 ****
(cperl-indent-line))
(error "`%s' (EXPR) not with an {BLOCK}" s0)))
(error "`%s' not with an (EXPR)" s0)))
! (error "Not at `if', `unless', `while', `unless', `for' or `foreach'")))
;;; By Anthony Foiani <address@hidden>
;;; Getting help on modules in C-h f ?
--- 6966,6972 ----
(cperl-indent-line))
(error "`%s' (EXPR) not with an {BLOCK}" s0)))
(error "`%s' not with an (EXPR)" s0)))
! (error "Not at `if', `unless', `while', `until', `for' or `foreach'")))
;;; By Anthony Foiani <address@hidden>
;;; Getting help on modules in C-h f ?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/cperl-mode.el,
Richard M. Stallman <=