mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 00:01:33 -08:00
Prefer directed to neutral quotes in docstings and diagnostics. In docstrings, escape apostrophes that would otherwise be translated to curved quotes using the newer, simpler rules. * admin/unidata/unidata-gen.el (unidata-gen-table): * lisp/align.el (align-region): * lisp/allout.el (allout-mode, allout-solicit-alternate-bullet): * lisp/bookmark.el (bookmark-default-annotation-text): * lisp/calc/calc-aent.el (math-read-if, math-read-factor): * lisp/calc/calc-lang.el (math-read-giac-subscr) (math-read-math-subscr): * lisp/calc/calc-misc.el (report-calc-bug): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-read-parse-table-part): * lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules): * lisp/cedet/semantic/complete.el (semantic-displayor-show-request): * lisp/dabbrev.el (dabbrev-expand): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/elint.el (elint-get-top-forms): * lisp/emacs-lisp/lisp-mnt.el (lm-verify): * lisp/emulation/viper-cmd.el (viper-toggle-search-style): * lisp/erc/erc-button.el (erc-nick-popup): * lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login): * lisp/eshell/em-dirs.el (eshell/cd): * lisp/eshell/em-glob.el (eshell-glob-regexp): * lisp/eshell/em-pred.el (eshell-parse-modifiers): * lisp/eshell/esh-arg.el (eshell-parse-arguments): * lisp/eshell/esh-opt.el (eshell-show-usage): * lisp/files-x.el (modify-file-local-variable): * lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer) (filesets-update-pre010505): * lisp/find-cmd.el (find-generic, find-to-string): * lisp/gnus/auth-source.el (auth-source-netrc-parse-entries): * lisp/gnus/gnus-agent.el (gnus-agent-check-overview-buffer) (gnus-agent-fetch-headers): * lisp/gnus/gnus-int.el (gnus-start-news-server): * lisp/gnus/gnus-registry.el: (gnus-registry--split-fancy-with-parent-internal): * lisp/gnus/gnus-score.el (gnus-summary-increase-score): * lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): * lisp/gnus/gnus-topic.el (gnus-topic-rename): * lisp/gnus/legacy-gnus-agent.el (gnus-agent-unlist-expire-days): * lisp/gnus/nnmairix.el (nnmairix-widget-create-query): * lisp/gnus/spam.el (spam-check-blackholes): * lisp/mail/feedmail.el (feedmail-run-the-queue): * lisp/mpc.el (mpc-playlist-rename): * lisp/net/ange-ftp.el (ange-ftp-shell-command): * lisp/net/mairix.el (mairix-widget-create-query): * lisp/net/tramp-cache.el: * lisp/obsolete/otodo-mode.el (todo-more-important-p): * lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): * lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region): * lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region): * lisp/org/ob-core.el (org-babel-goto-named-src-block) (org-babel-goto-named-result): * lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap): * lisp/org/ob-ref.el (org-babel-ref-resolve): * lisp/org/org-agenda.el (org-agenda-prepare): * lisp/org/org-bibtex.el (org-bibtex-fields): * lisp/org/org-clock.el (org-clock-notify-once-if-expired) (org-clock-resolve): * lisp/org/org-feed.el (org-feed-parse-atom-entry): * lisp/org/org-habit.el (org-habit-parse-todo): * lisp/org/org-mouse.el (org-mouse-popup-global-menu) (org-mouse-context-menu): * lisp/org/org-table.el (org-table-edit-formulas): * lisp/org/ox.el (org-export-async-start): * lisp/play/dunnet.el (dun-score, dun-help, dun-endgame-question) (dun-rooms, dun-endgame-questions): * lisp/progmodes/ada-mode.el (ada-goto-matching-start): * lisp/progmodes/ada-xref.el (ada-find-executable): * lisp/progmodes/antlr-mode.el (antlr-options-alists): * lisp/progmodes/flymake.el (flymake-parse-err-lines) (flymake-start-syntax-check-process): * lisp/progmodes/python.el (python-define-auxiliary-skeleton): * lisp/progmodes/sql.el (sql-comint): * lisp/progmodes/verilog-mode.el (verilog-load-file-at-point): * lisp/server.el (server-get-auth-key): * lisp/subr.el (version-to-list): * lisp/textmodes/reftex-ref.el (reftex-label): * lisp/textmodes/reftex-toc.el (reftex-toc-rename-label): * lisp/vc/ediff-diff.el (ediff-same-contents): * lisp/vc/vc-cvs.el (vc-cvs-mode-line-string): * test/automated/tramp-tests.el (tramp-test33-asynchronous-requests): Use directed rather than neutral quotes in diagnostics.
148 lines
4.8 KiB
EmacsLisp
148 lines
4.8 KiB
EmacsLisp
;;; em-script.el --- Eshell script files -*- lexical-binding:t -*-
|
||
|
||
;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
|
||
|
||
;; Author: John Wiegley <johnw@gnu.org>
|
||
|
||
;; This file is part of GNU Emacs.
|
||
|
||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||
;; it under the terms of the GNU General Public License as published by
|
||
;; the Free Software Foundation, either version 3 of the License, or
|
||
;; (at your option) any later version.
|
||
|
||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
;; GNU General Public License for more details.
|
||
|
||
;; You should have received a copy of the GNU General Public License
|
||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
;;; Commentary:
|
||
|
||
;;; Code:
|
||
|
||
(require 'eshell)
|
||
(require 'esh-opt)
|
||
|
||
;;;###autoload
|
||
(progn
|
||
(defgroup eshell-script nil
|
||
"This module allows for the execution of files containing Eshell
|
||
commands, as a script file."
|
||
:tag "Running script files."
|
||
:group 'eshell-module))
|
||
|
||
;;; User Variables:
|
||
|
||
(defcustom eshell-script-load-hook nil
|
||
"A list of functions to call when loading `eshell-script'."
|
||
:version "24.1" ; removed eshell-script-initialize
|
||
:type 'hook
|
||
:group 'eshell-script)
|
||
|
||
(defcustom eshell-login-script (expand-file-name "login" eshell-directory-name)
|
||
"If non-nil, a file to invoke when starting up Eshell interactively.
|
||
This file should be a file containing Eshell commands, where comment
|
||
lines begin with ‘#’."
|
||
:type 'file
|
||
:group 'eshell-script)
|
||
|
||
(defcustom eshell-rc-script (expand-file-name "profile" eshell-directory-name)
|
||
"If non-nil, a file to invoke whenever Eshell is started.
|
||
This includes when running `eshell-command'."
|
||
:type 'file
|
||
:group 'eshell-script)
|
||
|
||
;;; Functions:
|
||
|
||
(defun eshell-script-initialize ()
|
||
"Initialize the script parsing code."
|
||
(make-local-variable 'eshell-interpreter-alist)
|
||
(setq eshell-interpreter-alist
|
||
(cons (cons #'(lambda (file args)
|
||
(string= (file-name-nondirectory file)
|
||
"eshell"))
|
||
'eshell/source)
|
||
eshell-interpreter-alist))
|
||
(make-local-variable 'eshell-complex-commands)
|
||
(setq eshell-complex-commands
|
||
(append '("source" ".") eshell-complex-commands))
|
||
;; these two variables are changed through usage, but we don't want
|
||
;; to ruin it for other modules
|
||
(let (eshell-inside-quote-regexp
|
||
eshell-outside-quote-regexp)
|
||
(and (not eshell-non-interactive-p)
|
||
eshell-login-script
|
||
(file-readable-p eshell-login-script)
|
||
(eshell-do-eval
|
||
(list 'eshell-commands
|
||
(catch 'eshell-replace-command
|
||
(eshell-source-file eshell-login-script))) t))
|
||
(and eshell-rc-script
|
||
(file-readable-p eshell-rc-script)
|
||
(eshell-do-eval
|
||
(list 'eshell-commands
|
||
(catch 'eshell-replace-command
|
||
(eshell-source-file eshell-rc-script))) t))))
|
||
|
||
(defun eshell-source-file (file &optional args subcommand-p)
|
||
"Execute a series of Eshell commands in FILE, passing ARGS.
|
||
Comments begin with ‘#’."
|
||
(interactive "f")
|
||
(let ((orig (point))
|
||
(here (point-max))
|
||
(inhibit-point-motion-hooks t))
|
||
(goto-char (point-max))
|
||
(with-silent-modifications
|
||
;; FIXME: Why not use a temporary buffer and avoid this
|
||
;; "insert&delete" business? --Stef
|
||
(insert-file-contents file)
|
||
(goto-char (point-max))
|
||
(throw 'eshell-replace-command
|
||
(prog1
|
||
(list 'let
|
||
(list (list 'eshell-command-name (list 'quote file))
|
||
(list 'eshell-command-arguments
|
||
(list 'quote args)))
|
||
(let ((cmd (eshell-parse-command (cons here (point)))))
|
||
(if subcommand-p
|
||
(setq cmd (list 'eshell-as-subcommand cmd)))
|
||
cmd))
|
||
(delete-region here (point))
|
||
(goto-char orig))))))
|
||
|
||
(defun eshell/source (&rest args)
|
||
"Source a file in a subshell environment."
|
||
(eshell-eval-using-options
|
||
"source" args
|
||
'((?h "help" nil nil "show this usage screen")
|
||
:show-usage
|
||
:usage "FILE [ARGS]
|
||
Invoke the Eshell commands in FILE in a subshell, binding ARGS to $1,
|
||
$2, etc.")
|
||
(eshell-source-file (car args) (cdr args) t)))
|
||
|
||
(put 'eshell/source 'eshell-no-numeric-conversions t)
|
||
|
||
(defun eshell/. (&rest args)
|
||
"Source a file in the current environment."
|
||
(eshell-eval-using-options
|
||
"." args
|
||
'((?h "help" nil nil "show this usage screen")
|
||
:show-usage
|
||
:usage "FILE [ARGS]
|
||
Invoke the Eshell commands in FILE within the current shell
|
||
environment, binding ARGS to $1, $2, etc.")
|
||
(eshell-source-file (car args) (cdr args))))
|
||
|
||
(put 'eshell/. 'eshell-no-numeric-conversions t)
|
||
|
||
(provide 'em-script)
|
||
|
||
;; Local Variables:
|
||
;; generated-autoload-file: "esh-groups.el"
|
||
;; End:
|
||
|
||
;;; em-script.el ends here
|