From: "Ville Skyttä" <ville.skytta@xemacs.org>
Subject: [PATCH] Typo fixes for cperl-mode.el
Date: 23 Jun 2002 18:54:02 +0300 [thread overview]
Message-ID: <1024847643.7990.34.camel@bobcat.ods.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
Hi, attached is a patch with some typo fixes to cperl-mode.el (against
the cperl-mode.el version 1.33 in Emacs CVS).
Cheers,
--
Ville Skyttä
ville.skytta at xemacs.org
[-- Attachment #2: cperl-typos.patch --]
[-- Type: text/plain, Size: 19373 bytes --]
--- cperl-mode.el.1.33 Sun Jun 23 18:02:26 2002
+++ cperl-mode.el Sun Jun 23 18:36:29 2002
@@ -390,7 +390,7 @@
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."
+entered CPerl mode the first time will have no effect."
:type 'boolean
:group 'cperl)
@@ -510,8 +510,8 @@
:type 'boolean
:group 'cperl-indentation-details)
-(defcustom cperl-syntaxify-by-font-lock
- (and window-system
+(defcustom cperl-syntaxify-by-font-lock
+ (and window-system
(boundp 'parse-sexp-lookup-properties))
"*Non-nil means that CPerl uses `font-lock's routines for syntaxification."
:type '(choice (const message) boolean)
@@ -519,7 +519,7 @@
(defcustom cperl-syntaxify-unwind
t
- "*Non-nil means that CPerl unwinds to a start of along construction
+ "*Non-nil means that CPerl unwinds to a start of a long construction
when syntaxifying a chunk of buffer."
:type 'boolean
:group 'cperl-speed)
@@ -621,7 +621,7 @@
(defalias 'perl-mode 'cperl-mode)
-Get perl5-info from
+Get perl5-info from
$CPAN/doc/manual/info/perl-info.tar.gz
older version was on
http://www.metronet.com:70/9/perlinfo/perl5/manual/perl5-info.tar.gz
@@ -653,7 +653,7 @@
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
+ "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/
@@ -702,7 +702,7 @@
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
+ "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.
@@ -897,7 +897,7 @@
syntaxically to be not code
`font-lock-constant-face' HERE-doc delimiters, labels, delimiters of
2-arg operators s/y/tr/ or of RExen,
- `font-lock-function-name-face' Special-cased m// and s//foo/, _ as
+ `font-lock-function-name-face' Special-cased m// and s//foo/, _ as
a target of a file tests, file tests,
subroutine names at the moment of definition
(except those conflicting with Perl operators),
@@ -987,7 +987,7 @@
to cperl-do-not-fontify t)))
(defcustom cperl-mode-hook nil
- "Hook run by `cperl-mode'."
+ "Hook run by CPerl mode."
:type 'hook
:group 'cperl)
@@ -1041,7 +1041,7 @@
(require 'cl))
(defvar cperl-mode-abbrev-table nil
- "Abbrev table in use in Cperl-mode buffers.")
+ "Abbrev table in use in CPerl mode buffers.")
(add-hook 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-")))
@@ -1253,10 +1253,10 @@
(concat cperl-imenu--function-name-regexp-perl "\\|" "\\`"))
(defvar cperl-mode-syntax-table nil
- "Syntax table in use in Cperl-mode buffers.")
+ "Syntax table in use in CPerl mode buffers.")
(defvar cperl-string-syntax-table nil
- "Syntax table in use in Cperl-mode string-like chunks.")
+ "Syntax table in use in CPerl mode string-like chunks.")
(if cperl-mode-syntax-table
()
@@ -1303,7 +1303,7 @@
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
+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.
@@ -1968,7 +1968,7 @@
head1 notlast name p really-delete over)
(and (save-excursion
(forward-word -1)
- (and
+ (and
(eq (preceding-char) ?=)
(progn
(setq head1 (looking-at "head1\\>[ \t]*$"))
@@ -1980,8 +1980,8 @@
(get-text-property (point) 'in-pod)
(cperl-after-expr-p nil "{;:")
(and (re-search-backward
- ;; "\\(\\`\n?\\|\n\n\\)=\\sw+"
- "\\(\\`\n?\\|^\n\\)=\\sw+"
+ ;; "\\(\\`\n?\\|\n\n\\)=\\sw+"
+ "\\(\\`\n?\\|^\n\\)=\\sw+"
(point-min) t)
(not (or
(looking-at "=cut")
@@ -1996,13 +1996,13 @@
(insert "\n\n=cut")
(cperl-ensure-newlines 2)
(forward-word -2)
- (if (and head1
- (not
+ (if (and head1
+ (not
(save-excursion
(forward-char -1)
(re-search-backward "\\(\\`\n?\\|\n\n\\)=head1\\>"
nil t)))) ; Only one
- (progn
+ (progn
(forward-word 1)
(setq name (file-name-sans-extension
(file-name-nondirectory (buffer-file-name)))
@@ -2524,7 +2524,7 @@
(list pre-indent-point)))
0)
cperl-continued-statement-offset))))
- ((not
+ ((not
(or (setq is-block
(and (setq delim (= (char-after containing-sexp) ?{))
(save-excursion ; Is it a hash?
@@ -2575,7 +2575,7 @@
;;; (skip-chars-forward " \t"))
;;; (+ (current-column) ; Correct indentation of trailing ?\}
;;; (if (eq char-after ?\}) (+ cperl-indent-level
-;;; cperl-close-paren-offset)
+;;; cperl-close-paren-offset)
;;; 0)))
(t
;; Statement level. Is it a continuation or a new statement?
@@ -2602,7 +2602,7 @@
(memq (preceding-char)
(append (if is-block " ;{" " ,;{") '(nil)))
(and (eq (preceding-char) ?\})
- (cperl-after-block-and-statement-beg
+ (cperl-after-block-and-statement-beg
containing-sexp))))
;; This line is continuation of preceding line's statement;
;; indent `cperl-continued-statement-offset' more than the
@@ -2615,7 +2615,7 @@
(+ (if (memq char-after (append "}])" nil))
0 ; Closing parenth
cperl-continued-statement-offset)
- (if (or is-block
+ (if (or is-block
(not delim)
(not (eq char-after ?\})))
0
@@ -2626,7 +2626,7 @@
(- (current-indentation) cperl-label-offset)
;; Do not move `parse-data', this should
;; be quick anyway (this comment comes
- ;;from different location):
+ ;; from different location):
(cperl-calculate-indent))
(current-column))
(if (eq char-after ?\{)
@@ -2676,7 +2676,7 @@
(+ (if (and (bolp) (zerop cperl-indent-level))
(+ cperl-brace-offset cperl-continued-statement-offset)
cperl-indent-level)
- (if (or is-block
+ (if (or is-block
(not delim)
(not (eq char-after ?\})))
0
@@ -3155,7 +3155,7 @@
(or max (setq max (point-max)))
(let* (face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb
is-REx is-x-REx REx-comment-start REx-comment-end was-comment i2
- (cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend
+ (cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend
(case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t)
(modified (buffer-modified-p))
(after-change-functions nil)
@@ -3179,11 +3179,11 @@
(if (boundp 'font-lock-function-name-face)
font-lock-function-name-face
'font-lock-function-name-face))
- (font-lock-comment-face
+ (font-lock-comment-face
(if (boundp 'font-lock-comment-face)
font-lock-comment-face
'font-lock-comment-face))
- (cperl-nonoverridable-face
+ (cperl-nonoverridable-face
(if (boundp 'cperl-nonoverridable-face)
cperl-nonoverridable-face
'cperl-nonoverridable-face))
@@ -3192,7 +3192,7 @@
max))
(search
(concat
- "\\(\\`\n?\\|^\n\\)="
+ "\\(\\`\n?\\|^\n\\)="
"\\|"
;; One extra () before this:
"<<"
@@ -3266,7 +3266,7 @@
(setq tmpend nil) ; Valid for most cases
(cond
((match-beginning 1) ; POD section
- ;; "\\(\\`\n?\\|^\n\\)="
+ ;; "\\(\\`\n?\\|^\n\\)="
(if (looking-at "cut\\>")
(if ignore-max
nil ; Doing a chunk only
@@ -3292,7 +3292,7 @@
(setq e (point))
(and (> e max)
(progn
- (remove-text-properties
+ (remove-text-properties
max e '(syntax-type t in-pod t syntax-table t
cperl-postpone t
syntax-subtype t
@@ -3308,22 +3308,22 @@
(put-text-property (cperl-1- b) (point) 'syntax-type 'pod)
(cperl-put-do-not-fontify b (point) t)
;; mark the non-literal parts as PODs
- (if cperl-pod-here-fontify
+ (if cperl-pod-here-fontify
(cperl-postpone-fontification b (point) 'face face t))
(re-search-forward "\n\n[^ \t\f\n]" e 'toend)
(beginning-of-line)
(setq b (point)))
(put-text-property (cperl-1- (point)) e 'syntax-type 'pod)
(cperl-put-do-not-fontify (point) e t)
- (if cperl-pod-here-fontify
- (progn
+ (if cperl-pod-here-fontify
+ (progn
;; mark the non-literal parts as PODs
(cperl-postpone-fontification (point) e 'face face t)
(goto-char bb)
- (if (looking-at
+ (if (looking-at
"=[a-zA-Z0-9_]+\\>[ \t]*\\(\\(\n?[^\n]\\)+\\)$")
;; mark the headers
- (cperl-postpone-fontification
+ (cperl-postpone-fontification
(match-beginning 1) (match-end 1)
'face head-face))
(while (re-search-forward
@@ -3331,7 +3331,7 @@
"^\n=[a-zA-Z0-9_]+\\>[ \t]*\\(\\(\n?[^\n]\\)+\\)$"
e 'toend)
;; mark the headers
- (cperl-postpone-fontification
+ (cperl-postpone-fontification
(match-beginning 1) (match-end 1)
'face head-face))))
(cperl-commentify bb e nil)
@@ -3616,15 +3616,15 @@
(progn
(forward-word 1) ; skip modifiers s///s
(if tail (cperl-commentify tail (point) t))
- (cperl-postpone-fontification
+ (cperl-postpone-fontification
e1 (point) 'face 'cperl-nonoverridable-face)))
;; Check whether it is m// which means "previous match"
;; and highlight differently
- (setq is-REx
+ (setq is-REx
(and (string-match "^\\([sm]?\\|qr\\)$" argument)
(or (not (= (length argument) 0))
(not (eq c ?\<)))))
- (if (and is-REx
+ (if (and is-REx
(eq e (+ 2 b))
;; split // *is* using zero-pattern
(save-excursion
@@ -3674,7 +3674,7 @@
(progn (setq was-comment nil)
(forward-char 1))
(if (match-beginning 2)
- (progn
+ (progn
(beginning-of-line 2)
(if (> (point) e)
(goto-char (1- e))))
@@ -3690,11 +3690,11 @@
(setq REx-comment-end (point))
(cperl-commentify
REx-comment-start REx-comment-end nil)
- (cperl-postpone-fontification
+ (cperl-postpone-fontification
REx-comment-start REx-comment-end
'face font-lock-comment-face))))))
(if (and is-REx is-x-REx)
- (put-text-property (1+ b) (1- e)
+ (put-text-property (1+ b) (1- e)
'syntax-subtype 'x-REx)))
(if i2
(progn
@@ -3766,7 +3766,7 @@
(goto-char b)
(skip-chars-backward "\\\\")
;;;(setq i2 (= (% (skip-chars-backward "\\\\") 2) -1))
- (setq state (parse-partial-sexp
+ (setq state (parse-partial-sexp
state-point b nil nil state)
state-point b)
(if (or (nth 3 state) (nth 4 state) )
@@ -3977,7 +3977,7 @@
(beginning-of-line)))
;; Looking at:
;; foreach my $var
- (if (looking-at
+ (if (looking-at
"[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)\\(\t*\\|[ \t][ \t]+\\)[^ \t\n]")
(progn
(forward-word 2)
@@ -3986,7 +3986,7 @@
(beginning-of-line)))
;; Looking at:
;; foreach my $var (
- (if (looking-at
+ (if (looking-at
"[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)[ \t]*\\$[_a-zA-Z0-9]+\\(\t*\\|[ \t][ \t]+\\)[^ \t\n#]")
(progn
(forward-word 3)
@@ -3996,7 +3996,7 @@
(beginning-of-line)))
;; Looking at:
;; } foreach my $var () {
- (if (looking-at
+ (if (looking-at
"[ \t]*\\(}[ \t]*\\)?\\<\\(\\els\\(e\\|if\\)\\|continue\\|if\\|unless\\|while\\|for\\(each\\)?\\(\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\$[_a-zA-Z0-9]+\\)?\\|until\\)\\>\\([ \t]*(\\|[ \t\n]*{\\)\\|[ \t]*{")
(progn
(setq ml (match-beginning 8))
@@ -4390,7 +4390,7 @@
marker (make-marker))
(set-text-properties 0 (length name) nil name)
(set-marker marker (match-end 3))
- (if (eq fchar ?p)
+ (if (eq fchar ?p)
(setq name (concat "package " name))
(cond ((string-match "[:']" name)
(setq meth t))
@@ -4398,7 +4398,7 @@
(t
(setq name (concat package name) meth t))))
(setq index (cons name marker))
- (if (eq fchar ?p)
+ (if (eq fchar ?p)
(push index index-pack-alist)
(push index index-alist))
(if meth (push index index-meth-alist))
@@ -4487,7 +4487,7 @@
(t 3))) ; should not happen
\f
-(defvar cperl-compilation-error-regexp-alist
+(defvar cperl-compilation-error-regexp-alist
;; This look like a paranoiac regexp: could anybody find a better one? (which WORK).
'(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]"
2 3))
@@ -4716,7 +4716,7 @@
3 font-lock-variable-name-face)))
'("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*("
4 font-lock-variable-name-face)))
- (setq
+ (setq
t-font-lock-keywords-1
(and (fboundp 'turn-on-font-lock) ; Check for newer font-lock
(not cperl-xemacs-p) ; not yet as of XEmacs 19.12
@@ -5140,7 +5140,7 @@
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.
+ "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,7 +5209,7 @@
(current-buffer)))))
(defun cperl-word-at-point (&optional p)
- ;; Returns the word at point or at P.
+ "Return the word at point or at P."
(save-excursion
(if p (goto-char p))
(or (cperl-word-at-point-hard)
@@ -5223,7 +5223,7 @@
'find-tag-default))))))
(defun cperl-info-on-command (command)
- "Show documentation for Perl command in other window.
+ "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'."
@@ -5562,7 +5562,7 @@
(format "File %s unreadable. Continue? " ifile))
(setq cperl-unreadable-ok t)
(error "Aborting: unreadable file %s" ifile)))))
- (if (not file)
+ (if (not file)
(message "Unreadable file %s" ifile)
(message "Scanning file %s ..." file)
(if (and cperl-use-syntax-table-text-property-for-tags
@@ -5672,16 +5672,16 @@
(erase
(erase-buffer)
(setq erase 'ignore)))
- (let ((files
+ (let ((files
(condition-case err
- (directory-files file t
+ (directory-files file t
(if recurse nil cperl-scan-files-regexp)
t)
(error
(if cperl-unreadable-ok nil
(if (y-or-n-p
(format "Directory %s unreadable. Continue? " file))
- (setq cperl-unreadable-ok t
+ (setq cperl-unreadable-ok t
tm nil) ; Return empty list
(error "Aborting: unreadable directory %s" file)))))))
(mapcar (function (lambda (file)
@@ -5738,7 +5738,7 @@
"\\)"))
(defvar cperl-hierarchy '(() ())
- "Global hierarchy of classes")
+ "Global hierarchy of classes.")
(defun cperl-tags-hier-fill ()
;; Suppose we are in a tag table cooked by cperl.
@@ -6636,7 +6636,7 @@
;; b is before the starting delimiter, e before the ending
;; e should be a marker, may be changed, but remains "correct".
;; EMBED is nil iff we process the whole REx.
- ;; The REx is guarantied to have //x
+ ;; The REx is guaranteed to have //x
;; LEVEL shows how many levels deep to go
;; position at enter and at leave is not defined
(let (s c tmp (m (make-marker)) (m1 (make-marker)) c1 spaces inline code pos)
@@ -6739,7 +6739,7 @@
(set-marker m1 (point))
(if (= level 1)
(if (progn ; indent rigidly if multiline
- ;; In fact does not make a lot of sense, since
+ ;; In fact does not make a lot of sense, since
;; the starting position can be already lost due
;; to insertion of "\n" and " "
(goto-char tmp)
@@ -6803,7 +6803,7 @@
(insert " "))
(skip-chars-forward " \t"))
(or (looking-at "[#\n]")
- (error "unknown code \"%s\" in a regexp"
+ (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,7 +6851,7 @@
b)))
(defun cperl-beautify-regexp (&optional deep)
- "do it. (Experimental, may change semantics, recheck the result.)
+ "Do it. (Experimental, may change semantics, recheck the result.)
We suppose that the regexp is scanned already."
(interactive "P")
(if deep
@@ -6891,7 +6891,7 @@
(set-marker e (1- (point)))
(goto-char b)
(while (re-search-forward "\\(#\\)\\|\n" e 'to-end)
- (cond
+ (cond
((match-beginning 1) ; #-comment
(or c (setq c (current-indentation)))
(beginning-of-line 2) ; Skip
@@ -6918,7 +6918,7 @@
(set-marker e (1- (point)))
(goto-char (1+ b))
(while (re-search-forward "\\(\\\\\\\\\\)\\|(" e t)
- (cond
+ (cond
((match-beginning 1) ; Skip
nil)
(t ; Group
@@ -7023,7 +7023,7 @@
(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'")))
+ (error "Not at `if', `unless', `while', `until', `for' or `foreach'")))
;;; By Anthony Foiani <afoiani@uswest.com>
;;; Getting help on modules in C-h f ?
@@ -7153,7 +7153,7 @@
(defun cperl-fontify-syntaxically (end)
;; Some vars for debugging only
;; (message "Syntaxifying...")
- (let (start (dbg (point)) (iend end)
+ (let (start (dbg (point)) (iend end)
(istate (car cperl-syntax-state)))
(and cperl-syntaxify-unwind
(setq end (cperl-unwind-to-safe t end)))
reply other threads:[~2002-06-23 15:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1024847643.7990.34.camel@bobcat.ods.org \
--to=ville.skytta@xemacs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).