• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:save +defs:point

89         `(save-excursion (set-buffer ,buf) ,@forms)))
150 regardless of where in the line point is when the TAB command is used."
320 (defmacro delphi-save-match-data (&rest forms)
328 (defmacro delphi-save-excursion (&rest forms)
331 `(save-excursion
332 (delphi-save-match-data
333 (let ((inhibit-point-motion-hooks t)
337 (defmacro delphi-save-state (&rest forms)
365 ;; True if point p marks the start of string s. s is not a regular
368 (and (<= limit (point-max))
384 ;; Returns the start point of the token.
385 (if token (aref token 1) (point-min)))
388 ;; Returns the end point of the token.
389 (if token (aref token 2) (point-min)))
392 ;; Sets the start point of the token.
396 ;; Sets the end point of the token.
406 ;; Returns true if the point p is within the token's start/end points.
410 ;; Returns the column of the point p.
411 (save-excursion (goto-char p) (current-column)))
420 (defvar delphi-progress-last-reported-point nil
421 "The last point at which progress was reported.")
432 (setq delphi-progress-last-reported-point nil))
436 (setq delphi-progress-last-reported-point nil)
443 ;; If enough distance has elapsed since the last reported point, then report
445 (cond ((null delphi-progress-last-reported-point)
447 (setq delphi-progress-last-reported-point p))
450 (>= (abs (- p delphi-progress-last-reported-point)) step-size))
452 (setq delphi-progress-last-reported-point p)
454 desc (buffer-name) (/ (* 100 p) (point-max))))))
456 (defun delphi-next-line-start (&optional from-point)
457 ;; Returns the first point of the next line.
458 (let ((curr-point (point))
460 (if from-point (goto-char from-point))
462 (setq next (min (1+ (point)) (point-max)))
463 (goto-char curr-point)
469 (delphi-save-state
473 ;; Returns the literal kind the point p is in (or nil if not in a literal).
474 (if (and (<= (point-min) p) (<= p (point-max)))
507 ;; True if the point p is at the start point of a (completed) literal.
514 ;; True if the point p is at the end point of a (completed) literal.
530 ;; True if the point p marks a stable point. That is, a point outside of a
535 (or (>= p (point-max))
541 ;; Continues the search for a literal's true end point and returns the
542 ;; point past the end pattern (if found) or the limit (if not found).
548 (point))))
559 ;; the point to its end (or the limit, if not found). The literal region is
562 (let ((search-start (point)))
568 search-start (point) (delphi-literal-text-properties kind))))
583 start (point) (delphi-literal-text-properties kind))))
587 (delphi-step-progress (point) "Parsing" delphi-parsing-progress-step)))
590 ;; Returns the literal token surrounding the point p, or nil if none.
595 (delphi-token-of kind (or start (point-min)) (or end (point-max)))))))
597 (defun delphi-point-token-at (p kind)
598 ;; Returns the single character token at the point p.
602 ;; Returns the token at the point p that describes the specified character.
608 ;; Returns the token surrounding point p that contains only members of the
610 (let ((currp (point))
616 (setq end (point))
619 (setq token (delphi-token-of kind (point) end)))
624 ;; If point p is surrounded by space characters, then return the token of the
629 ;; If point p is over a word (i.e. identifier characters), then return a word
641 ;; If point p is anywhere in the token string then returns the resulting
648 ;; Returns the token from parsing text at point p.
649 (when (and (<= (point-min) p) (<= p (point-max)))
673 ((delphi-point-token-at p 'punctuation)))))
676 ;; Returns the delphi source token under the current point.
677 (delphi-token-at (point)))
706 ;; Parses the literal tokens in the region. The point is set to "to".
707 (save-restriction
710 (while (< (point) to)
715 ;; continues as long as obsolete literal regions are encountered. The point
716 ;; is set to the encountered stable point.
717 (save-restriction
720 (while (not (delphi-is-stable-literal (point)))
721 (delphi-parse-next-literal (point-max)))))
725 (delphi-save-excursion
726 (delphi-save-state
751 (delphi-save-excursion
757 (progn (goto-char change-end) (end-of-line) (point)))
957 ;; Returns the point of the first non-space character in the comment.
960 (delphi-save-excursion
964 (point)))))
1003 ;; Returns true if the current point is on the first line of the comment.
1004 (save-excursion
1006 (current-point (point)))
1009 (and (<= comment-start current-point) (<= current-point (point))))))
1018 (save-excursion
1084 ;; An open ( or [ always is an indent point.
1277 ;; An open ( or [ always is an indent point.
1295 ;; the point is before or after it. Remember that we encountered one.
1297 ;; should be the actual indent point.
1448 (delphi-save-excursion
1489 (if token token (delphi-token-at (1- (point)))))))))
1495 before the indent, the point is moved to the indent."
1497 (delphi-save-match-data
1498 (let ((marked-point (point-marker)) ; Maintain our position reliably.
1499 (new-point nil)
1504 (setq line-start (point))
1508 (if (< marked-point (point))
1510 (set-marker marked-point (point)))
1511 ;; Advance our marked point after inserted spaces.
1512 (set-marker-insertion-type marked-point t)
1514 (delete-region line-start (point))
1516 (goto-char marked-point)
1517 (set-marker marked-point nil))))
1532 (save-selected-window
1534 (goto-char (point-max))
1535 (set-window-point (get-buffer-window to-buffer) (point))
1565 (defun delphi-debug-goto-point (p)
1585 (delphi-is-stable-literal (point))
1586 (delphi-literal-kind (1- (point)))
1587 (delphi-literal-kind (point))))
1591 (delphi-set-text-properties (point-min) (point-max) nil))
1596 (delphi-save-excursion
1607 (delphi-debug-parse-region (point-min) (point-max)))
1615 (delphi-fontify-region (point-min) (point-max) t))
1619 (delphi-save-excursion
1622 (while (< (point) to)
1624 (delphi-step-progress (point) "Tokenizing" delphi-scanning-progress-step))
1629 (delphi-debug-tokenize-region (point-min) (point-max)))
1644 (save-excursion
1656 (save-excursion (skip-chars-backward delphi-space-chars) (bolp)))
1747 "Find the definition of the identifier under the current point."
1752 "Find the definition of the identifier under the current point, searching
1760 "Find the body of the identifier under the current point, assuming
1769 (save-excursion
1770 (save-restriction
1784 (marked-point (point-marker))) ; Maintain our position reliably.
1800 ;; Advance our marked point after inserted spaces.
1801 (set-marker-insertion-type marked-point t)
1811 (setq p (point-min))
1812 (while (when (< p (point-max))
1816 (setq p (1+ (point))))
1819 (goto-char (point-max))
1824 (fill-region (point-min) (point-max)))
1826 (goto-char (point-max))
1830 (goto-char (point-min))
1832 (setq p (point))
1833 (while (when (< p (point-max))
1837 (setq p (1+ (point))))
1839 (setq comment-end (point-max))
1843 (goto-char marked-point)
1844 (set-marker marked-point nil)
1871 ;; region. Sets the current point to the end of the token (or limit).
1897 ("g" delphi-debug-goto-point)
1951 regardless of where in the line point is when the TAB command is used.
1992 '(delphi-progress-last-reported-point nil)
2002 (delphi-save-excursion
2005 (delphi-parse-region (point-min) (point-max))