Commit 3137dda8 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(newline): Simplify use of prefix-numeric-value.

(line-move-partial): Remove unused var `ppos'.
(line-move-1): Replace 9999 with most-positive-fixnum.
(move-end-of-line): Use more efficient single-property search.
(move-beginning-of-line): Remove unused var `start'.
(blink-matching-open): Restructure in a more functional style.
parent 993e3059
2007-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (newline): Simplify use of prefix-numeric-value.
(line-move-partial): Remove unused var `ppos'.
(line-move-1): Replace 9999 with most-positive-fixnum.
(move-end-of-line): Use more efficient single-property search.
(move-beginning-of-line): Remove unused var `start'.
(blink-matching-open): Restructure in a more functional style.
2007-09-16 Micha,Ak(Bl Cadilhac <michael@cadilhac.name>
* calendar/holidays.el (list-holidays): Remove the cyclic alias.
......@@ -203,6 +212,19 @@
2007-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/python.el: Merge changes from Dave Love's v2007-Sep-10.
(python-font-lock-keywords): Update to the 2.5 version of the language.
(python-quote-syntax): Let-bind font-lock-syntactic-keywords to nil.
(python-backspace): Only behave funny in code.
(python-compilation-regexp-alist): Add PDB stack trace regexp.
(inferior-python-mode): Add PDB prompt regexp.
(python-fill-paragraph): Refine the fenced-string regexp.
(python-find-imports): Handle imports spanning several lines.
(python-mode): Add `class' to hideshow support.
2007-09-10 Dave Love <fx@gnu.org>
* outline.el (outline-4, outline-5, outline-7):
Move font-lock-builtin-face down from 4 to 7 to better keep the
progression of color brightness, and to better match Org-mode's faces.
......
......@@ -457,7 +457,7 @@ than the value of `fill-column' and ARG is nil."
;; 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 @@ The argument is used for internal purposes; do not supply one."
(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 @@ The beginning of a blank line does not count as the end of a line."
"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 @@ Outline mode sets this."
(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 @@ Outline mode sets this."
;; 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 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(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 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(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 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(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 @@ it skips the contents of comments that end before point."
(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 @@ it skips the contents of comments that end before point."
(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 @@ it skips the contents of comments that end before point."
(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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment