Mercurial > emacs
comparison lisp/ediff-util.el @ 42288:3ce98f3e0608
2001-12-24 Michael Kifer <kifer@cs.sunysb.edu>
* viper-cmd.el (viper-change-state): Got rid of make-local-hook.
(viper-special-read-and-insert-char): Make C-m work right in the r
comand.
(viper-buffer-search-enable): Fixed format string.
* viper-ex.el (ex-token-alist): Use ex-set-visited-file-name
instead of viper-info-on-file.
(ex-set-visited-file-name): New function.
* viper.el (viper-emacs-state-mode-list): Added mail-mode.
* ediff-mult.el (ediff-meta-mark-equal-files): Added optional
action argument.
* ediff-init.el: Fixed some doc strings.
* ediff-util.el (ediff-after-quit-hook-internal): New variable.
Got rid of make-local-hook.
* ediff-wind.el (ediff-setup-control-frame): Got rid of
make-local-hook.
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Mon, 24 Dec 2001 05:50:31 +0000 |
parents | 10482dd382e7 |
children | 633233bf2bbf |
comparison
equal
deleted
inserted
replaced
42287:c95e74201401 | 42288:3ce98f3e0608 |
---|---|
37 (defvar bottom-toolbar) | 37 (defvar bottom-toolbar) |
38 (defvar bottom-toolbar-visible-p) | 38 (defvar bottom-toolbar-visible-p) |
39 (defvar bottom-toolbar-height) | 39 (defvar bottom-toolbar-height) |
40 (defvar mark-active) | 40 (defvar mark-active) |
41 (defvar ediff-emacs-p) | 41 (defvar ediff-emacs-p) |
42 | |
43 (defvar ediff-after-quit-hook-internal nil) | |
42 | 44 |
43 (eval-when-compile | 45 (eval-when-compile |
44 (let ((load-path (cons (expand-file-name ".") load-path))) | 46 (let ((load-path (cons (expand-file-name ".") load-path))) |
45 (or (featurep 'ediff-init) | 47 (or (featurep 'ediff-init) |
46 (load "ediff-init.el" nil nil 'nosuffix)) | 48 (load "ediff-init.el" nil nil 'nosuffix)) |
292 (make-local-variable 'ediff-default-variant) | 294 (make-local-variable 'ediff-default-variant) |
293 (make-local-variable 'ediff-merge-window-share) | 295 (make-local-variable 'ediff-merge-window-share) |
294 (make-local-variable 'ediff-window-setup-function) | 296 (make-local-variable 'ediff-window-setup-function) |
295 (make-local-variable 'ediff-keep-variants) | 297 (make-local-variable 'ediff-keep-variants) |
296 | 298 |
297 (make-local-hook 'ediff-after-quit-hook-internal) | |
298 | |
299 ;; unwrap set up parameters passed as argument | 299 ;; unwrap set up parameters passed as argument |
300 (while setup-parameters | 300 (while setup-parameters |
301 (set (car (car setup-parameters)) (cdr (car setup-parameters))) | 301 (set (car (car setup-parameters)) (cdr (car setup-parameters))) |
302 (setq setup-parameters (cdr setup-parameters))) | 302 (setq setup-parameters (cdr setup-parameters))) |
303 | 303 |
315 ;; Don't delete variants in case of ediff-buffer-* jobs without asking. | 315 ;; Don't delete variants in case of ediff-buffer-* jobs without asking. |
316 ;; This is because u may loose work---dangerous. | 316 ;; This is because u may loose work---dangerous. |
317 (if (string-match "buffer" (symbol-name ediff-job-name)) | 317 (if (string-match "buffer" (symbol-name ediff-job-name)) |
318 (setq ediff-keep-variants t)) | 318 (setq ediff-keep-variants t)) |
319 | 319 |
320 (make-local-hook 'pre-command-hook) | 320 (if ediff-xemacs-p |
321 (make-local-hook 'pre-command-hook)) | |
322 | |
321 (if (ediff-window-display-p) | 323 (if (ediff-window-display-p) |
322 (add-hook 'pre-command-hook 'ediff-spy-after-mouse nil t)) | 324 (add-hook 'pre-command-hook 'ediff-spy-after-mouse nil 'local)) |
323 (setq ediff-mouse-pixel-position (mouse-pixel-position)) | 325 (setq ediff-mouse-pixel-position (mouse-pixel-position)) |
324 | 326 |
325 ;; adjust for merge jobs | 327 ;; adjust for merge jobs |
326 (if ediff-merge-job | 328 (if ediff-merge-job |
327 (let ((buf | 329 (let ((buf |
3843 | 3845 |
3844 (defun ediff-profile () | 3846 (defun ediff-profile () |
3845 "Toggle profiling Ediff commands." | 3847 "Toggle profiling Ediff commands." |
3846 (interactive) | 3848 (interactive) |
3847 (ediff-barf-if-not-control-buffer) | 3849 (ediff-barf-if-not-control-buffer) |
3848 (make-local-hook 'post-command-hook) | 3850 |
3851 (if ediff-xemacs-p | |
3852 (make-local-hook 'post-command-hook)) | |
3853 | |
3849 (let ((pre-hook 'pre-command-hook) | 3854 (let ((pre-hook 'pre-command-hook) |
3850 (post-hook 'post-command-hook)) | 3855 (post-hook 'post-command-hook)) |
3851 (if (not (equal ediff-command-begin-time '(0 0 0))) | 3856 (if (not (equal ediff-command-begin-time '(0 0 0))) |
3852 (progn (remove-hook pre-hook 'ediff-save-time) | 3857 (progn (remove-hook pre-hook 'ediff-save-time) |
3853 (remove-hook post-hook 'ediff-calc-command-time) | 3858 (remove-hook post-hook 'ediff-calc-command-time) |
3854 (setq ediff-command-begin-time '(0 0 0)) | 3859 (setq ediff-command-begin-time '(0 0 0)) |
3855 (message "Ediff profiling disabled")) | 3860 (message "Ediff profiling disabled")) |
3856 (add-hook pre-hook 'ediff-save-time t t) | 3861 (add-hook pre-hook 'ediff-save-time t 'local) |
3857 (add-hook post-hook 'ediff-calc-command-time nil t) | 3862 (add-hook post-hook 'ediff-calc-command-time nil 'local) |
3858 (message "Ediff profiling enabled")))) | 3863 (message "Ediff profiling enabled")))) |
3859 | 3864 |
3860 (defun ediff-print-diff-vector (diff-vector-var) | 3865 (defun ediff-print-diff-vector (diff-vector-var) |
3861 (princ (format "\n*** %S ***\n" diff-vector-var)) | 3866 (princ (format "\n*** %S ***\n" diff-vector-var)) |
3862 (mapcar (lambda (overl-vec) | 3867 (mapcar (lambda (overl-vec) |