Skillnad (från version 3 till rådande version)
Sammanfattning: Rollback to 2008-09-05 00:16 UTC
Information om ändring är inte tillgänglig.This page describes package Lisp:sys.el, by ViniciusJoseLatorre.
Sometimes you need to know on which system Emacs is running, so it’s possible to fine tune/adapt/parameterize your code.
This package determines which kind of system Emacs is running by setting the variables:
‘sys-cygwin-system’ ‘sys-windows-system’ ‘sys-lp-system’ ‘sys-emacs-type’ ‘sys-path-style’ To use Lisp:sys.el, insert in your package:
(require 'sys)
So, if you’re fine tunning a package, the code will look like:
(require 'sys)
(eval-and-compile
;; define `some-function' depending on Emacs kind.
(cond ((eq sys-emacs-type 'emacs)
...
(defun some-function (some-arg)
;; code for GNU Emacs
)
...
)
((eq sys-emacs-type 'xemacs)
...
(defun some-function (some-arg)
;; code for XEmacs
)
...
))
;; initialize `some-variable' depending on which system is running
(defvar some-variable
(cond (sys-cygwin-system
;; initialization for Cygwin
)
(sys-windows-system
;; initialization for Windows
)
(sys-lp-system
;; initialization for Unix using lp utility
(t
;; initialization for GNU Linux/Unix (using lpr utility)
))))