Mercurial > emacs
comparison etc/emacs.csh @ 75774:dc23aaa67696
Switch to standard GPL text for license.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 11 Feb 2007 01:18:25 +0000 |
parents | 0259a1711394 |
children | bb0664431a90 52a7f3f50b89 |
comparison
equal
deleted
inserted
replaced
75773:8344ba1076b6 | 75774:dc23aaa67696 |
---|---|
1 # Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 | 1 ### emacs.csh |
2 # Free Software Foundation, Inc. | |
3 # | |
4 # This defines a csh command named `edit' which resumes an | |
5 # existing Emacs or starts a new one if none exists. | |
6 # One way or another, any arguments are passed to Emacs to specify files | |
7 # (provided you have loaded `resume.el'). | |
8 # - Michael DeCorte | |
9 | 2 |
10 # These are the possible values of $whichjob | 3 ## Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 |
11 # 1 = new ordinary emacs (the -nw is so that it doesn't try to do X) | 4 ## Free Software Foundation, Inc. |
12 # 2 = resume emacs | 5 |
13 # 3 = new emacs under X (-i is so that you get a reasonable icon) | 6 ## Author: Michael DeCorte |
14 # 4 = resume emacs under X | 7 |
15 # 5 = new emacs under suntools | 8 ## This program is free software; you can redistribute it and/or modify |
16 # 6 = resume emacs under suntools | 9 ## it under the terms of the GNU General Public License as published by |
17 # 7 = new emacs under X and suntools - doesn't make any sense, so use X | 10 ## the Free Software Foundation; either version 2, or (at your option) |
18 # 8 = resume emacs under X and suntools - doesn't make any sense, so use X | 11 ## any later version. |
12 | |
13 ## This program is distributed in the hope that it will be useful, | |
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 ## GNU General Public License for more details. | |
17 | |
18 ## You should have received a copy of the GNU General Public License | |
19 ## along with this program; see the file COPYING. If not, write to the | |
20 ## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
21 ## Boston, MA 02110-1301, USA. | |
22 | |
23 ### Commentary: | |
24 | |
25 ## This defines a csh command named `edit' which resumes an | |
26 ## existing Emacs or starts a new one if none exists. | |
27 ## One way or another, any arguments are passed to Emacs to specify files | |
28 ## (provided you have loaded `resume.el'). | |
29 | |
30 ## These are the possible values of $whichjob | |
31 ## 1 = new ordinary emacs (the -nw is so that it doesn't try to do X) | |
32 ## 2 = resume emacs | |
33 ## 3 = new emacs under X (-i is so that you get a reasonable icon) | |
34 ## 4 = resume emacs under X | |
35 ## 5 = new emacs under suntools | |
36 ## 6 = resume emacs under suntools | |
37 ## 7 = new emacs under X and suntools - doesn't make any sense, so use X | |
38 ## 8 = resume emacs under X and suntools - doesn't make any sense, so use X | |
19 set EMACS_PATTERN="^\[[0-9]\] . Stopped ............ $EMACS" | 39 set EMACS_PATTERN="^\[[0-9]\] . Stopped ............ $EMACS" |
20 | 40 |
21 alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\ | 41 alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\ |
22 "emacsclient \!* &" "emacstool \!* &" "emacsclient \!* &" "emacs -i \!* &"\ | 42 "emacsclient \!* &" "emacstool \!* &" "emacsclient \!* &" "emacs -i \!* &"\ |
23 "emacsclient \!* &") ; \ | 43 "emacsclient \!* &") ; \ |
25 @ isjob = ! $status; \ | 45 @ isjob = ! $status; \ |
26 @ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \ | 46 @ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \ |
27 test -S ~/.emacs_server && emacsclient \!* \ | 47 test -S ~/.emacs_server && emacsclient \!* \ |
28 || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]' | 48 || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]' |
29 | 49 |
30 #COPYING PERMISSIONS: | |
31 # | |
32 # Permission is hereby granted, free of charge, to any person obtaining | |
33 # a copy of this file, to deal in the file without restriction, including | |
34 # without limitation the rights to use, copy, modify, merge, publish, | |
35 # distribute, sublicense, and/or sell copies of the file, and to | |
36 # permit persons to whom the file is furnished to do so, subject to | |
37 # the following condition: | |
38 # | |
39 # The above copyright notice and this permission notice shall be | |
40 # included in all copies or substantial portions of the file. | |
41 | |
42 | |
43 # arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4 | 50 # arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4 |