Mercurial > emacs
comparison lisp/winner.el @ 28023:3978c673322b
Fix keywords, autoload cookies. Split
eval-when-compile form to avoid compilation failure.
author | Dave Love <fx@gnu.org> |
---|---|
date | Tue, 07 Mar 2000 10:09:19 +0000 |
parents | b2b3b42a23b3 |
children | 2420cf232647 |
comparison
equal
deleted
inserted
replaced
28022:6c41f3276340 | 28023:3978c673322b |
---|---|
4 | 4 |
5 ;; Author: Ivar Rummelhoff <ivarr@ifi.uio.no> | 5 ;; Author: Ivar Rummelhoff <ivarr@ifi.uio.no> |
6 ;; Maintainer: Ivar Rummelhoff <ivarr@ifi.uio.no> | 6 ;; Maintainer: Ivar Rummelhoff <ivarr@ifi.uio.no> |
7 ;; Created: 27 Feb 1997 | 7 ;; Created: 27 Feb 1997 |
8 ;; Time-stamp: <1998-08-21 19:51:02 ivarr> | 8 ;; Time-stamp: <1998-08-21 19:51:02 ivarr> |
9 ;; Keywords: windows | 9 ;; Keywords: convenience frames |
10 | 10 |
11 ;; This file is part of GNU Emacs. | 11 ;; This file is part of GNU Emacs. |
12 | 12 |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | 13 ;; GNU Emacs is free software; you can redistribute it and/or modify |
14 ;; it under the terms of the GNU General Public License as published by | 14 ;; it under the terms of the GNU General Public License as published by |
40 ;; Winner mode was improved august 1998. | 40 ;; Winner mode was improved august 1998. |
41 | 41 |
42 ;;; Code: | 42 ;;; Code: |
43 | 43 |
44 (eval-when-compile | 44 (eval-when-compile |
45 (require 'cl) | 45 (require 'cl)) |
46 | 46 |
47 (eval-when-compile | |
47 (cond | 48 (cond |
48 ((eq (aref (emacs-version) 0) ?X) | 49 ((eq (aref (emacs-version) 0) ?X) |
49 (defmacro winner-active-region () | 50 (defmacro winner-active-region () |
50 '(region-active-p)) | 51 '(region-active-p)) |
51 (defsetf winner-active-region () (store) | 52 (defsetf winner-active-region () (store) |
65 | 66 |
66 (unless (fboundp 'defcustom) | 67 (unless (fboundp 'defcustom) |
67 (defmacro defcustom (symbol &optional initvalue docs &rest rest) | 68 (defmacro defcustom (symbol &optional initvalue docs &rest rest) |
68 (list 'defvar symbol initvalue docs))) | 69 (list 'defvar symbol initvalue docs))) |
69 | 70 |
70 ;;;###autoload | 71 |
72 ;;;###autoload | |
71 (defcustom winner-mode nil | 73 (defcustom winner-mode nil |
72 "Toggle winner-mode. | 74 "Toggle winner-mode. |
73 Setting this variable directly does not take effect; | 75 Setting this variable directly does not take effect; |
74 use either \\[customize] or the function `winner-mode'." | 76 use either \\[customize] or the function `winner-mode'." |
75 :set #'(lambda (symbol value) | 77 :set #'(lambda (symbol value) |
324 (window-configuration-change-hook | 326 (window-configuration-change-hook |
325 '((lambda () (setq winner-var t))))) | 327 '((lambda () (setq winner-var t))))) |
326 (split-window) | 328 (split-window) |
327 winner-var))) | 329 winner-var))) |
328 | 330 |
329 ;;;###autoload | 331 |
332 ;;;###autoload | |
330 (defun winner-mode (&optional arg) | 333 (defun winner-mode (&optional arg) |
331 "Toggle Winner mode. | 334 "Toggle Winner mode. |
332 With arg, turn Winner mode on if and only if arg is positive." | 335 With arg, turn Winner mode on if and only if arg is positive." |
333 (interactive "P") | 336 (interactive "P") |
334 (let ((on-p (if arg (> (prefix-numeric-value arg) 0) | 337 (let ((on-p (if arg (> (prefix-numeric-value arg) 0) |