emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/simple.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el
Date: Mon, 09 Sep 2002 18:09:14 -0400

Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.565 emacs/lisp/simple.el:1.566
*** emacs/lisp/simple.el:1.565  Sun Sep  8 20:27:30 2002
--- emacs/lisp/simple.el        Mon Sep  9 18:09:14 2002
***************
*** 489,499 ****
        (setq start (point))
        (goto-char opoint)
        (forward-line 0)
!       (if (/= start 1)
            (message "line %d (narrowed line %d)"
!                    (1+ (count-lines 1 (point)))
                     (1+ (count-lines start (point))))
!         (message "Line %d" (1+ (count-lines 1 (point)))))))))
  
  (defun count-lines (start end)
    "Return number of lines between START and END.
--- 489,499 ----
        (setq start (point))
        (goto-char opoint)
        (forward-line 0)
!       (if (/= start (point-min))
            (message "line %d (narrowed line %d)"
!                    (1+ (count-lines (point-min) (point)))
                     (1+ (count-lines start (point))))
!         (message "Line %d" (1+ (count-lines (point-min) (point)))))))))
  
  (defun count-lines (start end)
    "Return number of lines between START and END.
***************
*** 1958,1964 ****
    "Reinsert the last stretch of killed text.
  More precisely, reinsert the stretch of killed text most recently
  killed OR yanked.  Put point at end, and set mark at beginning.
! With just C-u as argument, same but put point at beginning (and mark at end).
  With argument N, reinsert the Nth most recently killed stretch of killed
  text.
  See also the command \\[yank-pop]."
--- 1958,1964 ----
    "Reinsert the last stretch of killed text.
  More precisely, reinsert the stretch of killed text most recently
  killed OR yanked.  Put point at end, and set mark at beginning.
! With just \\[universal-argument] as argument, same but put point at beginning 
(and mark at end).
  With argument N, reinsert the Nth most recently killed stretch of killed
  text.
  See also the command \\[yank-pop]."
***************
*** 2484,2490 ****
        (goto-char omark)
        nil)))
  
! (defun transient-mark-mode (arg)
    "Toggle Transient Mark mode.
  With arg, turn Transient Mark mode on if arg is positive, off otherwise.
  
--- 2484,2490 ----
        (goto-char omark)
        nil)))
  
! (define-minor-mode transient-mark-mode
    "Toggle Transient Mark mode.
  With arg, turn Transient Mark mode on if arg is positive, off otherwise.
  
***************
*** 2505,2519 ****
  \\[apropos-documentation] and type \"transient\" or \"mark.*active\" at
  the prompt, to see the documentation of commands which are sensitive to
  the Transient Mark mode."
!   (interactive "P")
!   (setq transient-mark-mode
!       (if (null arg)
!           (not transient-mark-mode)
!         (> (prefix-numeric-value arg) 0)))
!   (if (interactive-p)
!       (if transient-mark-mode
!         (message "Transient Mark mode enabled")
!       (message "Transient Mark mode disabled"))))
  
  (defun pop-global-mark ()
    "Pop off global mark ring and jump to the top location."
--- 2505,2511 ----
  \\[apropos-documentation] and type \"transient\" or \"mark.*active\" at
  the prompt, to see the documentation of commands which are sensitive to
  the Transient Mark mode."
!   :global t :group 'editing-basics)
  
  (defun pop-global-mark ()
    "Pop off global mark ring and jump to the top location."
***************
*** 3092,3099 ****
                (save-excursion (forward-paragraph 1) (point)))))
          (and prefix (not (equal prefix ""))
               ;; Use auto-indentation rather than a guessed empty prefix.
!              (not (and fill-indent-according-to-mode
!                        (string-match "[ \t]*" prefix)))
               (setq fill-prefix prefix))))
        
        (while (and (not give-up) (> (current-column) fc))
--- 3084,3091 ----
                (save-excursion (forward-paragraph 1) (point)))))
          (and prefix (not (equal prefix ""))
               ;; Use auto-indentation rather than a guessed empty prefix.
!              (not (and (fill-indent-according-to-mode)
!                        (string-match "\\`[ \t]*\\'" prefix)))
               (setq fill-prefix prefix))))
        
        (while (and (not give-up) (> (current-column) fc))
***************
*** 3160,3165 ****
--- 3152,3159 ----
    "The function to use for `auto-fill-function' if Auto Fill mode is turned 
on.
  Some major modes set this.")
  
+ ;; FIXME: turn into a proper minor mode.
+ ;; Add a global minor mode version of it.
  (defun auto-fill-mode (&optional arg)
    "Toggle Auto Fill mode.
  With arg, turn Auto Fill mode on if and only if arg is positive.
***************
*** 3282,3293 ****
            'overwrite-mode-binary))
    (force-mode-line-update))
  
! (defcustom line-number-mode t
!   "*Non-nil means display line number in mode line."
!   :type 'boolean
!   :group 'editing-basics)
! 
! (defun line-number-mode (arg)
    "Toggle Line Number mode.
  With arg, turn Line Number mode on iff arg is positive.
  When Line Number mode is enabled, the line number appears
--- 3276,3282 ----
            'overwrite-mode-binary))
    (force-mode-line-update))
  
! (define-minor-mode line-number-mode
    "Toggle Line Number mode.
  With arg, turn Line Number mode on iff arg is positive.
  When Line Number mode is enabled, the line number appears
***************
*** 3296,3322 ****
  Line numbers do not appear for very large buffers and buffers
  with very long lines; see variables `line-number-display-limit'
  and `line-number-display-limit-width'."
!   (interactive "P")
!   (setq line-number-mode
!       (if (null arg) (not line-number-mode)
!         (> (prefix-numeric-value arg) 0)))
!   (force-mode-line-update))
! 
! (defcustom column-number-mode nil
!   "*Non-nil means display column number in mode line."
!   :type 'boolean
!   :group 'editing-basics)
  
! (defun column-number-mode (arg)
    "Toggle Column Number mode.
  With arg, turn Column Number mode on iff arg is positive.
  When Column Number mode is enabled, the column number appears
  in the mode line."
!   (interactive "P")
!   (setq column-number-mode
!       (if (null arg) (not column-number-mode)
!         (> (prefix-numeric-value arg) 0)))
!   (force-mode-line-update))
  
  (defgroup paren-blinking nil
    "Blinking matching of parens and expressions."
--- 3285,3298 ----
  Line numbers do not appear for very large buffers and buffers
  with very long lines; see variables `line-number-display-limit'
  and `line-number-display-limit-width'."
!   :init-value t :global t :group 'editing-basics)
  
! (define-minor-mode column-number-mode
    "Toggle Column Number mode.
  With arg, turn Column Number mode on iff arg is positive.
  When Column Number mode is enabled, the column number appears
  in the mode line."
!   :global t :group 'editing-basics)
  
  (defgroup paren-blinking nil
    "Blinking matching of parens and expressions."
***************
*** 3880,3886 ****
    ;; or completion-no-auto-exit is non-nil.
  
    (let ((buffer (or buffer completion-reference-buffer))
!       (mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name 
buffer))))
      ;; If BUFFER is a minibuffer, barf unless it's the currently
      ;; active minibuffer.
      (if (and mini-p
--- 3856,3863 ----
    ;; or completion-no-auto-exit is non-nil.
  
    (let ((buffer (or buffer completion-reference-buffer))
!       (mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'"
!                             (buffer-name buffer))))
      ;; If BUFFER is a minibuffer, barf unless it's the currently
      ;; active minibuffer.
      (if (and mini-p
***************
*** 3889,3896 ****
                             (window-buffer (active-minibuffer-window))))))
        (error "Minibuffer is not active for completion")
        (unless (run-hook-with-args-until-success 
!              'choose-completion-string-functions choice buffer mini-p 
base-size)
!       ;; Insert the completion into the buffer where completion was requested.
        (set-buffer buffer)
        (if base-size
            (delete-region (+ base-size (if mini-p
--- 3866,3874 ----
                             (window-buffer (active-minibuffer-window))))))
        (error "Minibuffer is not active for completion")
        (unless (run-hook-with-args-until-success 
!              'choose-completion-string-functions
!              choice buffer mini-p base-size)
!       ;; Insert the completion into the buffer where it was requested.
        (set-buffer buffer)
        (if base-size
            (delete-region (+ base-size (if mini-p




reply via email to

[Prev in Thread] Current Thread [Next in Thread]