Mercurial > emacs
annotate etc/emacs.csh @ 76241:e4d076f4d52c
* net/tramp.el (tramp-file-name-handler): Revert last change.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 28 Feb 2007 22:22:08 +0000 |
parents | bb0664431a90 |
children | ce7b555e2b6a dd7c098af727 |
rev | line source |
---|---|
75774
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
1 ### emacs.csh |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
2 |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
3 ## Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
4 ## Free Software Foundation, Inc. |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
5 |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
6 ## Author: Michael DeCorte |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
7 |
76010
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
8 ## COPYING PERMISSIONS: |
75774
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
9 |
76010
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
10 ## Permission is hereby granted, free of charge, to any person |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
11 ## obtaining a copy of this file, to deal in the file without |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
12 ## restriction, including without limitation the rights to use, copy, |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
13 ## modify, merge, publish, distribute, sublicense, and/or sell copies |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
14 ## of the file, and to permit persons to whom the file is furnished to |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
15 ## do so, subject to the following condition: |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
16 ## |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
17 ## The above copyright notice and this permission notice shall be |
bb0664431a90
Restore simple license removed in previous change.
Glenn Morris <rgm@gnu.org>
parents:
75774
diff
changeset
|
18 ## included in all copies or substantial portions of the file. |
75774
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
19 |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
20 ### Commentary: |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
21 |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
22 ## This defines a csh command named `edit' which resumes an |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
23 ## existing Emacs or starts a new one if none exists. |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
24 ## One way or another, any arguments are passed to Emacs to specify files |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
25 ## (provided you have loaded `resume.el'). |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
26 |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
27 ## These are the possible values of $whichjob |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
28 ## 1 = new ordinary emacs (the -nw is so that it doesn't try to do X) |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
29 ## 2 = resume emacs |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
30 ## 3 = new emacs under X (-i is so that you get a reasonable icon) |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
31 ## 4 = resume emacs under X |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
32 ## 5 = new emacs under suntools |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
33 ## 6 = resume emacs under suntools |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
34 ## 7 = new emacs under X and suntools - doesn't make any sense, so use X |
dc23aaa67696
Switch to standard GPL text for license.
Glenn Morris <rgm@gnu.org>
parents:
75343
diff
changeset
|
35 ## 8 = resume emacs under X and suntools - doesn't make any sense, so use X |
25853 | 36 set EMACS_PATTERN="^\[[0-9]\] . Stopped ............ $EMACS" |
37 | |
38 alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\ | |
39 "emacsclient \!* &" "emacstool \!* &" "emacsclient \!* &" "emacs -i \!* &"\ | |
40 "emacsclient \!* &") ; \ | |
41 jobs >! $HOME/.jobs; grep "$EMACS_PATTERN" < $HOME/.jobs >& /dev/null; \ | |
42 @ isjob = ! $status; \ | |
43 @ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \ | |
44 test -S ~/.emacs_server && emacsclient \!* \ | |
45 || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]' | |
52401 | 46 |
47 # arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4 |