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

Lines Matching +defs:save +defs:point

42 (defvar tutorial--point-before-chkeys 0
44 (make-variable-buffer-local 'tutorial--point-before-chkeys)
46 (defvar tutorial--point-after-chkeys 0
48 (make-variable-buffer-local 'tutorial--point-after-chkeys)
136 ;; then save this value in mapsym
165 (fill-region (point-min) (point)))))
220 (save-buffers-kill-emacs [?\C-x ?\C-c])
274 (save-buffer [?\C-x ?\C-s])
279 (save-some-buffers [?\C-x ?s])
334 (save-excursion
335 (goto-char (point-min))
534 (start (point))
551 (goto-char tutorial--point-before-chkeys)
557 (add-text-properties tutorial--point-before-chkeys (point)
563 (goto-char (point-min))
564 (while (re-search-forward keybindings-regexp (point-max) t)
579 (setq tutorial--point-after-chkeys (point-marker)
592 (save-excursion
596 (while (eq (get-text-property (point) 'tutorial-remark)
599 (setq start (point))
606 (add-text-properties start (point)
618 "File name in which to save tutorials."
628 (save-excursion
629 (goto-char (point-min))
634 (while (if (get-text-property (point) 'tutorial-remark)
635 (setq prop-start (point))
636 (setq prop-start (next-single-property-change (point) 'tutorial-remark)))
640 (setq prop-end (point-max)))
645 (defun tutorial--save-tutorial ()
648 showing changed keys. It also saves the point position and the
653 (tutorial--save-tutorial-to (tutorial--saved-file)))
657 (defun tutorial--save-tutorial-to (saved-file)
659 See `tutorial--save-tutorial' for more information."
660 ;; Anything to save?
662 (< 1 (point)))
664 save-err)
670 (error (setq save-err t)
675 (let ((tut-point (if (= 0 tutorial--point-after-chkeys)
678 (point)
679 (if (< (point) tutorial--point-after-chkeys)
680 (- (point))
681 (- (point) tutorial--point-after-chkeys))))
682 (old-point (point))
691 ;; (when (< 0 tutorial--point-after-chkeys)
692 ;; (delete-region tutorial--point-before-chkeys
693 ;; tutorial--point-after-chkeys))
696 ;; Put the value of point first in the buffer so it will
698 (goto-char (point-min))
699 (insert (number-to-string tut-point)
702 tutorial--point-before-chkeys))
706 (error (setq save-err t)
707 (warn "Could not save tutorial to %s: %s"
714 ;; Restore point
715 (goto-char old-point)
716 (if save-err
717 (message "Could not save tutorial state.")
719 (message "Can't save tutorial: %s is not a directory"
737 When the tutorial buffer is killed the content and the point
770 (old-tut-point 1))
771 (setq tutorial--point-after-chkeys (point-min))
805 ;; a hook to save it when the buffer is killed.
806 (setq buffer-auto-save-file-name nil)
807 (add-hook 'kill-buffer-hook 'tutorial--save-tutorial nil t)
819 (goto-char (point-min))
820 (setq old-tut-point
825 (setq tutorial--point-before-chkeys
830 (delete-region (point-min) (point))
831 (goto-char tutorial--point-before-chkeys)
832 (setq tutorial--point-before-chkeys (point-marker)))
835 (setq tutorial--point-before-chkeys (point-marker)))
845 ;; Just move to old point in saved tutorial.
846 (let ((old-point
847 (if (> 0 old-tut-point)
848 (- old-tut-point)
849 (+ old-tut-point tutorial--point-after-chkeys))))
850 (when (< old-point 1)
851 (setq old-point 1))
852 (goto-char old-point))
853 (goto-char (point-min))
858 (cond ((save-excursion
861 (delete-region (point) (progn (forward-line 1) (point))))
871 (count-lines (point-min) (point))
877 (delete-region (point) (progn (end-of-line) (point)))
885 (goto-char (point-min)))