Andreas Röhler | 5 Jan 2008 18:45
Picon

sh-beg-end.el 1.2


;; New functions `sh-goto-opening', `sh-goto-closing'
;; following request at 
;; http://lists.gnu.org/archive/html/help-gnu-emacs/2007-12/msg00645.html

;; `sh-beginning-of-command' renamed to
;; `sh-beg-of-command' in order to avoid name conflict
Vinicius Jose Latorre | 5 Jan 2008 20:47
Picon
Favicon

Re: sh-beg-end.el 1.2

Andreas Röhler wrote:
> ;; New functions `sh-goto-opening', `sh-goto-closing'
> ;; following request at 
> ;; http://lists.gnu.org/archive/html/help-gnu-emacs/2007-12/msg00645.html
>
> ;; `sh-beginning-of-command' renamed to
> ;; `sh-beg-of-command' in order to avoid name conflict
>   

Where is the code file?
Andreas Röhler | 5 Jan 2008 21:00
Picon

Re: sh-beg-end.el 1.2

Am Samstag, 5. Januar 2008 20:47 schrieb Vinicius Jose Latorre:
> Andreas Röhler wrote:
> > ;; New functions `sh-goto-opening', `sh-goto-closing'
> > ;; following request at
> > ;; http://lists.gnu.org/archive/html/help-gnu-emacs/2007-12/msg00645.html
> >
> > ;; `sh-beginning-of-command' renamed to
> > ;; `sh-beg-of-command' in order to avoid name conflict
>
> Where is the code file?
>
>

Now attached. Thanks.

Andreas
Attachment (sh-beg-end.el.gz): application/x-gzip, 2384 bytes
_______________________________________________
gnu-emacs-sources mailing list
gnu-emacs-sources <at> gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Andreas Röhler | 5 Jan 2008 21:44
Picon

Re: sh-beg-end.el 1.2

Seems a 

(require 'sh-script)

is still missing.

Sorry for the inconvenience.

Andreas Röhler
Vinicius Jose Latorre | 5 Jan 2008 23:21
Picon
Favicon

Re: sh-beg-end.el 1.2

Andreas Röhler wrote:
> Seems a 
>
> (require 'sh-script)
>
> is still missing.
>
> Sorry for the inconvenience.
>
> Andreas Röhler
>   

BTW, as this package uses characters beyond ASCII,
it could be inserted:

      -*- coding: utf-8 -*-

At the end of the very first line.
Christian Herenz | 6 Jan 2008 10:16
Picon
Favicon

Re: sh-beg-end.el 1.2

Vinicius Jose Latorre wrote:
> Andreas Röhler wrote:
>> ;; New functions `sh-goto-opening', `sh-goto-closing'
>> ;; following request at ;;
>> http://lists.gnu.org/archive/html/help-gnu-emacs/2007-12/msg00645.html
>>
>> ;; `sh-beginning-of-command' renamed to
>> ;; `sh-beg-of-command' in order to avoid name conflict
>>   
> 
> Where is the code file?
> 

yeah, where is it???

greetz,
christian
Andreas Röhler | 6 Jan 2008 17:58
Picon

sh-beg-end.el 1.3


;; `sh-match-paren' introduced
;; following Emacs Lisp's `match-paren' :

;; Go to the matching opening/closing. 
;; First to opening, unless cursor is already there.
;; With arg, insert the charakter of `sh-match-paren-char'.

;; Key per default is "%" as elisp's `match-paren'. 
Attachment (sh-beg-end.el.gz): application/x-gzip, 2920 bytes
_______________________________________________
gnu-emacs-sources mailing list
gnu-emacs-sources <at> gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Jaeyoun Chung | 7 Jan 2008 06:10
Picon

multiple command bind to a single key stroke

here's simple define-key* to map multiple commands into a single
keystroke.
dropdown-list packages are attached.

;;; define-key* command follows
(require 'cl)
(defun define-key* (keymap key def)
  (define-key keymap key (combine-command def (lookup-key keymap
key))))
(defun combine-command (def defs)
  (cond ((null defs) def)
	((and (listp defs)
	      (eq 'lambda (car defs))
	      (= (length defs) 4)
	      (listp (fourth defs))
	      (eq 'command-selector (car (fourth defs))))
	 (unless (member `',def (cdr (fourth defs)))
	   (setcdr (fourth defs) (nconc (cdr (fourth defs)) `(',def))))
	 defs)
	(t
	 `(lambda () (interactive) (command-selector ',defs ',def)))))
(require 'dropdown-list)
(defvar command-selector-last-command nil)
(defun command-selector (&rest candidates)
  (if (and (eq last-command this-command) command-selector-last-
command)
      (call-interactively command-selector-last-command)
    (let* ((candidate-strings
	    (mapcar (lambda (candidate)
		      (format "%s" (if (symbolp candidate)
(Continue reading)

Andreas Röhler | 7 Jan 2008 12:58
Picon

thingatpt-utils 1.8

Herewith a new version of thingatpt-utils.

Maybe try one of the test-functions `thatpt-mv-test',
`thatpt-delimtest', `thatpt-test' with some scratch to
get an impression.

Comments welcome

Andreas Röhler

;;; Major changes to previous version: 

;; New functions move to beginning- and end-of-THING-atpt 
;; New trim function removes leading and/or trailing char

;; New set of functions starting with `sh-struct' edits
;; shell-script `if-fi', `while-done', `case-esac'
;; etc. constructs similar to lists in Emacs Lisp: jump
;; to the matching opening/closing, copy or kill these
;; structures etc.

;; Functions starting with `parenthese-' renamed to `parentize-'

;;; Commentary:

;; A set of functions to return, mover over or
;; manipulate a given THING. THING may be a well known
;; form as symbol', `list', `sexp', `defun' but also a
;; new defined and abstract thing. 

(Continue reading)

Jaeyoun Chung | 9 Jan 2008 16:38
Picon

Re: multiple command bind to a single key stroke

On 1월9일, 오전3시49분, Ilya Zakharevich <nospam-ab... <at> ilyaz.org> wrote:
> You may want to look into define-key-wise.el (availaible in
> ilyaz.org/software/emacs, in emacs-el-src-*.zip).

I've checked yours. In fact, your define-key-wise function binds a
sequence of commands to a key stroke. Mine binds a list of commands to
a key stroke. The difference is that mine does not call each of those
commands, but displays a show drop down menu so that user can choose
one to execute. Actually, this is how key binding works in textmate
(ignore the context stuffs).

Gmane