view etc/emacs.bash @ 49195:c297d31ef382

(ruler-mode-comment-column-char, ruler-mode-goal-column-char) (ruler-mode-set-goal-column-ding-flag, ruler-mode-mouse-current-grab-object): New variables. (ruler-mode-comment-column-face, ruler-mode-goal-column-face): New faces. (ruler-mode-mouse-set-fill-column): Removed. (ruler-mode-mouse-grab-any-column, ruler-mode-mouse-drag-any-column-iteration) (ruler-mode-mouse-drag-any-column): New functions. (ruler-mode-map): [header-line down-mouse-2] Bound to `ruler-mode-mouse-grab-any-column' instead of `ruler-mode-mouse-set-fill-column'. (ruler-mode): Cleanup buffer local variable `header-line-format' if it didn't exist when `ruler-mode' was enabled. (ruler-mode-ruler-help-echo): Updated its value. (ruler-mode-ruler-help-echo-when-goal-column): New help string used when goal-column is already set. (ruler-mode-ruler-help-echo-tab): Renamed to... (ruler-mode-ruler-help-echo-when-tab-stops): New. (ruler-mode-fill-column-help-echo, ruler-mode-comment-column-help-echo) (ruler-mode-goal-column-help-echo): New help strings. (ruler-mode-ruler): Use `ruler-mode-ruler-help-echo-when-goal-column' instead of `ruler-mode-ruler-help-echo' if `goal-column' is set. Show `comment-column' and `goal-column'. Echo the different help string for each *-column characters on the ruler.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 13 Jan 2003 08:22:50 +0000
parents e96ffe544684
children 23a1cea22d13
line wrap: on
line source

# This defines a bash command named `edit' which contacts/resumes an
# existing emacs or starts a new one if none exists.
#
# One way or another, any arguments are passed to emacs to specify files
# (provided you have loaded `resume.el').
#
# This function assumes the emacs program is named `emacs' and is somewhere
# in your load path.  If either of these is not true, the most portable
# (and convenient) thing to do is to make an alias called emacs which
# refers to the real program, e.g. 
#
#        alias emacs=/usr/local/bin/gemacs
#
# Written by Noah Friedman.

function edit ()
{
 local windowsys="${WINDOW_PARENT+sun}"

 windowsys="${windowsys:-${DISPLAY+x}}"

 if [ -n "${windowsys:+set}" ]; then
    # Do not just test if these files are sockets.  On some systems
    # ordinary files or fifos are used instead.  Just see if they exist.
    if [ -e "${HOME}/.emacs_server" -o -e "/tmp/esrv${UID}-"* ]; then
       emacsclient "$@"
       return $?
    else
       echo "edit: starting emacs in background..." 1>&2
    fi

    case "${windowsys}" in
      x ) (emacs "$@" &) ;;
      sun ) (emacstool "$@" &) ;;
    esac
 else   
    if jobs %emacs 2> /dev/null ; then
       echo "$(pwd)" "$@" >| ${HOME}/.emacs_args && fg %emacs
    else
       emacs "$@"
    fi
 fi
}