[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el,v |
Date: |
Sun, 16 Sep 2007 22:11:35 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 07/09/16 22:11:34
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.875
retrieving revision 1.876
diff -u -b -r1.875 -r1.876
--- simple.el 7 Sep 2007 19:49:17 -0000 1.875
+++ simple.el 16 Sep 2007 22:11:33 -0000 1.876
@@ -457,7 +457,7 @@
;; Mark the newline(s) `hard'.
(if use-hard-newlines
(set-hard-newline-properties
- (- (point) (if arg (prefix-numeric-value arg) 1)) (point)))
+ (- (point) (prefix-numeric-value arg)) (point)))
;; If the newline leaves the previous line blank,
;; and we have a left margin, delete that from the blank line.
(or flag
@@ -2815,7 +2815,7 @@
(defcustom yank-excluded-properties
'(read-only invisible intangible field mouse-face help-echo local-map keymap
yank-handler follow-link fontified)
- "*Text properties to discard when yanking.
+ "Text properties to discard when yanking.
The value should be a list of text properties to discard or t,
which means to discard all text properties."
:type '(choice (const :tag "All" t) (repeat symbol))
@@ -3623,7 +3623,7 @@
"Current goal column for vertical motion.
It is the column where point was
at the start of current run of vertical motion commands.
-When the `track-eol' feature is doing its job, the value is 9999.")
+When the `track-eol' feature is doing its job, the value is
`most-positive-fixnum'.")
(defcustom line-move-ignore-invisible t
"*Non-nil means \\[next-line] and \\[previous-line] ignore invisible lines.
@@ -3645,7 +3645,7 @@
(vpos (nth 1 lh))
(ypos (nth 2 lh))
(rbot (nth 3 lh))
- ppos py vs)
+ py vs)
(when (or (null lh)
(>= rbot (frame-char-height))
(<= ypos (- (frame-char-height))))
@@ -3722,11 +3722,11 @@
;; Don't count beg of empty line as end of line
;; unless we just did explicit end-of-line.
(or (not (bolp)) (eq last-command
'move-end-of-line)))
- 9999
+ most-positive-fixnum
(current-column))))
- (if (and (not (integerp selective-display))
- (not line-move-ignore-invisible))
+ (if (not (or (integerp selective-display)
+ line-move-ignore-invisible))
;; Use just newline characters.
;; Set ARG to 0 if we move as many lines as requested.
(or (if (> arg 0)
@@ -3965,7 +3965,8 @@
(not (bobp))
(progn
(while (and (not (bobp)) (invisible-p (1- (point))))
- (goto-char (previous-char-property-change (point))))
+ (goto-char (previous-single-char-property-change
+ (point) 'invisible)))
(backward-char 1)))
(point)))))
(goto-char newpos)
@@ -3992,7 +3993,7 @@
(or arg (setq arg 1))
(let ((orig (point))
- start first-vis first-vis-field-value)
+ first-vis first-vis-field-value)
;; Move by lines, if ARG is not 1 (the default).
(if (/= arg 1)
@@ -4003,7 +4004,6 @@
(while (and (not (bobp)) (invisible-p (1- (point))))
(goto-char (previous-char-property-change (point)))
(skip-chars-backward "^\n"))
- (setq start (point))
;; Now find first visible char in the line
(while (and (not (eobp)) (invisible-p (point)))
@@ -4654,30 +4654,29 @@
(skip-syntax-backward "/\\")
(point))))))
(let* ((oldpos (point))
- blinkpos
- message-log-max ; Don't log messages about paren matching.
- matching-paren
- open-paren-line-string)
+ (message-log-max nil) ; Don't log messages about paren matching.
+ (blinkpos
(save-excursion
(save-restriction
(if blink-matching-paren-distance
- (narrow-to-region (max (minibuffer-prompt-end)
+ (narrow-to-region
+ (max (minibuffer-prompt-end) ;(point-min) unless minibuf.
(- (point) blink-matching-paren-distance))
oldpos))
- (condition-case ()
(let ((parse-sexp-ignore-comments
(and parse-sexp-ignore-comments
(not blink-matching-paren-dont-ignore-comments))))
- (setq blinkpos (scan-sexps oldpos -1)))
- (error nil)))
+ (condition-case ()
+ (scan-sexps oldpos -1)
+ (error nil))))))
+ (matching-paren
(and blinkpos
;; Not syntax '$'.
(not (eq (syntax-class (syntax-after blinkpos)) 8))
- (setq matching-paren
(let ((syntax (syntax-after blinkpos)))
(and (consp syntax)
(eq (syntax-class syntax) 4)
- (cdr syntax)))))
+ (cdr syntax))))))
(cond
((not (or (eq matching-paren (char-before oldpos))
;; The cdr might hold a new paren-class info rather than
@@ -4699,25 +4698,22 @@
(t
(save-excursion
(goto-char blinkpos)
- (setq open-paren-line-string
+ (let ((open-paren-line-string
;; Show what precedes the open in its line, if anything.
- (if (save-excursion
- (skip-chars-backward " \t")
- (not (bolp)))
+ (cond
+ ((save-excursion (skip-chars-backward " \t") (not (bolp)))
(buffer-substring (line-beginning-position)
- (1+ blinkpos))
+ (1+ blinkpos)))
;; Show what follows the open in its line, if anything.
- (if (save-excursion
+ ((save-excursion
(forward-char 1)
(skip-chars-forward " \t")
(not (eolp)))
(buffer-substring blinkpos
- (line-end-position))
+ (line-end-position)))
;; Otherwise show the previous nonblank line,
;; if there is one.
- (if (save-excursion
- (skip-chars-backward "\n \t")
- (not (bobp)))
+ ((save-excursion (skip-chars-backward "\n \t") (not (bobp)))
(concat
(buffer-substring (progn
(skip-chars-backward "\n \t")
@@ -4727,13 +4723,13 @@
(point)))
;; Replace the newline and other whitespace with
`...'.
"..."
- (buffer-substring blinkpos (1+ blinkpos)))
+ (buffer-substring blinkpos (1+ blinkpos))))
;; There is nothing to show except the char itself.
- (buffer-substring blinkpos (1+ blinkpos)))))))
+ (t (buffer-substring blinkpos (1+ blinkpos))))))
(message "Matches %s"
- (substring-no-properties open-paren-line-string))))))))
+ (substring-no-properties open-paren-line-string)))))))))
-;Turned off because it makes dbx bomb out.
+;; Turned off because it makes dbx bomb out.
(setq blink-paren-function 'blink-matching-open)
;; This executes C-g typed while Emacs is waiting for a command.