;;; Code:
-;; Compiler pacifier start
-(defvar ediff-multiframe)
-;; end pacifier
-
(require 'ediff-init)
(defvar ediff-multiframe)
;; (define-key menu-bar-tools-menu [ediff]
;; '("Compare" . menu-bar-ediff-menu))
-;; Compiler pacifier
-(defvar ediff-menu)
-(defvar ediff-merge-menu)
-(defvar epatch-menu)
-(defvar ediff-misc-menu)
-;; end pacifier
-
;; allow menus to be set up without ediff-wind.el being loaded
-;; Emacs
;; initialize menu bar keymaps
(defvar menu-bar-ediff-misc-menu
(make-sparse-keymap "Ediff Miscellanea"))
(require 'cl-lib)
(require 'ediff-util)
-;; Start compiler pacifier
(defvar ediff-metajob-name)
(defvar ediff-meta-buffer)
(defvar ediff-grab-mouse)
(defvar ediff-mouse-pixel-position)
(defvar ediff-mouse-pixel-threshold)
-(defvar ediff-whitespace)
(defvar ediff-multiframe)
(defvar ediff-use-toolbar-p)
-(defvar mswindowsx-bitmap-file-path)
-;; end pacifier
(defvar ediff-force-faces nil
"If t, Ediff will think that it is running on a display that supports faces.
(defun ediff-has-toolbar-support-p ()
nil)
-
-(defun ediff-has-gutter-support-p ()
- (declare (obsolete nil "27.1"))
- nil)
-
(defun ediff-use-toolbar-p ()
(and (ediff-has-toolbar-support-p) ;Can it do it ?
(boundp 'ediff-use-toolbar-p)
:type 'symbol
:group 'ediff)
-
-(define-obsolete-function-alias 'ediff-read-event #'read-event "27.1")
-
-(define-obsolete-function-alias 'ediff-overlayp #'overlayp "27.1")
-
-(define-obsolete-function-alias 'ediff-make-overlay #'make-overlay "27.1")
-
-(define-obsolete-function-alias 'ediff-delete-overlay #'delete-overlay "27.1")
-
-(define-obsolete-function-alias 'ediff-color-display-p #'display-color-p "27.1")
-
-
;; A var local to each control panel buffer. Indicates highlighting style
;; in effect for this buffer: `face', `ascii',
;; `off' -- turned off (on a dumb terminal only).
(cond ((not (ediff-has-face-support-p)) nil)
((and (boundp 'x-bitmap-file-path)
(locate-library "stipple" t x-bitmap-file-path)) "stipple")
- ((and (boundp 'mswindowsx-bitmap-file-path)
- (locate-library "stipple" t mswindowsx-bitmap-file-path)) "stipple")
(t "Stipple")))
(defface ediff-even-diff-A
(defsubst ediff-frame-unsplittable-p (frame)
+ (declare (obsolete nil "29.1"))
(cdr (assq 'unsplittable (frame-parameters frame))))
(defsubst ediff-get-next-window (wind prev-wind)
(ediff-clear-fine-differences-in-one-buffer n 'C)))
-(defsubst ediff-mouse-event-p (event)
- (string-match "mouse" (format "%S" (event-basic-type event))))
-
-
(defsubst ediff-key-press-event-p (event)
(or (char-or-string-p event) (symbolp event)))
(defun ediff-event-point (event)
- (cond ((ediff-mouse-event-p event)
+ (cond ((mouse-event-p event)
(posn-point (event-start event)))
((ediff-key-press-event-p event)
(point))
(t (error "Error"))))
(defun ediff-event-buffer (event)
- (cond ((ediff-mouse-event-p event)
+ (cond ((mouse-event-p event)
(window-buffer (posn-window (event-start event))))
((ediff-key-press-event-p event)
(current-buffer))
(t (error "Error"))))
-(define-obsolete-function-alias 'ediff-event-key #'identity "27.1")
-
(defun ediff-last-command-char ()
(declare (obsolete last-command-event "27.1"))
last-command-event)
(eq (frame-visible-p frame) 'icon)))
(defsubst ediff-window-visible-p (wind)
- ;; under TTY, window-live-p also means window is visible
(and (window-live-p wind)
- (or (not (display-graphic-p))
- (frame-visible-p (window-frame wind)))))
-
-
-(define-obsolete-function-alias 'ediff-frame-char-width
- #'frame-char-width "27.1")
+ (frame-visible-p (window-frame wind))))
(defun ediff-reset-mouse (&optional frame do-not-grab-mouse)
(or frame (setq frame (selected-frame)))
ediff-mouse-pixel-threshold))))
(t nil)))))
-(define-obsolete-function-alias 'ediff-frame-char-height
- #'frame-char-height "27.1")
;; Some overlay functions
(defsubst ediff-empty-overlay-p (overl)
(= (ediff-overlay-start overl) (ediff-overlay-end overl)))
-(define-obsolete-function-alias 'ediff-overlay-buffer
- #'overlay-buffer "27.1")
-
-(define-obsolete-function-alias 'ediff-overlay-get #'overlay-get "27.1")
-
-
(defun ediff-move-overlay (overlay beg end &optional buffer)
"If OVERLAY's buffer exists, call `move-overlay'."
(let ((buf (and overlay (overlay-buffer overlay))))
(ediff-abbreviate-file-name (file-name-directory dir))))
(defsubst ediff-nonempty-string-p (string)
- (and (stringp string) (not (string= string ""))))
+ (and (stringp string) (string-empty-p string)))
(defun ediff-abbrev-jobname (jobname)
(cond ((eq jobname 'ediff-directories)
(ediff-file-attributes filename 5))
+(define-obsolete-function-alias 'ediff-has-gutter-support-p #'ignore "27.1")
+(define-obsolete-function-alias 'ediff-event-key #'identity "27.1")
+(define-obsolete-function-alias 'ediff-frame-char-width #'frame-char-width "27.1")
+(define-obsolete-function-alias 'ediff-frame-char-height #'frame-char-height "27.1")
+(define-obsolete-function-alias 'ediff-overlay-buffer #'overlay-buffer "27.1")
+(define-obsolete-function-alias 'ediff-overlay-get #'overlay-get "27.1")
+(define-obsolete-function-alias 'ediff-read-event #'read-event "27.1")
+(define-obsolete-function-alias 'ediff-overlayp #'overlayp "27.1")
+(define-obsolete-function-alias 'ediff-make-overlay #'make-overlay "27.1")
+(define-obsolete-function-alias 'ediff-delete-overlay #'delete-overlay "27.1")
+(define-obsolete-function-alias 'ediff-color-display-p #'display-color-p "27.1")
(define-obsolete-function-alias 'ediff-with-syntax-table #'with-syntax-table "27.1")
(define-obsolete-function-alias 'ediff-convert-standard-filename #'convert-standard-filename "28.1")
(define-obsolete-function-alias 'ediff-hide-face #'ignore "28.1")
(define-obsolete-function-alias 'ediff-file-remote-p #'file-remote-p "29.1")
(define-obsolete-function-alias 'ediff-window-display-p #'display-graphic-p "29.1")
+(define-obsolete-function-alias 'ediff-mouse-event-p #'mouse-event-p "29.1")
(provide 'ediff-init)
;;; ediff-init.el ends here
;;; Code:
-
(require 'diff-mode) ; For `diff-file-junk-re'.
-
(defgroup ediff-ptch nil
"Ediff patch support."
:tag "Patch"
;;; Code:
-
(provide 'ediff-util) ;FIXME: Break cyclic dependencies and move to the end!
-;; Compiler pacifier
(defvar ediff-use-toolbar-p)
-(defvar ediff-toolbar-height)
-(defvar ediff-toolbar)
-(defvar ediff-toolbar-3way)
-(defvar bottom-toolbar)
-(defvar bottom-toolbar-visible-p)
-(defvar bottom-toolbar-height)
-(defvar mark-active)
-
(defvar ediff-after-quit-hook-internal nil)
-;; end pacifier
-
-
(require 'ediff-init)
(require 'ediff-help)
(require 'ediff-mult)
(if (ediff-in-control-buffer-p)
(ediff-recenter 'no-rehighlight)))))
-
-(define-obsolete-function-alias 'ediff-kill-bottom-toolbar #'ignore "27.1")
-(define-obsolete-function-alias 'ediff-make-bottom-toolbar #'ignore "27.1")
-
;; Merging
(defun ediff-toggle-show-clashes-only ()
)
-;; for compatibility
-(define-obsolete-function-alias 'ediff-minibuffer-with-setup-hook
- #'minibuffer-with-setup-hook "28.1")
-
;; This is adapted from a similar function in `emerge.el'.
;; PROMPT should not have a trailing ': ', so that it can be modified
;; according to context.
file))
-;; Quote metacharacters (using \) when executing diff in Unix.
-;;(defun ediff-protect-metachars (str)
-;; (let ((limit 0))
-;; (while (string-match ediff-metachars str limit)
-;; (setq str (concat (substring str 0 (match-beginning 0))
-;; "\\"
-;; (substring str (match-beginning 0))))
-;; (setq limit (1+ (match-end 0)))))
-;; str)
-
;; Make sure the current buffer (for a file) has the same contents as the
;; file on disk, and attempt to remedy the situation if not.
;; Signal an error if we can't make them the same, or the user doesn't want
(defun ediff-filename-magic-p (file)
+ (declare (obsolete nil "29.1"))
(or (ediff-file-compressed-p file)
(file-remote-p file)))
(select-window wind)
(delete-other-windows)
(or (mark) (push-mark))
- (ediff-activate-mark)
+ (setq mark-active 'ediff-util)
+ (setq-local transient-mark-mode t)
(split-window-vertically)
(ediff-select-lowest-window)
(setq other-wind (selected-window))
"Submit bug report on Ediff."
(interactive)
(ediff-barf-if-not-control-buffer)
- (defvar ediff-device-type)
(defvar ediff-buffer-name)
(let ((reporter-prompt-for-summary-p t)
(ctl-buf ediff-control-buffer)
- (ediff-device-type window-system)
varlist salutation ediff-buffer-name)
(setq varlist '(ediff-diff-program ediff-diff-options
ediff-diff3-program ediff-diff3-options
ediff-job-name
ediff-word-mode
ediff-buffer-name
- ediff-device-type
- ))
+ window-system))
(setq salutation "
Congratulations! You may have unearthed a bug in Ediff!
(syntax-table))))
)
-
-(define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1")
-
(defun ediff-activate-mark ()
+ (declare (obsolete nil "29.1"))
(setq mark-active 'ediff-util)
(setq-local transient-mark-mode t))
-(define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1")
-
;; The next two are modified versions from emerge.el.
;; VARS must be a list of symbols
;; ediff-save-variables returns an association list: ((var . val) ...)
(key-description desc)
(format "M-x %s" func-def))))
+(define-obsolete-function-alias 'ediff-kill-bottom-toolbar #'ignore "27.1")
+(define-obsolete-function-alias 'ediff-make-bottom-toolbar #'ignore "27.1")
+(define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1")
+(define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1")
(define-obsolete-function-alias 'ediff-add-to-history #'add-to-history "27.1")
+(define-obsolete-function-alias 'ediff-minibuffer-with-setup-hook #'minibuffer-with-setup-hook "28.1")
(define-obsolete-function-alias 'ediff-copy-list #'copy-sequence "28.1")
(define-obsolete-function-alias 'ediff-union #'seq-union "28.1")
(define-obsolete-function-alias 'ediff-intersection #'seq-intersection "28.1")
;;; ediff-wind.el --- window manipulation utilities -*- lexical-binding:t -*-
-;; Copyright (C) 1994-1997, 2000-2022 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2022 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
;;; Code:
-
-;; Compiler pacifier
(defvar icon-title-format)
-(defvar top-toolbar-height)
-(defvar bottom-toolbar-height)
-(defvar left-toolbar-height)
-(defvar right-toolbar-height)
-(defvar left-toolbar-width)
-(defvar right-toolbar-width)
-(defvar default-menubar)
-(defvar top-gutter)
-(defvar frame-icon-title-format)
(defvar ediff-diff-status)
(require 'ediff-init)
(require 'ediff-help)
-;; end pacifier
(defgroup ediff-window nil
"Ediff window manipulation."
(let (event)
(message
"Select windows by clicking. Please click on Window %d " wind-number)
- (while (not (ediff-mouse-event-p (setq event
- (read--potential-mouse-event))))
+ (while (not (mouse-event-p (setq event
+ (read--potential-mouse-event))))
(if (sit-for 1) ; if sequence of events, wait till the final word
(beep 1))
(message "Please click on Window %d " wind-number))
Create a new splittable frame if none is found."
(if (display-graphic-p)
(let ((wind-frame (window-frame))
- seen-windows)
+ seen-windows)
(while (and (not (memq (selected-window) seen-windows))
(or
(ediff-frame-has-dedicated-windows wind-frame)
(< (frame-height wind-frame)
(* 3 window-min-height))
(if ok-unsplittable
- nil
- (ediff-frame-unsplittable-p wind-frame))))
+ nil
+ (cdr (assq 'unsplittable (frame-parameters wind-frame))))))
;; remember history
(setq seen-windows (cons (selected-window) seen-windows))
;; try new window
;;; Code:
(require 'ediff-util)
-;; end pacifier
-
(require 'ediff-init)
(require 'ediff-mult) ; required because of the registry stuff
Returns the buffer into which the file is visited.
Also sets `ediff--magic-file-name' to indicate where the file's content
has been saved (if not in `buffer-file-name')."
- (let* ((file-magic (ediff-filename-magic-p file))
+ (let* ((file-magic (or (ediff-file-compressed-p file)
+ (file-remote-p file)))
(temp-file-name-prefix (file-name-nondirectory file)))
(cond ((not (file-readable-p file))
(user-error "File `%s' does not exist or is not readable" file))