diff options
| author | Richard M. Stallman | 1993-03-21 08:22:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-03-21 08:22:37 +0000 |
| commit | a61099dd2f73360c853363d0b32bbcbc1e695c29 (patch) | |
| tree | ccab74a636970f2cc0085a2dd6767f23bcbe0f4a | |
| parent | 6bde6341fef891cab2064ece867e79df1533526d (diff) | |
| download | emacs-a61099dd2f73360c853363d0b32bbcbc1e695c29.tar.gz emacs-a61099dd2f73360c853363d0b32bbcbc1e695c29.zip | |
(line-number-mode): New function and variable.
| -rw-r--r-- | lisp/simple.el | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 9c3a8ecd26e..6577fb92d14 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; simple.el --- basic editing commands for Emacs | 1 | ;;; simple.el --- basic editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1986, 1987, 1992, 1993 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1986, 1987, 1993 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -1865,11 +1865,25 @@ specialization of overwrite-mode, entered by setting the | |||
| 1865 | (interactive "P") | 1865 | (interactive "P") |
| 1866 | (setq overwrite-mode | 1866 | (setq overwrite-mode |
| 1867 | (if (if (null arg) | 1867 | (if (if (null arg) |
| 1868 | (not (eq (overwrite-mode 'overwrite-mode-binary))) | 1868 | (not (eq overwrite-mode 'overwrite-mode-binary)) |
| 1869 | (> (prefix-numeric-value arg) 0)) | 1869 | (> (prefix-numeric-value arg) 0)) |
| 1870 | 'overwrite-mode-binary)) | 1870 | 'overwrite-mode-binary)) |
| 1871 | (force-mode-line-update)) | 1871 | (force-mode-line-update)) |
| 1872 | 1872 | ||
| 1873 | (defvar line-number-mode nil | ||
| 1874 | "*Non-nil means display line number in mode line.") | ||
| 1875 | |||
| 1876 | (defun line-number-mode (arg) | ||
| 1877 | "Toggle Line Number mode. | ||
| 1878 | With arg, turn Line Number mode on iff arg is positive. | ||
| 1879 | When Line Number mode is enabled, the line number appears | ||
| 1880 | in the mode line." | ||
| 1881 | (interactive "P") | ||
| 1882 | (setq line-number-mode | ||
| 1883 | (if (null arg) (not line-number-mode) | ||
| 1884 | (> (prefix-numeric-value arg) 0))) | ||
| 1885 | (force-mode-line-update)) | ||
| 1886 | |||
| 1873 | (defvar blink-matching-paren t | 1887 | (defvar blink-matching-paren t |
| 1874 | "*Non-nil means show matching open-paren when close-paren is inserted.") | 1888 | "*Non-nil means show matching open-paren when close-paren is inserted.") |
| 1875 | 1889 | ||