]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/executable.el
Add new function dom-remove-node
[gnu-emacs] / lisp / progmodes / executable.el
index bdc6403c316d3bf9ded249a25dc0a68fd652bf9d..173bf85bb528e048d570ab48b92e7c24ef78f162 100644 (file)
@@ -1,6 +1,6 @@
 ;;; executable.el --- base functionality for executable interpreter scripts -*- byte-compile-dynamic: t -*-
 
-;; Copyright (C) 1994-1996, 2000-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2000-2016 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
 ;; Keywords: languages, unix
@@ -104,11 +104,13 @@ Typical values are 73 (+x) or -493 (rwxr-xr-x)."
 (defvar executable-command nil)
 
 (defcustom executable-self-display "tail"
-  "Command you use with argument `+2' to make text files self-display.
+  "Command you use with argument `-n+2' to make text files self-display.
 Note that the like of `more' doesn't work too well under Emacs \\[shell]."
   :type 'string
   :group 'executable)
 
+(make-obsolete-variable 'executable-self-display nil "25.1" 'set)
+
 
 (defvar executable-font-lock-keywords
   '(("\\`#!.*/\\([^ \t\n]+\\)" 1 font-lock-keyword-face t))
@@ -238,8 +240,9 @@ executable."
                         (save-window-excursion
                           ;; Make buffer visible before question.
                           (switch-to-buffer (current-buffer))
-                          (y-or-n-p (concat "Replace magic number by `"
-                                            executable-prefix argument "'? "))))
+                          (y-or-n-p (format-message
+                                     "Replace magic number by `%s%s'? "
+                                     executable-prefix argument))))
                     (progn
                       (replace-match argument t t nil 1)
                       (message "Magic number changed to `%s'"
@@ -251,14 +254,14 @@ executable."
 
 
 
-;;;###autoload
 (defun executable-self-display ()
   "Turn a text file into a self-displaying Un*x command.
 The magic number of such a command displays all lines but itself."
+  (declare (obsolete nil "25.1"))
   (interactive)
   (if (eq this-command 'executable-self-display)
       (setq this-command 'executable-set-magic))
-  (executable-set-magic executable-self-display "+2"))
+  (executable-set-magic executable-self-display "-n+2"))
 
 ;;;###autoload
 (defun executable-make-buffer-file-executable-if-script-p ()