unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Making test in emacs?
@ 2005-09-06  7:51 Paminu
  2005-09-06  8:20 ` Kaloian Doganov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paminu @ 2005-09-06  7:51 UTC (permalink / raw)


On the system that I use I have access to diffenrent machines A and B. I 
would now in my .emacs file make a test if I login to machinetype A or B 
because some of the mode files only works for programs on machine A or B.

How do I in .emacs test which type of machine I am logged into? 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Making test in emacs?
  2005-09-06  7:51 Making test in emacs? Paminu
@ 2005-09-06  8:20 ` Kaloian Doganov
  2005-09-06  8:35 ` Peter Dyballa
  2005-09-06  8:53 ` Michael Cadilhac
  2 siblings, 0 replies; 4+ messages in thread
From: Kaloian Doganov @ 2005-09-06  8:20 UTC (permalink / raw)
  Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]


On 6 сеп 2005, asdad@asd.com wrote:

> How do I in .emacs test which type of machine I am logged into? 

You can use the value of `system-configuration' variable.  For example:

(if (equal system-configuration "i486-pc-linux-gnu")
    (message "PC") ; do something for PC
  (if (equal system-configuration "powerpc-unknown-linux-gnu")
      (message "Mac") ; do something else for Mac
    (message "Don't know"))) ; do something else for other configurations

-- 
Поздрави,
Калоян Доганов,
Сдружение "Свободен софтуер".
___________________________________________________________
Ако не отговарям на писмата Ви: http://6lyokavitza.org/mail

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Making test in emacs?
  2005-09-06  7:51 Making test in emacs? Paminu
  2005-09-06  8:20 ` Kaloian Doganov
@ 2005-09-06  8:35 ` Peter Dyballa
  2005-09-06  8:53 ` Michael Cadilhac
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2005-09-06  8:35 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 06.09.2005 um 09:51 schrieb Paminu:

> How do I in .emacs test which type of machine I am logged into?
>

You can check the environment variable HOST or the return value of 
hostname ...

--
Greetings

   Pete
                       ~  o
                        ~_\\_/\
                       ~  O   O

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Making test in emacs?
  2005-09-06  7:51 Making test in emacs? Paminu
  2005-09-06  8:20 ` Kaloian Doganov
  2005-09-06  8:35 ` Peter Dyballa
@ 2005-09-06  8:53 ` Michael Cadilhac
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Cadilhac @ 2005-09-06  8:53 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 662 bytes --]

"Paminu" <asdad@asd.com> writes:

> On the system that I use I have access to diffenrent machines A and B. I 
> would now in my .emacs file make a test if I login to machinetype A or B 
> because some of the mode files only works for programs on machine A or B.

  How do you characterize a machine type ? On which criteria are you
  based ?

  If the machine name is enough, use (system-name).

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |   )\._.,--....,'``.
  2 rue de la Convention | 08.70.65.13.14 |  /.  _.. \   _\  (` ._,.
94270 Le Kremlin Bicetre | 06.23.20.31.30 | '._.-(,_..'--(,_...`-..'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-06  8:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06  7:51 Making test in emacs? Paminu
2005-09-06  8:20 ` Kaloian Doganov
2005-09-06  8:35 ` Peter Dyballa
2005-09-06  8:53 ` Michael Cadilhac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).