Skip to content

Commit

Permalink
refactor: move obsolete definitions to me-obsolete-defs
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 20, 2025
1 parent 0077b51 commit 2b610c9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 15 deletions.
2 changes: 0 additions & 2 deletions core/me-lib.el
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,6 @@ FEATS is available."
(let ((fn (if (eq (car feats) :any) (progn (setq feats (cdr feats)) #'cl-some) #'cl-every)))
(and (funcall fn (lambda (feat) (memq feat minemacs--extra-features)) feats) t)))

(define-obsolete-function-alias '+emacs-features-p '+emacs-options-p "v11.0.0")


(provide 'me-lib)
;;; me-lib.el ends here
30 changes: 30 additions & 0 deletions core/me-obsolete-defs.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
;; me-obsolete-defs.el -- Obsolete definitions -*- lexical-binding: t; -*-

;; Copyright (C) 2022-2024 Abdelhak Bougouffa

;; Author: Abdelhak Bougouffa (rot13 "[email protected]")

;;; Commentary:

;;; Code:

(require 'me-lib)

(defconst os/android (+emacs-options-p 'os/android) "Non-nil on Android systems.")
(defconst os/linux (+emacs-options-p 'os/linux) "Non-nil on GNU/Linux systems.")
(defconst os/bsd (+emacs-options-p 'os/bsd) "Non-nil on BSD systems.")
(defconst os/win (+emacs-options-p 'os/win) "Non-nil on Windows systems.")
(defconst os/mac (+emacs-options-p 'os/mac) "Non-nil on MacOS systems.")

(make-obsolete-variable 'os/android '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/linux '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/bsd '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/win '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/mac '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'sys/arch '+emacs-options-p "v11.0.0")

(define-obsolete-function-alias '+emacs-features-p '+emacs-options-p "v11.0.0")


(provide 'me-obsolete-defs)
;;; me-obsolete-defs.el ends here
13 changes: 0 additions & 13 deletions core/me-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,10 @@ used (all small case, or title case):

(defconst minemacs-started-with-extra-args-p (and (cdr command-line-args) t) "Has Emacs been started with extras arguments? like a file name or so.")

(defconst os/android (eq system-type 'android) "Non-nil on Android systems.")
(defconst os/linux (eq system-type 'gnu/linux) "Non-nil on GNU/Linux systems.")
(defconst os/bsd (and (memq system-type '(berkeley-unix gnu/kfreebsd)) t) "Non-nil on BSD systems.")
(defconst os/win (and (memq system-type '(cygwin windows-nt ms-dos)) t) "Non-nil on Windows systems.")
(defconst os/mac (eq system-type 'darwin) "Non-nil on MacOS systems.")

(defconst sys/arch (intern (car (split-string system-configuration "-")))
"The system's architecture read from `system-configuration'.
It return a symbol like `x86_64', `aarch64', `armhf', ...")

(make-obsolete-variable 'os/android '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/linux '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/bsd '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/win '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'os/mac '+emacs-options-p "v11.0.0")
(make-obsolete-variable 'sys/arch '+emacs-options-p "v11.0.0")

(defconst minemacs--extra-features
(append
(list
Expand Down

0 comments on commit 2b610c9

Please sign in to comment.