emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fontification in ' *' buffers.


From: Michaël Cadilhac
Subject: Re: Fontification in ' *' buffers.
Date: Fri, 31 Aug 2007 15:33:53 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

address@hidden (Michaël Cadilhac) writes:

>   (defun create-file-buffer (filename)
>     "Create a suitably named buffer for visiting FILENAME, and return it.
>   FILENAME (sans directory) is used unchanged if that name is free;
> ! otherwise a string <2> or <3> or ... is appended to get an unused name.
> ! Spaces at the start of FILENAME (sans directory) are removed."
>     (let ((lastname (file-name-nondirectory filename)))
>       (if (string= lastname "")
>       (setq lastname filename))
> !     (save-match-data
> !       (string-match "^ *\\(.*\\)" lastname)
> !       (generate-new-buffer (match-string 1 lastname)))))
>   
>   (defun generate-new-buffer (name)
>     "Create and return a buffer with a name based on NAME.

Installed.

-- 
 |   Michaël `Micha' Cadilhac       |  <ESC>ape this <COLON> thing,          |
 |   http://michael.cadilhac.name   |           <Q>uit and                   |
 |   JID/MSN:                       |    do <NOT> <RET>urn.                  |
 `----  address@hidden  |          -- VI                    -  --'

Attachment: pgpFKfkibPSJB.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]