dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

magit-obsolete.el (4202B)


      1 ;;; magit-obsolete.el --- obsolete definitions  -*- lexical-binding: t -*-
      2 
      3 ;; Copyright (C) 2010-2021  The Magit Project Contributors
      4 ;;
      5 ;; You should have received a copy of the AUTHORS.md file which
      6 ;; lists all contributors.  If not, see http://magit.vc/authors.
      7 
      8 ;; Author: Jonas Bernoulli <jonas@bernoul.li>
      9 ;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
     10 
     11 ;; SPDX-License-Identifier: GPL-3.0-or-later
     12 
     13 ;; Magit is free software; you can redistribute it and/or modify it
     14 ;; under the terms of the GNU General Public License as published by
     15 ;; the Free Software Foundation; either version 3, or (at your option)
     16 ;; any later version.
     17 ;;
     18 ;; Magit is distributed in the hope that it will be useful, but WITHOUT
     19 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     20 ;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
     21 ;; License for more details.
     22 ;;
     23 ;; You should have received a copy of the GNU General Public License
     24 ;; along with Magit.  If not, see http://www.gnu.org/licenses.
     25 
     26 ;;; Commentary:
     27 
     28 ;; This library defines aliases for obsolete variables and functions.
     29 
     30 ;;; Code:
     31 
     32 (require 'magit)
     33 
     34 ;;; Obsolete since v3.0.0
     35 
     36 (define-obsolete-function-alias 'magit-diff-visit-file-worktree
     37   'magit-diff-visit-worktree-file "Magit 3.0.0")
     38 
     39 (define-obsolete-function-alias 'magit-status-internal
     40   'magit-status-setup-buffer "Magit 3.0.0")
     41 
     42 (define-obsolete-variable-alias 'magit-mode-setup-hook
     43   'magit-setup-buffer-hook "Magit 3.0.0")
     44 
     45 (define-obsolete-variable-alias 'magit-branch-popup-show-variables
     46   'magit-branch-direct-configure "Magit 3.0.0")
     47 
     48 (define-obsolete-function-alias 'magit-dispatch-popup
     49   'magit-dispatch "Magit 3.0.0")
     50 
     51 (define-obsolete-function-alias 'magit-repolist-column-dirty
     52   'magit-repolist-column-flag "Magit 3.0.0")
     53 
     54 (define-obsolete-variable-alias 'magit-disable-line-numbers
     55   'magit-section-disable-line-numbers "Magit 3.0.0")
     56 
     57 (define-obsolete-variable-alias 'inhibit-magit-refresh
     58   'magit-inhibit-refresh "Magit 3.0.0")
     59 
     60 (defun magit--magit-popup-warning ()
     61   (display-warning 'magit "\
     62 Magit no longer uses Magit-Popup.
     63 It now uses Transient.
     64 See https://emacsair.me/2019/02/14/transient-0.1.
     65 
     66 However your configuration and/or some third-party package that
     67 you use still depends on the `magit-popup' package.  But because
     68 `magit' no longer depends on that, `package' has removed it from
     69 your system.
     70 
     71 If some package that you use still depends on `magit-popup' but
     72 does not declare it as a dependency, then please contact its
     73 maintainer about that and install `magit-popup' explicitly.
     74 
     75 If you yourself use functions that are defined in `magit-popup'
     76 in your configuration, then the next step depends on what you use
     77 that for.
     78 
     79 * If you use `magit-popup' to define your own popups but do not
     80   modify any of Magit's old popups, then you have to install
     81   `magit-popup' explicitly.  (You can also migrate to Transient,
     82   but there is no need to rush that.)
     83 
     84 * If you add additional arguments and/or actions to Magit's popups,
     85   then you have to port that to modify the new \"transients\" instead.
     86   See https://github.com/magit/magit/wiki/\
     87 Converting-popup-modifications-to-transient-modifications
     88 
     89 To find installed packages that still use `magit-popup' you can
     90 use e.g. \"M-x rgrep RET magit-popup RET RET ~/.emacs.d/ RET\"."))
     91 (cl-eval-when (eval load)
     92   (unless (require (quote magit-popup) nil t)
     93     (defun magit-define-popup-switch (&rest _)
     94       (magit--magit-popup-warning))
     95     (defun magit-define-popup-option (&rest _)
     96       (magit--magit-popup-warning))
     97     (defun magit-define-popup-variable (&rest _)
     98       (magit--magit-popup-warning))
     99     (defun magit-define-popup-action (&rest _)
    100       (magit--magit-popup-warning))
    101     (defun magit-define-popup-sequence-action (&rest _)
    102       (magit--magit-popup-warning))
    103     (defun magit-define-popup-key (&rest _)
    104       (magit--magit-popup-warning))
    105     (defun magit-define-popup-keys-deferred (&rest _)
    106       (magit--magit-popup-warning))
    107     (defun magit-change-popup-key (&rest _)
    108       (magit--magit-popup-warning))
    109     (defun magit-remove-popup-key (&rest _)
    110       (magit--magit-popup-warning))))
    111 
    112 ;;; _
    113 (provide 'magit-obsolete)
    114 ;;; magit-obsolete.el ends here