comparison lisp/emulation/tpu-extras.el @ 4503:b6215383480a

(edit-picture-hook): Use add-hook to modify it.
author Richard M. Stallman <rms@gnu.org>
date Mon, 09 Aug 1993 06:18:02 +0000
parents 325bc5407213
children 3d55b6a74eec
comparison
equal deleted inserted replaced
4502:747d934e48f0 4503:b6215383480a
19 19
20 ;; You should have received a copy of the GNU General Public License 20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to 21 ;; along with GNU Emacs; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 23
24 ;;; Revision: $Id: tpu-extras.el,v 3.3 1993/08/01 21:38:06 riepel Exp $ 24 ;;; Revision: $Id: tpu-extras.el,v 1.2 1993/08/04 08:19:13 rms Exp rms $
25 25
26 ;;; Commentary: 26 ;;; Commentary:
27 27
28 ;; The functions contained in this file implement scroll margins and free 28 ;; The functions contained in this file implement scroll margins and free
29 ;; cursor mode. The following keys and commands are affected. 29 ;; cursor mode. The following keys and commands are affected.
103 ;;; Code: 103 ;;; Code:
104 104
105 105
106 ;;; Revision Information 106 ;;; Revision Information
107 107
108 (defconst tpu-extras-revision "$Revision: 3.3 $" 108 (defconst tpu-extras-revision "$Revision: 1.2 $"
109 "Revision number of the TPU-edt extras.") 109 "Revision number of the TPU-edt extras.")
110 110
111 111
112 ;;; Customization variables 112 ;;; Customization variables
113 113
131 131
132 132
133 ;;; Hooks -- Set cursor free in picture mode. 133 ;;; Hooks -- Set cursor free in picture mode.
134 ;;; Clean up when writing a file from cursor free mode. 134 ;;; Clean up when writing a file from cursor free mode.
135 135
136 (setq edit-picture-hook 'tpu-set-cursor-free) 136 (add-hook 'edit-picture-hook 'tpu-set-cursor-free)
137 137
138 (defun tpu-write-file-hook nil 138 (defun tpu-write-file-hook nil
139 "Eliminate whitespace at ends of lines, if the cursor is free." 139 "Eliminate whitespace at ends of lines, if the cursor is free."
140 (if (and (buffer-modified-p) tpu-cursor-free) (picture-clean))) 140 (if (and (buffer-modified-p) tpu-cursor-free) (picture-clean)))
141 141