all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [patch] 21.2 executable.el - Better shebang spport (#!)
@ 2002-08-22 11:32 Jari Aalto+mail.emacs
  2002-08-23  8:35 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Jari Aalto+mail.emacs @ 2002-08-22 11:32 UTC (permalink / raw)



A more flexible detection....

Jari


2002-08-22  Jari Aalto  <jari.aalto@poboxes.com>

	* progmodes/executable.el
	(executable-make-buffer-file-executable-if-script-p):
	Better shebang detection. Before #! can be spaces.


--- executable.el.orig	2002-08-22 14:25:02.000000000 +0300
+++ executable.el	2002-08-22 14:26:56.000000000 +0300
@@ -280,7 +280,8 @@
   (and (>= (buffer-size) 2)
        (save-restriction
 	 (widen)
-	 (string= "#!" (buffer-substring 1 3)))
+	 (goto-char (point-min))
+	 (looking-at "^[ \t]*#!"))
        (let* ((current-mode (file-modes (buffer-file-name)))
               (add-mode (logand ?\111 (default-file-modes))))
          (or (/= (logand ?\111 current-mode) 0)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] 21.2 executable.el - Better shebang spport (#!)
  2002-08-22 11:32 [patch] 21.2 executable.el - Better shebang spport (#!) Jari Aalto+mail.emacs
@ 2002-08-23  8:35 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2002-08-23  8:35 UTC (permalink / raw)
  Cc: gnu-emacs-bug

jari.aalto@poboxes.com (Jari Aalto+mail.emacs) writes:

|> A more flexible detection....
|> 
|> Jari
|> 
|> 
|> 2002-08-22  Jari Aalto  <jari.aalto@poboxes.com>
|> 
|> 	* progmodes/executable.el
|> 	(executable-make-buffer-file-executable-if-script-p):
|> 	Better shebang detection. Before #! can be spaces.

Can it?  Which OS supports that?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-23  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-22 11:32 [patch] 21.2 executable.el - Better shebang spport (#!) Jari Aalto+mail.emacs
2002-08-23  8:35 ` Andreas Schwab

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.