Mercurial > emacs
view move-if-change @ 112210:43d75ad47207
* lisp/progmodes/prolog.el: Use syntax-propertize. Further code cleanup.
(prolog-use-prolog-tokenizer-flag): Change default when
syntax-propertize can be used.
(prolog-syntax-propertize-function): New var.
(prolog-mode-variables): Move make-local-variable into `set'.
Don't make comment-column local since we don't set it.
Set comment-add (as it was in previous prolog.el). Use dolist.
Set syntax-propertize-function.
(prolog-mode, prolog-inferior-mode):
Call prolog(-inferior)-menu directly, not through the mode-hook.
(prolog-buffer-module, prolog-indent-level)
(prolog-paren-is-the-first-on-line-p, prolog-paren-balance)
(prolog-comment-limits, prolog-goto-comment-column):
Use line-(end|beginning)-position.
(prolog-build-prolog-command): Tighten up regexp.
(prolog-consult-compile): Move make-local-variable into `set'.
(prolog-consult-compile-filter, prolog-goto-next-paren)
(prolog-help-on-predicate, prolog-clause-info)
(prolog-mark-predicate): Don't let+setq.
(prolog-indent-line): Use indent-line-to.
Only call prolog-goto-comment-column if necessary.
(prolog-indent-level): Use bobp.
(prolog-first-pos-on-line): Remove, not used any more.
(prolog-in-string-or-comment): Use syntax-ppss if available.
(prolog-help-on-predicate): Use read-string.
(prolog-goto-predicate-info): Simplify.
(prolog-read-predicate): Use `default' rather than `initial'.
(prolog-temporary-file): Use make-temp-file to close a security hole.
(prolog-toggle-sicstus-sd): New command.
(prolog-electric-underscore, prolog-variables-to-anonymous):
Use dynamic-scoping as it was meant.
(prolog-menu): Move menu definitions to top-level.
Use a toggle-button for Sicstus's source debugger.
Change "Code" to the more usual "Prolog", and hence change "Prolog"
to "System".
(prolog-inferior-menu): Reuse prolog-menu's help menu.
Move other menu definition to top-level.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 13 Jan 2011 15:46:38 -0500 |
parents | 14a97ab281d5 |
children |
line wrap: on
line source
#!/bin/sh # Like mv $1 $2, but if the files are the same, just delete $1. # Status is zero if successful, nonzero otherwise. VERSION='2007-09-28 23:10'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc. # This program 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. # This program 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 this program. If not, see <http://www.gnu.org/licenses/>. usage="usage: $0 SOURCE DEST" help="$usage or: $0 OPTION If SOURCE is different than DEST, then move it to DEST; else remove SOURCE. --help display this help and exit --version output version information and exit Report bugs to <bug-gnulib@gnu.org>." version=`expr "$VERSION" : '\([^ ]*\)'` version="move-if-change (gnulib) $version Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law." for arg do case $arg in --help | --hel | --he | --h) exec echo "$help" ;; --version | --versio | --versi | --vers | --ver | --ve | --v) exec echo "$version" ;; --) shift break ;; -*) echo "$0: invalid option: $arg" >&2 exit 1 ;; *) break ;; esac done test $# = 2 || { echo "$0: $usage" >&2; exit 1; } if test -r "$2" && cmp -s -- "$1" "$2"; then rm -f -- "$1" else mv -f -- "$1" "$2" fi ## Local Variables: ## eval: (add-hook 'write-file-hooks 'time-stamp) ## time-stamp-start: "VERSION='" ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" ## time-stamp-time-zone: "UTC" ## time-stamp-end: "'; # UTC" ## End: