comparison lisp/simple.el @ 47364:1eea6f92f279

(transient-mark-mode, line-number-mode, column-number-mode): Undo the recent change in revision 1.566. The use of define-minor-mode in simple.el creates bootstrap problems.
author Markus Rost <rost@math.uni-bielefeld.de>
date Tue, 10 Sep 2002 01:32:32 +0000
parents e1687eeb0232
children 2239db3433ca
comparison
equal deleted inserted replaced
47363:d631619a4723 47364:1eea6f92f279
2482 (error "No mark set in this buffer")) 2482 (error "No mark set in this buffer"))
2483 (set-mark (point)) 2483 (set-mark (point))
2484 (goto-char omark) 2484 (goto-char omark)
2485 nil))) 2485 nil)))
2486 2486
2487 (define-minor-mode transient-mark-mode 2487 (defun transient-mark-mode (arg)
2488 "Toggle Transient Mark mode. 2488 "Toggle Transient Mark mode.
2489 With arg, turn Transient Mark mode on if arg is positive, off otherwise. 2489 With arg, turn Transient Mark mode on if arg is positive, off otherwise.
2490 2490
2491 In Transient Mark mode, when the mark is active, the region is highlighted. 2491 In Transient Mark mode, when the mark is active, the region is highlighted.
2492 Changing the buffer \"deactivates\" the mark. 2492 Changing the buffer \"deactivates\" the mark.
2503 \\[comment-dwim], \\[flush-lines], \\[ispell], \\[keep-lines], 2503 \\[comment-dwim], \\[flush-lines], \\[ispell], \\[keep-lines],
2504 \\[query-replace], \\[query-replace-regexp], and \\[undo]. Invoke 2504 \\[query-replace], \\[query-replace-regexp], and \\[undo]. Invoke
2505 \\[apropos-documentation] and type \"transient\" or \"mark.*active\" at 2505 \\[apropos-documentation] and type \"transient\" or \"mark.*active\" at
2506 the prompt, to see the documentation of commands which are sensitive to 2506 the prompt, to see the documentation of commands which are sensitive to
2507 the Transient Mark mode." 2507 the Transient Mark mode."
2508 :global t :group 'editing-basics) 2508 (interactive "P")
2509 (setq transient-mark-mode
2510 (if (null arg)
2511 (not transient-mark-mode)
2512 (> (prefix-numeric-value arg) 0)))
2513 (if (interactive-p)
2514 (if transient-mark-mode
2515 (message "Transient Mark mode enabled")
2516 (message "Transient Mark mode disabled"))))
2509 2517
2510 (defun pop-global-mark () 2518 (defun pop-global-mark ()
2511 "Pop off global mark ring and jump to the top location." 2519 "Pop off global mark ring and jump to the top location."
2512 (interactive) 2520 (interactive)
2513 ;; Pop entries which refer to non-existent buffers. 2521 ;; Pop entries which refer to non-existent buffers.
3274 (not (eq overwrite-mode 'overwrite-mode-binary)) 3282 (not (eq overwrite-mode 'overwrite-mode-binary))
3275 (> (prefix-numeric-value arg) 0)) 3283 (> (prefix-numeric-value arg) 0))
3276 'overwrite-mode-binary)) 3284 'overwrite-mode-binary))
3277 (force-mode-line-update)) 3285 (force-mode-line-update))
3278 3286
3279 (define-minor-mode line-number-mode 3287 (defcustom line-number-mode t
3288 "*Non-nil means display line number in mode line."
3289 :type 'boolean
3290 :group 'editing-basics)
3291
3292 (defun line-number-mode (arg)
3280 "Toggle Line Number mode. 3293 "Toggle Line Number mode.
3281 With arg, turn Line Number mode on iff arg is positive. 3294 With arg, turn Line Number mode on iff arg is positive.
3282 When Line Number mode is enabled, the line number appears 3295 When Line Number mode is enabled, the line number appears
3283 in the mode line. 3296 in the mode line.
3284 3297
3285 Line numbers do not appear for very large buffers and buffers 3298 Line numbers do not appear for very large buffers and buffers
3286 with very long lines; see variables `line-number-display-limit' 3299 with very long lines; see variables `line-number-display-limit'
3287 and `line-number-display-limit-width'." 3300 and `line-number-display-limit-width'."
3288 :init-value t :global t :group 'editing-basics) 3301 (interactive "P")
3289 3302 (setq line-number-mode
3290 (define-minor-mode column-number-mode 3303 (if (null arg) (not line-number-mode)
3304 (> (prefix-numeric-value arg) 0)))
3305 (force-mode-line-update))
3306
3307 (defcustom column-number-mode nil
3308 "*Non-nil means display column number in mode line."
3309 :type 'boolean
3310 :group 'editing-basics)
3311
3312 (defun column-number-mode (arg)
3291 "Toggle Column Number mode. 3313 "Toggle Column Number mode.
3292 With arg, turn Column Number mode on iff arg is positive. 3314 With arg, turn Column Number mode on iff arg is positive.
3293 When Column Number mode is enabled, the column number appears 3315 When Column Number mode is enabled, the column number appears
3294 in the mode line." 3316 in the mode line."
3295 :global t :group 'editing-basics) 3317 (interactive "P")
3318 (setq column-number-mode
3319 (if (null arg) (not column-number-mode)
3320 (> (prefix-numeric-value arg) 0)))
3321 (force-mode-line-update))
3296 3322
3297 (defgroup paren-blinking nil 3323 (defgroup paren-blinking nil
3298 "Blinking matching of parens and expressions." 3324 "Blinking matching of parens and expressions."
3299 :prefix "blink-matching-" 3325 :prefix "blink-matching-"
3300 :group 'paren-matching) 3326 :group 'paren-matching)