Mercurial > emacs
comparison lisp/progmodes/executable.el @ 90200:f9a65d7ebd29
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-68
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 459-473)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 86-87)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 07 Jul 2005 12:43:14 +0000 |
parents | 62afea0771d8 18a818a2ee7c |
children | edf295560b5a |
comparison
equal
deleted
inserted
replaced
90199:bb71c6cf2009 | 90200:f9a65d7ebd29 |
---|---|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 ;; GNU General Public License for more details. | 18 ;; GNU General Public License for more details. |
19 | 19 |
20 ;; You should have received a copy of the GNU General Public License | 20 ;; You should have received a copy of the GNU General Public License |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 ;; Boston, MA 02111-1307, USA. | 23 ;; Boston, MA 02110-1301, USA. |
24 | 24 |
25 ;;; Commentary: | 25 ;;; Commentary: |
26 | 26 |
27 ;; executable.el is used by certain major modes to insert a suitable | 27 ;; executable.el is used by certain major modes to insert a suitable |
28 ;; #! line at the beginning of the file, if the file does not already | 28 ;; #! line at the beginning of the file, if the file does not already |
51 ;; `executable-set-magic'. | 51 ;; `executable-set-magic'. |
52 | 52 |
53 ;;; Code: | 53 ;;; Code: |
54 | 54 |
55 (defgroup executable nil | 55 (defgroup executable nil |
56 "Base functionality for executable interpreter scripts" | 56 "Base functionality for executable interpreter scripts." |
57 :group 'processes) | 57 :group 'processes) |
58 | 58 |
59 ;; This used to default to `other', but that doesn't seem to have any | 59 ;; This used to default to `other', but that doesn't seem to have any |
60 ;; significance. fx 2000-02-11. | 60 ;; significance. fx 2000-02-11. |
61 (defcustom executable-insert t ; 'other | 61 (defcustom executable-insert t ; 'other |
228 (add-hook 'after-save-hook 'executable-chmod nil t) | 228 (add-hook 'after-save-hook 'executable-chmod nil t) |
229 (if (looking-at "#![ \t]*\\(.*\\)$") | 229 (if (looking-at "#![ \t]*\\(.*\\)$") |
230 (and (goto-char (match-beginning 1)) | 230 (and (goto-char (match-beginning 1)) |
231 ;; If the line ends in a space, | 231 ;; If the line ends in a space, |
232 ;; don't offer to change it. | 232 ;; don't offer to change it. |
233 (not (= (char-after (1- (match-end 1))) ?\ )) | 233 (not (= (char-after (1- (match-end 1))) ?\s)) |
234 (not (string= argument | 234 (not (string= argument |
235 (buffer-substring (point) (match-end 1)))) | 235 (buffer-substring (point) (match-end 1)))) |
236 (if (or (not executable-query) no-query-flag | 236 (if (or (not executable-query) no-query-flag |
237 (save-window-excursion | 237 (save-window-excursion |
238 ;; Make buffer visible before question. | 238 ;; Make buffer visible before question. |