diff options
Diffstat (limited to 'lisp')
319 files changed, 2303 insertions, 1864 deletions
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index a40f8f3d67a..224e2a6da7f 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -1,3 +1,8 @@ +2015-09-20 Ken Manheimer <ken.manheimer@gmail.com> + + * python.el (python-pdbtrack-set-tracked-buffer): Repair pdbtrack + so it follows transition from one remote file to another. + 2015-04-06 Alan Mackenzie <acm@muc.de> Fix miscellaneous glitches in cc-mode.el. (Bug#20245) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 8bcb2d6dc5f..15d4d37f7ba 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -103,7 +103,7 @@ BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) \ # Files to compile before others during a bootstrap. This is done to # speed up the bootstrap process. They're ordered by size, so we use # the slowest-compiler on the smallest file and move to larger files as the -# compiler gets faster. `autoload.elc' comes last because it is not used by +# compiler gets faster. 'autoload.elc' comes last because it is not used by # the compiler (so its compilation does not speed up subsequent compilations), # it's only placed here so as to speed up generation of the loaddefs.el file. @@ -272,22 +272,22 @@ $(THEFILE)c: compile-first: $(COMPILE_FIRST) -# In `compile-main' we could directly do +# In 'compile-main' we could directly do # ... | xargs $(MAKE) # and it works, but it generates a lot of messages like # make[2]: gnus/gnus-mlspl.elc is up to date. # so instead, we use "xargs echo" to split the list of file into manageable -# chunks and then use an intermediate `compile-targets' target so the +# chunks and then use an intermediate 'compile-targets' target so the # actual targets (the .elc files) are not mentioned as targets on the # make command line. .PHONY: compile-targets -# TARGETS is set dynamically in the recursive call from `compile-main'. +# TARGETS is set dynamically in the recursive call from 'compile-main'. compile-targets: $(TARGETS) # Compile all the Elisp files that need it. Beware: it approximates -# `no-byte-compile', so watch out for false-positives! +# 'no-byte-compile', so watch out for false-positives! compile-main: leim semantic compile-clean @(cd $(lisp) && \ els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ @@ -326,7 +326,7 @@ semantic: compile: $(LOADDEFS) autoloads compile-first $(MAKE) compile-main -# Compile all Lisp files. This is like `compile' but compiles files +# Compile all Lisp files. This is like 'compile' but compiles files # unconditionally. Some files don't actually get compiled because they # set the local variable no-byte-compile. compile-always: diff --git a/lisp/README b/lisp/README index e250a700426..b68ad5e30f9 100644 --- a/lisp/README +++ b/lisp/README @@ -6,8 +6,7 @@ files are architecture-independent. The term subdirectory contains Lisp files that customize Emacs for certain terminal types. When Emacs starts, it checks the TERM environment variable to get the terminal type and loads -`term/${TERM}.el' if it exists. +'term/${TERM}.el' if it exists. The other subdirectories hold Lisp packages grouped by their general purpose. - diff --git a/lisp/allout.el b/lisp/allout.el index f7055734961..5273fe2b433 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -917,7 +917,7 @@ has been customized to enable this behavior), `allout-mode' will be automatically activated. The layout dictated by the value will be used to set the initial exposure when `allout-mode' is activated. -\*You should not setq-default this variable non-nil unless you want every +*You should not setq-default this variable non-nil unless you want every visited file to be treated as an allout file.* The value would typically be set by a file local variable. For @@ -1512,7 +1512,7 @@ already associated with a file. It consists of an encrypted random string useful only to verify that a passphrase entered by the user is effective for decryption. The passphrase -itself is \*not* recorded in the file anywhere, and the encrypted contents +itself is *not* recorded in the file anywhere, and the encrypted contents are random binary characters to avoid exposing greater susceptibility to search attacks. @@ -3721,7 +3721,7 @@ Nuances: (save-match-data (let* ((inhibit-field-text-motion t) (depth (+ (allout-current-depth) relative-depth)) - (opening-on-blank (if (looking-at "^\$") + (opening-on-blank (if (looking-at "^$") (not (setq before nil)))) ;; bunch o vars set while computing ref-topic opening-numbered @@ -5562,9 +5562,8 @@ Defaults: ;; Specified but not a buffer -- get it: (let ((got (get-buffer frombuf))) (if (not got) - (error (concat "allout-process-exposed: source buffer " - frombuf - " not found.")) + (error "allout-process-exposed: source buffer %s not found." + frombuf) (setq frombuf got)))) ;; not specified -- default it: (setq frombuf (current-buffer))) @@ -5909,7 +5908,7 @@ file with topics pending encryption is saved, topics pending encryption are encrypted. See `allout-encrypt-unencrypted-on-saves' for auto-encryption specifics. -\*NOTE WELL* that automatic encryption that happens during saves will +*NOTE WELL* that automatic encryption that happens during saves will default to symmetric encryption -- you must deliberately (re)encrypt key-pair encrypted topics if you want them to continue to use the key-pair cipher. diff --git a/lisp/bindings.el b/lisp/bindings.el index 3672812e5a1..8560871694d 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1265,9 +1265,9 @@ if `inhibit-field-text-motion' is non-nil." (define-key abbrev-map "e" 'expand-abbrev) (define-key abbrev-map "'" 'expand-abbrev) ;; (define-key ctl-x-map "\C-a" 'add-mode-abbrev) -;; (define-key ctl-x-map "\+" 'add-global-abbrev) +;; (define-key ctl-x-map "+" 'add-global-abbrev) ;; (define-key ctl-x-map "\C-h" 'inverse-add-mode-abbrev) -;; (define-key ctl-x-map "\-" 'inverse-add-global-abbrev) +;; (define-key ctl-x-map "-" 'inverse-add-global-abbrev) (define-key esc-map "'" 'abbrev-prefix-mark) (define-key ctl-x-map "'" 'expand-abbrev) (define-key ctl-x-map "\C-b" 'list-buffers) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 035148120a4..e9310259e7e 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -138,7 +138,7 @@ This is as opposed to inline text at the top of the buffer." (defconst bookmark-bmenu-inline-header-height 2 "Number of lines used for the *Bookmark List* header -\(only significant when `bookmark-bmenu-use-header-line' is nil\).") +\(only significant when `bookmark-bmenu-use-header-line' is nil).") (defconst bookmark-bmenu-marks-width 2 "Number of columns (chars) used for the *Bookmark List* marks column, diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index cb6ab6f8ecc..933c446875e 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -574,6 +574,7 @@ (define-key calc-mode-map "uG" 'calc-vector-geometric-mean) (define-key calc-mode-map "uM" 'calc-vector-mean) (define-key calc-mode-map "uN" 'calc-vector-min) + (define-key calc-mode-map "uR" 'calc-vector-rms) (define-key calc-mode-map "uS" 'calc-vector-sdev) (define-key calc-mode-map "uU" 'calc-undo) (define-key calc-mode-map "uX" 'calc-vector-max) @@ -932,7 +933,7 @@ calc-preserve-point calc-replace-selections calc-replace-sub-formula calc-roll-down-with-selections calc-roll-up-with-selections calc-sel-error) - ("calc-stat" calc-vector-op calcFunc-agmean + ("calc-stat" calc-vector-op calcFunc-agmean calcFunc-rms calcFunc-vcorr calcFunc-vcount calcFunc-vcov calcFunc-vflat calcFunc-vgmean calcFunc-vhmean calcFunc-vmax calcFunc-vmean calcFunc-vmeane calcFunc-vmedian calcFunc-vmin calcFunc-vpcov @@ -1147,8 +1148,8 @@ calc-vector-covariance calc-vector-geometric-mean calc-vector-harmonic-mean calc-vector-max calc-vector-mean calc-vector-mean-error calc-vector-median calc-vector-min calc-vector-pop-covariance calc-vector-pop-sdev -calc-vector-pop-variance calc-vector-product calc-vector-sdev -calc-vector-sum calc-vector-variance) +calc-vector-pop-variance calc-vector-product calc-vector-rms +calc-vector-sdev calc-vector-sum calc-vector-variance) ("calc-store" calc-assign calc-copy-special-constant calc-copy-variable calc-declare-variable @@ -1292,6 +1293,7 @@ calc-kill calc-kill-region calc-yank)))) (define-key calc-help-map "?" 'calc-help-for-help) (define-key calc-help-map "\C-h" 'calc-help-for-help)) +(defvar calc-prefix-help-retry nil) (defvar calc-prefix-help-phase 0) (defun calc-do-prefix-help (msgs group key) (if calc-full-help-flag @@ -1299,7 +1301,7 @@ calc-kill calc-kill-region calc-yank)))) (if (cdr msgs) (progn (setq calc-prefix-help-phase - (if (eq this-command last-command) + (if calc-prefix-help-retry (% (1+ calc-prefix-help-phase) (1+ (length msgs))) 0)) (let ((msg (nth calc-prefix-help-phase msgs))) @@ -1320,7 +1322,13 @@ calc-kill calc-kill-region calc-yank)))) (message "%s: %s: %c-" group (car msgs) key) (message "%s: (none) %c-" group key)) (message "%s: %s" group (car msgs)))) - (and key (calc-unread-command key)))) + (let* ((chr (read-char)) + (bnd (local-key-binding (if key (string key chr) (string chr))))) + (setq calc-prefix-help-retry (= chr ??)) + (if bnd + (call-interactively bnd) + (message "%s is undefined" + (key-description (if key (vector key chr) (vector chr)))))))) ;;;; Commands. diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 444bb5ef920..33cb1c1566c 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -386,7 +386,7 @@ C-w Describe how there is no warranty for Calc." (interactive) (calc-quit) (view-emacs-news) - (re-search-forward "^\*+ .*\\<Calc\\>" nil t)) + (re-search-forward "^\\*+ .*\\<Calc\\>" nil t)) (defvar calc-help-long-names '((?b . "binary/business") (?g . "graphics") diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el index 3b5949c274b..d2c9da86a6f 100644 --- a/lisp/calc/calc-map.el +++ b/lisp/calc/calc-map.el @@ -417,6 +417,7 @@ ( ?G 1 calcFunc-vgmean ) ( ?M 1 calcFunc-vmean ) ( ?N 1 calcFunc-vmin ) + ( ?R 1 calcFunc-rms ) ( ?S 1 calcFunc-vsdev ) ( ?X 1 calcFunc-vmax ) ) ( ( ?C 2 calcFunc-vpcov ) diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el index 44086872dd0..8610090c5d1 100644 --- a/lisp/calc/calc-menu.el +++ b/lisp/calc/calc-menu.el @@ -863,6 +863,13 @@ :keys "I u M" :active (>= (calc-stack-size) 1) :help "The average (arithmetic mean) of the data values as an error form"] + ["rms(1:)" + (progn + (require 'calc-stat) + (call-interactively 'calc-vector-rms)) + :keys "u R" + :active (>= (calc-stack-size) 1) + :help "The root mean square of the data values"] ["sdev(1:)" (progn (require 'calc-stat) diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el index cf0b3ea4a12..a797db2e67d 100644 --- a/lisp/calc/calc-stat.el +++ b/lisp/calc/calc-stat.el @@ -71,6 +71,11 @@ (calc-vector-op "meae" 'calcFunc-vmeane arg) (calc-vector-op "mean" 'calcFunc-vmean arg))))) +(defun calc-vector-rms (arg) + (interactive "P") + (calc-slow-wrapper + (calc-vector-op "rms" 'calcFunc-rms arg))) + (defun calc-vector-mean-error (arg) (interactive "P") (calc-invert-func) @@ -318,6 +323,12 @@ suminvsqrwts)) (math-div (calcFunc-reduce '(var add var-add) means) len))))))) +(defun calcFunc-rms (a) + "Return the root-mean-square of the vector A." + (math-sqrt + (calcFunc-vmean + (calcFunc-map '(var abssqr var-abssqr) a)))) + (defun math-fix-int-intv (x) (if (math-floatp x) x diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index 3d8c865c7bf..21209c66677 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -58,8 +58,8 @@ (let ((msg (calc-store-value var (or calc-given-value (calc-top 1)) "" calc-given-value-flag))) - (message (concat "Stored to variable \"%s\"" msg) - (calc-var-name var))))) + (message "Stored to variable \"%s\"%s" + (calc-var-name var) msg)))) (setq var (calc-is-assignments (calc-top 1))) (if var (while var @@ -67,8 +67,8 @@ (calc-store-value (car (car var)) (cdr (car var)) (if (not (cdr var)) "") (if (not (cdr var)) 1)))) - (message (concat "Stored to variable \"%s\"" msg) - (calc-var-name (car (car var))))) + (message "Stored to variable \"%s\"%s" + (calc-var-name (car (car var))) msg)) (setq var (cdr var)))))))) (defun calc-store-plus (&optional var) @@ -422,8 +422,8 @@ (calc-var-name var1))))) (if var2 (let ((msg (calc-store-value var2 value ""))) - (message (concat "Variable \"%s\" copied to \"%s\"" msg) - (calc-var-name var1) (calc-var-name var2)))))))) + (message "Variable \"%s\" copied to \"%s\"%s" + (calc-var-name var1) (calc-var-name var2) msg))))))) (defvar calc-last-edited-variable nil) (defun calc-edit-variable (&optional var) diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index bb7e97ea7f3..2c646456112 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -52,7 +52,8 @@ Type 0 is the cons cell (HIGH . LOW), type 1 is the list (HIGH LOW), type 2 is the list (HIGH LOW MICRO), and type 3 is the list (HIGH LOW MICRO PICO)." (declare (indent 1) - (debug ((&rest (symbolp symbolp symbolp &or [symbolp form] form)) + (debug ((&rest (symbolp symbolp symbolp + &or [symbolp symbolp form] [symbolp form] form)) body))) (if varlist (let* ((elt (pop varlist)) @@ -178,7 +179,7 @@ If DATE lacks timezone information, GMT is assumed." (defun time-to-seconds (&optional time) "Convert optional value TIME to a floating point number. TIME defaults to the current time." - (with-decoded-time-value ((high low micro pico type + (with-decoded-time-value ((high low micro pico _type (or time (current-time)))) (+ (* high 65536.0) low @@ -261,8 +262,8 @@ Return the difference in the format of a time value." (defun time-less-p (t1 t2) "Return non-nil if time value T1 is earlier than time value T2." - (with-decoded-time-value ((high1 low1 micro1 pico1 type1 t1) - (high2 low2 micro2 pico2 type2 t2)) + (with-decoded-time-value ((high1 low1 micro1 pico1 _type1 t1) + (high2 low2 micro2 pico2 _type2 t2)) (or (< high1 high2) (and (= high1 high2) (or (< low1 low2) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index a04bf8237d9..27ca17b4e4f 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -74,7 +74,7 @@ truenames (those with the extension \".toda\")." (let ((files (if (file-exists-p todo-directory) (mapcar 'file-truename (directory-files todo-directory t - (if archives "\.toda$" "\.todo$") t))))) + (if archives "\\.toda$" "\\.todo$") t))))) (sort files (lambda (s1 s2) (let ((cis1 (upcase s1)) (cis2 (upcase s2))) (string< cis1 cis2)))))) @@ -1112,7 +1112,7 @@ these files, also rename them accordingly." (snname (todo-short-file-name nname)) (files (directory-files todo-directory t (concat ".*" (regexp-quote soname) - ".*\.tod[aorty]$") t))) + ".*\\.tod[aorty]$") t))) (dolist (f files) (let* ((sfname (todo-short-file-name f)) (fext (file-name-extension f t)) @@ -3963,7 +3963,7 @@ regexp items." (defun todo-find-filtered-items-file () "Choose a filtered items file and visit it." (interactive) - (let ((files (directory-files todo-directory t "\.tod[rty]$" t)) + (let ((files (directory-files todo-directory t "\\.tod[rty]$" t)) falist file) (dolist (f files) (let ((type (cond ((equal (file-name-extension f) "todr") "regexp") @@ -4892,7 +4892,7 @@ With nil or omitted CATEGORY, default to the current category." (widen) (goto-char (point-min)) (setq todo-categories - (if (looking-at "\(\(\"") + (if (looking-at "((\"") (read (buffer-substring-no-properties (line-beginning-position) (line-end-position))) @@ -5643,9 +5643,10 @@ have been removed." (when deleted (let ((pl (> (length deleted) 1)) (names (mapconcat (lambda (f) (concat "\"" f "\"")) deleted ", "))) - (message (concat "File" (if pl "s" "") " " names " ha" (if pl "ve" "s") + (message (concat "File" (if pl "s" "") " %s ha" (if pl "ve" "s") " been deleted and removed from\n" - "the list of category completion files"))) + "the list of category completion files") + names)) (todo-reevaluate-category-completions-files-defcustom) (custom-set-default 'todo-category-completions-files (symbol-value 'todo-category-completions-files)) @@ -6022,7 +6023,7 @@ the empty string (i.e., no time string)." "The :set function for user option `todo-nondiary-marker'." (let* ((oldvalue (symbol-value symbol)) (files (append todo-files todo-archives - (directory-files todo-directory t "\.tod[rty]$" t)))) + (directory-files todo-directory t "\\.tod[rty]$" t)))) (custom-set-default symbol value) ;; Need to reset these to get font-locking right. (setq todo-nondiary-start (nth 0 todo-nondiary-marker) @@ -6075,7 +6076,7 @@ the empty string (i.e., no time string)." "The :set function for user option `todo-done-string'." (let ((oldvalue (symbol-value symbol)) (files (append todo-files todo-archives - (directory-files todo-directory t "\.todr$" t)))) + (directory-files todo-directory t "\\.todr$" t)))) (custom-set-default symbol value) ;; Need to reset this to get font-locking right. (setq todo-done-string-start @@ -6104,7 +6105,7 @@ the empty string (i.e., no time string)." "The :set function for user option `todo-comment-string'." (let ((oldvalue (symbol-value symbol)) (files (append todo-files todo-archives - (directory-files todo-directory t "\.todr$" t)))) + (directory-files todo-directory t "\\.todr$" t)))) (custom-set-default symbol value) (when (not (equal value oldvalue)) (dolist (f files) @@ -6130,7 +6131,7 @@ the empty string (i.e., no time string)." "The :set function for user option `todo-highlight-item'." (let ((oldvalue (symbol-value symbol)) (files (append todo-files todo-archives - (directory-files todo-directory t "\.tod[rty]$" t)))) + (directory-files todo-directory t "\\.tod[rty]$" t)))) (custom-set-default symbol value) (when (not (equal value oldvalue)) (dolist (f files) diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el index b4fea421447..7c2a6b8dbf1 100644 --- a/lisp/cedet/ede/auto.el +++ b/lisp/cedet/ede/auto.el @@ -155,9 +155,9 @@ into memory.") Specifying this matcher object will allow EDE to perform a complex check without loading the project. -NOTE: If you use dirmatch, you may need to set :root-only to `nil'. +NOTE: If you use dirmatch, you may need to set :root-only to nil. While it may be a root based project, all subdirs will happen to return -true for the dirmatch, so for scanning purposes, set it to `nil'.") +true for the dirmatch, so for scanning purposes, set it to nil.") (proj-root :initarg :proj-root :type function :documentation "A function symbol to call for the project root. diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index 8d013245bb6..b865ff5028d 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el @@ -302,6 +302,8 @@ CLASS is the EIEIO class that is used to track this project. It should subclass ".svn" 'ede-generic-vc-project) (ede-generic-new-autoloader "generic-cvs" "Generic CVS" "CVS" 'ede-generic-vc-project) + (ede-generic-new-autoloader "generic-mtn" "Generic Monotone" + "_MTN/options" 'ede-generic-vc-project) ;; Take advantage of existing 'projectile' based projects. ;; @TODO - if projectile supports compile commands etc, can we diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el index de06910f75e..34e302d3d2c 100644 --- a/lisp/cedet/ede/proj-obj.el +++ b/lisp/cedet/ede/proj-obj.el @@ -126,7 +126,7 @@ file.") (defvar ede-source-c++ (ede-sourcecode "ede-source-c++" :name "C++" - :sourcepattern "\\.\\(c\\(pp?\\|c\\|xx\\|++\\)\\|C\\\(PP\\)?\\)$" + :sourcepattern "\\.\\(c\\(pp?\\|c\\|xx\\|++\\)\\|C\\(PP\\)?\\)$" :auxsourcepattern "\\.\\(hpp?\\|hh?\\|hxx\\|H\\)$" :garbagepattern '("*.o" "*.obj" ".deps/*.P" ".lo")) "C++ source code definition.") diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index dfd44ac07c6..a8edbe8fbdf 100644 --- a/lisp/cedet/ede/proj-shared.el +++ b/lisp/cedet/ede/proj-shared.el @@ -166,7 +166,7 @@ Use ldlibs to add addition libraries.") "%.lo: %.c\n" "\t@echo '$(LTCOMPILE) -c $<'; \\\n" "\t$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<\n" - "\t@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \\\n" + "\t@-sed -e 's/^\\([^:]*\\)\\.o:/\\1.lo \\1.o:/' \\\n" "\t < .deps/$(*F).p > .deps/$(*F).P\n" "\t@-rm -f .deps/$(*F).p\n\n")) ) diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 64c1f08af22..8736a4ff93c 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -604,7 +604,7 @@ PROMPT, INITIAL, HIST, and DEFAULT are the same as for `completing-read'." ;; (defun overload-docstring-extension (overload) "Return the doc string that augments the description of OVERLOAD." - (let ((doc "\n\This function can be overloaded\ + (let ((doc "\nThis function can be overloaded\ with `define-mode-local-override'.") (sym (overload-obsoleted-by overload))) (when sym @@ -677,7 +677,7 @@ SYMBOL is a function that can be overridden." result)) (defun xref-mode-local-overload (symbol) - "For ‘elisp-xref-find-def-functions’; add overloads for SYMBOL." + "For `elisp-xref-find-def-functions'; add overloads for SYMBOL." ;; Current buffer is the buffer where xref-find-definitions was invoked. (when (get symbol 'mode-local-overload) (let* ((symbol-file (find-lisp-object-file-name symbol (symbol-function symbol))) @@ -738,11 +738,11 @@ SYMBOL is a function that can be overridden." (defconst xref-mode-local-find-overloadable-regexp "(\\(\\(define-overloadable-function\\)\\|\\(define-overload\\)\\) +%s" - "Regexp used by ‘xref-find-definitions’ when searching for a + "Regexp used by `xref-find-definitions' when searching for a mode-local overloadable function definition.") (defun xref-mode-local-find-override (meta-name) - "Function used by ‘xref-find-definitions’ when searching for an + "Function used by `xref-find-definitions' when searching for an override of a mode-local overloadable function. META-NAME is a cons (OVERLOADABLE-SYMBOL . MAJOR-MODE)." (let* ((override (car meta-name)) diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index d32b2c4f001..9b7882c7acd 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -156,7 +156,7 @@ Presumably if you call this you will insert something new there." "Display the string FMT formatted with ARGS at the end of the minibuffer." (if semantic-complete-inline-overlay (apply 'message fmt args) - (message (concat (buffer-string) (apply #'format-message fmt args))))) + (apply 'message (concat "%s" fmt) (buffer-string) args))) ;;; ------------------------------------------------------------ ;;; MINIBUFFER: Option Selection harnesses diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el index 6c6616d7009..34fc8ba92ce 100644 --- a/lisp/cedet/semantic/tag.el +++ b/lisp/cedet/semantic/tag.el @@ -1212,7 +1212,7 @@ Returns a list of cooked tags. The parser returns raw tags with positional data START END at the end of the tag data structure (a list for now). We convert it from that to a cooked state that uses an overlay proxy, that is, a vector -\[START END]. +[START END]. The raw tag is changed with side effects and maybe expanded in several derived tags when the variable `semantic-tag-expand-function' diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 6730e8e5bc7..585c11a05d3 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -915,7 +915,7 @@ An NVARS by NRULES matrix of bits indicating which rules can help derive the beginning of the data for each nonterminal. For example, if symbol 5 can be derived as the sequence of symbols 8 3 20, and one of the rules for deriving symbol 8 is rule 4, then the -\[5 - NTOKENS, 4] bit in FDERIVES is set." +[5 - NTOKENS, 4] bit in FDERIVES is set." (let (i j k) (setq fderives (make-vector nvars nil)) (setq i 0) diff --git a/lisp/cedet/semantic/wisent/wisent.el b/lisp/cedet/semantic/wisent/wisent.el index fb77cb36947..4c5274198dd 100644 --- a/lisp/cedet/semantic/wisent/wisent.el +++ b/lisp/cedet/semantic/wisent/wisent.el @@ -364,7 +364,7 @@ automaton has only one entry point." - START specify the start symbol (nonterminal) used by the parser as its goal. It defaults to the start symbol defined in the grammar - \(see also `wisent-compile-grammar')." + (see also `wisent-compile-grammar')." (run-hooks 'wisent-pre-parse-hook) (let* ((actions (aref automaton 0)) (gotos (aref automaton 1)) diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 7c5819d2126..724fc2bb7b0 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -430,7 +430,7 @@ in the next one.") (file-name-nondirectory file-name))) (comint-send-string (scheme-proc) (concat "(load \"" file-name - "\"\)\n"))) + "\")\n"))) (defun scheme-compile-file (file-name) "Compile a Scheme file FILE-NAME in the inferior Scheme process." @@ -444,7 +444,7 @@ in the next one.") (file-name-nondirectory file-name))) (comint-send-string (scheme-proc) (concat "(compile-file \"" file-name - "\"\)\n"))) + "\")\n"))) (defvar scheme-buffer nil "The current scheme process buffer. diff --git a/lisp/comint.el b/lisp/comint.el index ead2757e6e8..e70fe88baf7 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1581,7 +1581,7 @@ Go to the history element by the absolute history position HIST-POS." (defun comint-within-quotes (beg end) "Return t if the number of quotes between BEG and END is odd. Quotes are single and double." - (let ((countsq (comint-how-many-region "\\(^\\|[^\\\\]\\)\'" beg end)) + (let ((countsq (comint-how-many-region "\\(^\\|[^\\\\]\\)'" beg end)) (countdq (comint-how-many-region "\\(^\\|[^\\\\]\\)\"" beg end))) (or (= (mod countsq 2) 1) (= (mod countdq 2) 1)))) diff --git a/lisp/custom.el b/lisp/custom.el index ea5ab7a4773..e212e32807d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1214,13 +1214,11 @@ Return t if THEME was successfully loaded, nil otherwise." (put theme 'theme-documentation nil)) (let ((fn (locate-file (concat (symbol-name theme) "-theme.el") (custom-theme--load-path) - '("" "c"))) - hash) + '("" "c")))) (unless fn (error "Unable to find theme file for `%s'" theme)) (with-temp-buffer (insert-file-contents fn) - (setq hash (secure-hash 'sha256 (current-buffer))) ;; Check file safety with `custom-safe-themes', prompting the ;; user if necessary. (when (or no-confirm @@ -1228,8 +1226,9 @@ Return t if THEME was successfully loaded, nil otherwise." (and (memq 'default custom-safe-themes) (equal (file-name-directory fn) (expand-file-name "themes/" data-directory))) - (member hash custom-safe-themes) - (custom-theme-load-confirm hash)) + (let ((hash (secure-hash 'sha256 (current-buffer)))) + (or (member hash custom-safe-themes) + (custom-theme-load-confirm hash)))) (let ((custom--inhibit-theme-enable t) (buffer-file-name fn)) ;For load-history. (eval-buffer)) diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index 42d7fd369ed..b32d115d499 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -120,7 +120,7 @@ Example: Set this to \"\\\\$\" for programming languages in which variable names may appear with or without a leading `$'. -\(For example, in Makefiles.\) +\(For example, in Makefiles.) Set this to nil if no characters should be skipped." :type '(choice regexp diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 62330fca71b..4ee830023fc 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -168,7 +168,8 @@ ;; "Switch to non-existing buffers only upon confirmation." ;; (interactive "BSwitch to buffer: ") ;; (if (or (get-buffer (ad-get-arg 0)) -;; (y-or-n-p (format "‘%s’ does not exist, create? " (ad-get-arg 0)))) +;; (y-or-n-p (format-message "`%s' does not exist, create? " +;; (ad-get-arg 0)))) ;; ad-do-it)) ;; ;;(defadvice find-file (before existing-files-only activate) @@ -3106,7 +3107,7 @@ deactivation, which might run hooks and get into other trouble." "Define a piece of advice for FUNCTION (a symbol). The syntax of `defadvice' is as follows: - \(defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) + (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) [DOCSTRING] [INTERACTIVE-FORM] BODY...) diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el index e3d83eb127f..99a329b021e 100644 --- a/lisp/emacs-lisp/avl-tree.el +++ b/lisp/emacs-lisp/avl-tree.el @@ -615,7 +615,7 @@ is more efficient." of all elements of TREE. If REVERSE is non-nil, the stack is sorted in reverse order. -\(See also `avl-tree-stack-pop'\). +\(See also `avl-tree-stack-pop'). Note that any modification to TREE *immediately* invalidates all avl-tree-stacks created before the modification (in particular, diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 279ffa37b7e..8699af60ea8 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -397,7 +397,7 @@ invoked interactively are excluded from this list." "Alist of functions and their call tree. Each element looks like - \(FUNCTION CALLERS CALLS\) + (FUNCTION CALLERS CALLS) where CALLERS is a list of functions that call FUNCTION, and CALLS is a list of functions for which calls were generated while compiling @@ -1814,7 +1814,7 @@ The value is non-nil if there were no errors, nil if errors." ;; compile this file. (if (with-current-buffer input-buffer no-byte-compile) (progn - ;; (message "%s not compiled because of ‘no-byte-compile: %s’" + ;; (message "%s not compiled because of `no-byte-compile: %s'" ;; (byte-compile-abbreviate-file filename) ;; (with-current-buffer input-buffer no-byte-compile)) (when (file-exists-p target-file) @@ -4196,7 +4196,7 @@ binding slots have been popped." ;; (consp (get condition ;; 'error-conditions))))) ;; (byte-compile-warn - ;; "‘%s’ is not a known condition name + ;; "`%s' is not a known condition name ;; (in condition-case)" ;; condition)) ) @@ -4235,7 +4235,7 @@ binding slots have been popped." ;; for the argument to `signal', not to `condition-case'. ;;(unless (consp (get c 'error-conditions)) ;; (byte-compile-warn - ;; "‘%s’ is not a known condition name (in condition-case)" + ;; "`%s' is not a known condition name (in condition-case)" ;; c)) ) (byte-compile-push-constant condition)) @@ -4529,11 +4529,11 @@ whose definitions have been compiled in this Emacs session, as well as all functions called by those functions. The call graph does not include macros, inline functions, or -primitives that the byte-code interpreter knows about directly \(eq, -cons, etc.\). +primitives that the byte-code interpreter knows about directly +\(`eq', `cons', etc.). The call tree also lists those functions which are not known to be called -\(that is, to which no calls have been compiled\), and which cannot be +\(that is, to which no calls have been compiled), and which cannot be invoked interactively." (interactive) (message "Generating call tree...") diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 205ae6d711e..0f75f0a1664 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -679,7 +679,7 @@ and updates the data stored in ENV." ;; ((and `(quote ,v . ,_) (guard (assq v env))) ;; (byte-compile-log-warning - ;; (format-message "Possible confusion variable/symbol for ‘%S’" v))) + ;; (format-message "Possible confusion variable/symbol for `%S'" v))) (`(quote . ,_) nil) ; quote form (`(function . ,_) nil) ; same as quote diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index 3b69e959282..536e4186c41 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -162,7 +162,7 @@ def\\(?:un\\|subst\\|foo\\|method\\|class\\|\ ine-\\(?:derived\\|generic\\|\\(?:global\\(?:ized\\)?-\\)?minor\\)-mode\\|\ \\(?:ine-obsolete-function-\\)?alias[ \t]+'\\|\ ine-overloadable-function\\)\\)\ -\[ \t]*%s\\([ \t;]+\\|$\\)") +[ \t]*%s\\([ \t;]+\\|$\\)") (regexp-opt (mapcar 'cadr fnlist) t))) (while (re-search-forward re nil t) (skip-chars-forward " \t\n") diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 4a9e16ae88e..bf1a21acaf1 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1663,7 +1663,7 @@ function,command,variable,option or symbol." ms1)))))) ;; (concat "\\<" (regexp-quote (car fp)) "\\>") ;; newname)) ;; (checkdoc-create-error - ;; "Flag variable names should normally end in ‘-flag’" s + ;; "Flag variable names should normally end in `-flag'" s ;; (marker-position e))))) ;; Done with variables )) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index c012a30a41f..dd01ebe9dd8 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -1069,8 +1069,11 @@ The value returned is a list of elements of the form (or (and (assq type cl--generic-typeof-types) (progn - (if (memq type '(vector array sequence)) - (message "`%S' also matches CL structs and EIEIO classes" type)) + ;; FIXME: While this wrinkle in the semantics can be occasionally + ;; problematic, this warning is more often annoying than helpful. + ;;(if (memq type '(vector array sequence)) + ;; (message "`%S' also matches CL structs and EIEIO classes" + ;; type)) (list cl--generic-typeof-generalizer))) (cl-call-next-method))) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index eab22b67cd7..56f95111ab8 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -136,7 +136,7 @@ BODY contains code to execute each time the mode is enabled or disabled. :variable PLACE The location to use instead of the variable MODE to store the state of the mode. This can be simply a different named variable, or a generalized variable. - PLACE can also be of the form \(GET . SET), where GET is + PLACE can also be of the form (GET . SET), where GET is an expression that returns the current state, and SET is a function that takes one argument, the new state, and sets it. If you specify a :variable, this function does diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 0162a9a230a..a3e3b567cc4 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3162,12 +3162,12 @@ Do this when stopped before the form or it will be too late. One side effect of using this command is that the next time the function or macro is called, Edebug will be called there as well." (interactive) - (if (not (looking-at "\(")) + (if (not (looking-at "(")) (error "You must be before a list form") (let ((func (save-excursion (down-list 1) - (if (looking-at "\(") + (if (looking-at "(") (edebug--form-data-name (edebug-get-form-data-entry (point))) (read (current-buffer)))))) @@ -3216,57 +3216,45 @@ This is useful for exiting even if `unwind-protect' code may be executed." (setq edebug-execution-mode 'Go-nonstop) (top-level)) - ;;(defun edebug-exit-out () ;; "Go until the current function exits." ;; (interactive) ;; (edebug-set-mode 'exiting "Exit...")) - -;;; The following initial mode setting definitions are not used yet. - -'(defconst edebug-initial-mode-alist - '((edebug-Continue-fast . Continue-fast) - (edebug-Trace-fast . Trace-fast) - (edebug-continue . continue) - (edebug-trace . trace) - (edebug-go . go) - (edebug-step-through . step) - (edebug-Go-nonstop . Go-nonstop) - ) +(defconst edebug-initial-mode-alist + '((edebug-step-mode . step) + (edebug-next-mode . next) + (edebug-trace-mode . trace) + (edebug-Trace-fast-mode . Trace-fast) + (edebug-go-mode . go) + (edebug-continue-mode . continue) + (edebug-Continue-fast-mode . Continue-fast) + (edebug-Go-nonstop-mode . Go-nonstop)) "Association list between commands and the modes they set.") +(defvar edebug-mode-map) ; will be defined fully later. -'(defun edebug-set-initial-mode () - "Ask for the initial mode of the enclosing function. +(defun edebug-set-initial-mode () + "Set the initial execution mode of Edebug. The mode is requested via the key that would be used to set the mode in edebug-mode." (interactive) - (let* ((this-function (edebug-which-function)) - (keymap (if (eq edebug-mode-map (current-local-map)) - edebug-mode-map)) - (old-mode (or (get this-function 'edebug-initial-mode) - edebug-initial-mode)) + (let* ((old-mode edebug-initial-mode) (key (read-key-sequence (format - "Change initial edebug mode for %s from %s (%s) to (enter key): " - this-function - old-mode - (where-is-internal - (car (rassq old-mode edebug-initial-mode-alist)) - keymap 'firstonly - )))) - (mode (cdr (assq (key-binding key) edebug-initial-mode-alist))) - ) - (if (and mode - (or (get this-function 'edebug-initial-mode) - (not (eq mode edebug-initial-mode)))) + "Change initial edebug mode from %s (%c) to (enter key): " + old-mode + (aref (where-is-internal + (car (rassq old-mode edebug-initial-mode-alist)) + edebug-mode-map 'firstonly) + 0)))) + (mode (cdr (assq (lookup-key edebug-mode-map key) + edebug-initial-mode-alist)))) + (if mode (progn - (put this-function 'edebug-initial-mode mode) - (message "Initial mode for %s is now: %s" - this-function mode)) - (error "Key must map to one of the mode changing commands") - ))) + (setq edebug-initial-mode mode) + (message "Edebug's initial mode is now: %s" mode)) + (error "Key must map to one of the mode changing commands")))) ;;; Evaluation of expressions @@ -3425,7 +3413,9 @@ be installed in `emacs-lisp-mode-map'.") (define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode) - (define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where)) + (define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where) + ;; The following isn't a GUD binding. + (define-key emacs-lisp-mode-map "\C-x\C-a\C-m" 'edebug-set-initial-mode)) (defvar edebug-mode-map (let ((map (copy-keymap emacs-lisp-mode-map))) @@ -3790,10 +3780,10 @@ Otherwise call `debug' normally." (if t (progn ;; Delete interspersed edebug internals. - (while (re-search-forward "^ \(?edebug" nil t) + (while (re-search-forward "^ (?edebug" nil t) (beginning-of-line) (cond - ((looking-at "^ \(edebug-after") + ((looking-at "^ (edebug-after") ;; Previous lines may contain code, so just delete this line. (setq last-ok-point (point)) (forward-line 1) diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index a2f5f8af8ea..e3f7b11bb64 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -135,10 +135,10 @@ Currently under control of this var: (or (cl--find-class class) class) class)) -(defun class-p (class) - "Return non-nil if CLASS is a valid class vector. -CLASS is a symbol." ;FIXME: Is it a vector or a symbol? - (and (symbolp class) (eieio--class-p (cl--find-class class)))) +(defun class-p (x) + "Return non-nil if X is a valid class vector. +X can also be is a symbol." + (eieio--class-p (if (symbolp x) (cl--find-class x) x))) (defun eieio--class-print-name (class) "Return a printed representation of CLASS." @@ -769,7 +769,8 @@ Fills in OBJ's SLOT with its default value." (cl-check-type obj (or eieio-object class)) (cl-check-type slot symbol) (let* ((cl (cond ((symbolp obj) (cl--find-class obj)) - (t (eieio--object-class obj)))) + ((eieio-object-p obj) (eieio--object-class obj)) + (t obj))) (c (eieio--slot-name-index cl slot))) (if (not c) ;; It might be missing because it is a :class allocated slot. @@ -850,7 +851,7 @@ Fills in the default value in CLASS' in SLOT with VALUE." ;; gnus/registry.el, so it might be used elsewhere as well, so let's ;; keep it for now. ;; FIXME: Generate a compile-time warning for it! - ;; (error "Can't ‘oset-default’ an instance-allocated slot: %S of %S" + ;; (error "Can't `oset-default' an instance-allocated slot: %S of %S" ;; slot class) (eieio--validate-slot-value class c value slot) ;; Set this into the storage for defaults. diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index cae3fa2d460..f899f40fb80 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -137,7 +137,7 @@ the name of the test and the result of NAME-FORM." This effectively executes - \(apply (car COMMAND) (cdr COMMAND)\) + (apply (car COMMAND) (cdr COMMAND)) and returns the same value, but additionally runs hooks like `pre-command-hook' and `post-command-hook', and sets variables @@ -189,7 +189,7 @@ test for `called-interactively' in the command will fail." "Return a copy of S with all matches of REGEXPS removed. Elements of REGEXPS may also be two-element lists \(REGEXP -SUBEXP\), where SUBEXP is the number of a subexpression in +SUBEXP), where SUBEXP is the number of a subexpression in REGEXP. In that case, only that subexpression will be removed rather than the entire match." ;; Use a temporary buffer since replace-match copies strings, which @@ -215,7 +215,7 @@ property list, or no properties if there is no plist before it. As a simple example, \(ert-propertized-string \"foo \" \\='(face italic) \"bar\" \" baz\" nil \ -\" quux\"\) +\" quux\") would return the string \"foo bar baz quux\" where the substring \"bar baz\" has a `face' property with the value `italic'. diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index d47e5d94b9d..2eba0216faf 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -187,7 +187,7 @@ using :expected-result. See `ert-test-result-type-p' for a description of valid values for RESULT-TYPE. \(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \ -\[:tags '(TAG...)] BODY...)" +[:tags '(TAG...)] BODY...)" (declare (debug (&define :name test name sexp [&optional stringp] [&rest keywordp sexp] def-body)) @@ -887,10 +887,10 @@ Valid result types: nil -- Never matches. t -- Always matches. :failed, :passed, :skipped -- Matches corresponding results. -\(and TYPES...\) -- Matches if all TYPES match. -\(or TYPES...\) -- Matches if some TYPES match. -\(not TYPE\) -- Matches if TYPE does not match. -\(satisfies PREDICATE\) -- Matches if PREDICATE returns true when called with +\(and TYPES...) -- Matches if all TYPES match. +\(or TYPES...) -- Matches if some TYPES match. +\(not TYPE) -- Matches if TYPE does not match. +\(satisfies PREDICATE) -- Matches if PREDICATE returns true when called with RESULT." ;; It would be easy to add `member' and `eql' types etc., but I ;; haven't bothered yet. @@ -946,7 +946,7 @@ a test -- (i.e., an object of the ert-test data-type) Selects that test. a symbol -- Selects the test that the symbol names, errors if none. \(member TESTS...) -- Selects the elements of TESTS, a list of tests or symbols naming tests. -\(eql TEST\) -- Selects TEST, a test or a symbol naming a test. +\(eql TEST) -- Selects TEST, a test or a symbol naming a test. \(and SELECTORS...) -- Selects the tests that match all SELECTORS. \(or SELECTORS...) -- Selects the tests that match any of the SELECTORS. \(not SELECTOR) -- Selects all tests that do not match SELECTOR. diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 026a4a749a9..69d545560d4 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -62,7 +62,7 @@ ine\\(?:-global\\)?-minor-mode\\|ine-compilation-mode\\|un-cvs-mode\\|\ foo\\|\\(?:[^icfgv]\\|g[^r]\\)\\(\\w\\|\\s_\\)+\\*?\\)\\|easy-mmode-define-[a-z-]+\\|easy-menu-define\\|\ menu-bar-make-toggle\\)" find-function-space-re - "\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)") + "\\('\\|(quote \\)?%s\\(\\s-\\|$\\|[()]\\)") "The regexp used by `find-function' to search for a function definition. Note it must contain a `%s' at the place where `format' should insert the function name. The default value avoids `defconst', diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index bbe6b36ab9a..94fe6c3d441 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -233,7 +233,7 @@ turned into calls of the form (SETTER ARGS... VAL). If FIX-RETURN is non-nil, then SETTER is not assumed to return VAL and instead the assignment is turned into something equivalent to - \(let ((temp VAL)) + (let ((temp VAL)) (SETTER ARGS... temp) temp) so as to preserve the semantics of `setf'." diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 8aa34c7bef9..fec9467bbb7 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -28,6 +28,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defvar font-lock-comment-face) (defvar font-lock-doc-face) (defvar font-lock-keywords-case-fold-search) @@ -87,6 +89,9 @@ table) "Syntax table used in `lisp-mode'.") +(eval-and-compile + (defconst lisp-mode-symbol-regexp "\\(?:\\sw\\|\\s_\\|\\\\.\\)+")) + (defvar lisp-imenu-generic-expression (list (list nil @@ -110,7 +115,7 @@ ;; CLOS and EIEIO "defgeneric" "defmethod") t)) - "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)")) + "\\s-+\\(" lisp-mode-symbol-regexp "\\)")) 2) (list (purecopy "Variables") (purecopy (concat "^\\s-*(" @@ -122,11 +127,11 @@ "defconstant" "defparameter" "define-symbol-macro") t)) - "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)")) + "\\s-+\\(" lisp-mode-symbol-regexp "\\)")) 2) ;; For `defvar', we ignore (defvar FOO) constructs. (list (purecopy "Variables") - (purecopy (concat "^\\s-*(defvar\\s-+\\(\\(\\sw\\|\\s_\\)+\\)" + (purecopy (concat "^\\s-*(defvar\\s-+\\(" lisp-mode-symbol-regexp "\\)" "[[:space:]\n]+[^)]")) 1) (list (purecopy "Types") @@ -143,7 +148,7 @@ ;; CLOS and EIEIO "defclass") t)) - "\\s-+'?\\(\\(\\sw\\|\\s_\\)+\\)")) + "\\s-+'?\\(" lisp-mode-symbol-regexp "\\)")) 2)) "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") @@ -220,7 +225,10 @@ (defun lisp--el-match-keyword (limit) ;; FIXME: Move to elisp-mode.el. (catch 'found - (while (re-search-forward "(\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>" limit t) + (while (re-search-forward + (eval-when-compile + (concat "(\\(" lisp-mode-symbol-regexp "\\)\\_>")) + limit t) (let ((sym (intern-soft (match-string 1)))) (when (or (special-form-p sym) (and (macrop sym) @@ -229,6 +237,19 @@ (match-beginning 0))))) (throw 'found t)))))) +(defmacro let-when-compile (bindings &rest body) + "Like `let', but allow for compile time optimization. +Use BINDINGS as in regular `let', but in BODY each usage should +be wrapped in `eval-when-compile'. +This will generate compile-time constants from BINDINGS." + (declare (indent 1) (debug let)) + (cl-progv (mapcar #'car bindings) + (mapcar (lambda (x) (eval (cadr x))) bindings) + (macroexpand-all + (macroexp-progn + body) + macroexpand-all-environment))) + (let-when-compile ((lisp-fdefs '("defmacro" "defun")) (lisp-vdefs '("defvar")) @@ -249,39 +270,13 @@ (el-vdefs '("defconst" "defcustom" "defvaralias" "defvar-local" "defface")) (el-tdefs '("defgroup" "deftheme")) - (el-kw '("while-no-input" "letrec" "pcase" "pcase-exhaustive" - "pcase-lambda" "pcase-let" "pcase-let*" "save-restriction" - "save-excursion" "save-selected-window" - ;; "eval-after-load" "eval-next-after-load" - "save-window-excursion" "save-current-buffer" - "save-match-data" "combine-after-change-calls" - "condition-case-unless-debug" "track-mouse" - "eval-and-compile" "eval-when-compile" "with-case-table" - "with-category-table" "with-coding-priority" - "with-current-buffer" "with-demoted-errors" - "with-electric-help" "with-eval-after-load" - "with-file-modes" - "with-local-quit" "with-no-warnings" - "with-output-to-temp-buffer" "with-selected-window" - "with-selected-frame" "with-silent-modifications" - "with-syntax-table" "with-temp-buffer" "with-temp-file" - "with-temp-message" "with-timeout" - "with-timeout-handler")) (el-errs '("user-error")) ;; Common-Lisp constructs supported by EIEIO. FIXME: namespace. (eieio-fdefs '("defgeneric" "defmethod")) (eieio-tdefs '("defclass")) - (eieio-kw '("with-slots")) ;; Common-Lisp constructs supported by cl-lib. - (cl-lib-fdefs '("defmacro" "defsubst" "defun" "defmethod")) + (cl-lib-fdefs '("defmacro" "defsubst" "defun" "defmethod" "defgeneric")) (cl-lib-tdefs '("defstruct" "deftype")) - (cl-lib-kw '("progv" "eval-when" "case" "ecase" "typecase" - "etypecase" "ccase" "ctypecase" "loop" "do" "do*" - "the" "locally" "proclaim" "declaim" "letf" "go" - ;; "lexical-let" "lexical-let*" - "symbol-macrolet" "flet" "flet*" "destructuring-bind" - "labels" "macrolet" "tagbody" "multiple-value-bind" - "block" "return" "return-from")) (cl-lib-errs '("assert" "check-type")) ;; Common-Lisp constructs not supported by cl-lib. (cl-fdefs '("defsetf" "define-method-combination" @@ -290,14 +285,20 @@ "define-compiler-macro" "define-modify-macro")) (cl-vdefs '("define-symbol-macro" "defconstant" "defparameter")) (cl-tdefs '("defpackage" "defstruct" "deftype")) - (cl-kw '("prog" "prog*" "handler-case" "handler-bind" - "in-package" "restart-case" ;; "inline" - "restart-bind" "break" "multiple-value-prog1" - "compiler-let" "with-accessors" "with-compilation-unit" + (cl-kw '("block" "break" "case" "ccase" "compiler-let" "ctypecase" + "declaim" "destructuring-bind" "do" "do*" + "ecase" "etypecase" "eval-when" "flet" "flet*" + "go" "handler-case" "handler-bind" "in-package" ;; "inline" + "labels" "letf" "locally" "loop" + "macrolet" "multiple-value-bind" "multiple-value-prog1" + "proclaim" "prog" "prog*" "progv" + "restart-case" "restart-bind" "return" "return-from" + "symbol-macrolet" "tagbody" "the" "typecase" + "with-accessors" "with-compilation-unit" "with-condition-restarts" "with-hash-table-iterator" "with-input-from-string" "with-open-file" "with-open-stream" "with-package-iterator" - "with-simple-restart" "with-standard-io-syntax")) + "with-simple-restart" "with-slots" "with-standard-io-syntax")) (cl-errs '("abort" "cerror"))) (let ((vdefs (eval-when-compile (append lisp-vdefs el-vdefs cl-vdefs))) @@ -318,16 +319,9 @@ eieio-fdefs eieio-tdefs cl-fdefs cl-vdefs cl-tdefs) t))) - ;; Elisp and Common Lisp keywords. - ;; (el-kws-re (eval-when-compile - ;; (regexp-opt (append - ;; lisp-kw el-kw eieio-kw - ;; (cons "go" (mapcar (lambda (s) (concat "cl-" s)) - ;; (remove "go" cl-lib-kw)))) - ;; t))) + ;; Common Lisp keywords (Elisp keywords are handled dynamically). (cl-kws-re (eval-when-compile - (regexp-opt (append lisp-kw cl-kw eieio-kw cl-lib-kw) - t))) + (regexp-opt (append lisp-kw cl-kw) t))) ;; Elisp and Common Lisp "errors". (el-errs-re (eval-when-compile (regexp-opt (append (mapcar (lambda (s) (concat "cl-" s)) @@ -349,7 +343,8 @@ ;; Any whitespace and defined object. "[ \t']*" "\\(([ \t']*\\)?" ;; An opening paren. - "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") + "\\(\\(setf\\)[ \t]+" lisp-mode-symbol-regexp + "\\|" lisp-mode-symbol-regexp "\\)?") (1 font-lock-keyword-face) (3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) (cond ((eq type 'var) font-lock-variable-name-face) @@ -360,7 +355,8 @@ ;; defmethod with (setf foo) as name. ((or (not (match-string 2)) ;; Normal defun. (and (match-string 2) ;; Setf method. - (match-string 4))) font-lock-function-name-face))) + (match-string 4))) + font-lock-function-name-face))) nil t)) ;; Emacs Lisp autoload cookies. Supports the slightly different ;; forms used by mh-e, calendar, etc. @@ -373,7 +369,8 @@ ;; Any whitespace and defined object. "[ \t']*" "\\(([ \t']*\\)?" ;; An opening paren. - "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") + "\\(\\(setf\\)[ \t]+" lisp-mode-symbol-regexp + "\\|" lisp-mode-symbol-regexp "\\)?") (1 font-lock-keyword-face) (3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) (cond ((eq type 'var) font-lock-variable-name-face) @@ -395,22 +392,25 @@ (lisp--el-match-keyword . 1) ;; Exit/Feature symbols as constants. (,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>" - "[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?") + "[ \t']*\\(" lisp-mode-symbol-regexp "\\)?") (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) ;; Erroneous structures. (,(concat "(" el-errs-re "\\_>") (1 font-lock-warning-face)) ;; Words inside \\[] tend to be for `substitute-command-keys'. - ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]" + (,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]") (1 font-lock-constant-face prepend)) ;; Words inside ‘’ and '' and `' tend to be symbol names. - ("['`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]" + (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)" + lisp-mode-symbol-regexp "\\)['’]") (1 font-lock-constant-face prepend)) ;; Constant values. - ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) + (,(concat "\\_<:" lisp-mode-symbol-regexp "\\_>") + (0 font-lock-builtin-face)) ;; ELisp and CLisp `&' keywords as types. - ("\\_<\\&\\(?:\\sw\\|\\s_\\)+\\_>" . font-lock-type-face) + (,(concat "\\_<\\&" lisp-mode-symbol-regexp "\\_>") + . font-lock-type-face) ;; ELisp regexp grouping constructs (,(lambda (bound) (catch 'found @@ -447,19 +447,22 @@ (,(concat "(" cl-kws-re "\\_>") . 1) ;; Exit/Feature symbols as constants. (,(concat "(\\(catch\\|throw\\|provide\\|require\\)\\_>" - "[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?") + "[ \t']*\\(" lisp-mode-symbol-regexp "\\)?") (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) ;; Erroneous structures. (,(concat "(" cl-errs-re "\\_>") (1 font-lock-warning-face)) ;; Words inside ‘’ and '' and `' tend to be symbol names. - ("['`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]" + (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)" + lisp-mode-symbol-regexp "\\)['’]") (1 font-lock-constant-face prepend)) ;; Constant values. - ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) + (,(concat "\\_<:" lisp-mode-symbol-regexp "\\_>") + (0 font-lock-builtin-face)) ;; ELisp and CLisp `&' keywords as types. - ("\\_<\\&\\(?:\\sw\\|\\s_\\)+\\_>" . font-lock-type-face) + (,(concat "\\_<\\&" lisp-mode-symbol-regexp "\\_>") + . font-lock-type-face) ;; This is too general -- rms. ;; A user complained that he has functions whose names start with `do' ;; and that they get the wrong color. @@ -482,7 +485,10 @@ (let* ((firstsym (and listbeg (save-excursion (goto-char listbeg) - (and (looking-at "([ \t\n]*\\(\\(\\sw\\|\\s_\\)+\\)") + (and (looking-at + (eval-when-compile + (concat "([ \t\n]*\\(" + lisp-mode-symbol-regexp "\\)"))) (match-string 1))))) (docelt (and firstsym (function-get (intern-soft firstsym) @@ -898,7 +904,7 @@ property `lisp-indent-function' (or the deprecated `lisp-indent-hook'), it specifies how to indent. The property value can be: * `defun', meaning indent `defun'-style - \(this is also the case if there is no property and the function + (this is also the case if there is no property and the function has a name that begins with \"def\", and three or more arguments); * an integer N, meaning indent the first N arguments specially diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 7b7b48c66de..ca977db4b1d 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -364,8 +364,7 @@ is called as a function to find the defun's beginning." (arg-+ve (> arg 0))) (save-restriction (widen) - (let ((ppss (let (syntax-begin-function - font-lock-beginning-of-syntax-function) + (let ((ppss (let (syntax-begin-function) (syntax-ppss))) ;; position of least enclosing paren, or nil. encl-pos) diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 43fd4ef57a6..b8fb540d6cb 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -44,7 +44,7 @@ Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST. LIST is a list of objects, or a function of no arguments to return the next object or nil. -If PROMPTER is a string, the prompt is \(format PROMPTER OBJECT\). If not +If PROMPTER is a string, the prompt is \(format PROMPTER OBJECT). If not a string, PROMPTER is a function of one arg (an object from LIST), which returns a string to be used as the prompt for that object. If the return value is not a string, it may be nil to ignore the object or non-nil to act @@ -56,7 +56,7 @@ which gets called with each object that the user answers `yes' for. If HELP is given, it is a list (OBJECT OBJECTS ACTION), where OBJECT is a string giving the singular noun for an elt of LIST; OBJECTS is the plural noun for elts of LIST, and ACTION is a transitive -verb describing ACTOR. The default is \(\"object\" \"objects\" \"act on\"\). +verb describing ACTOR. The default is \(\"object\" \"objects\" \"act on\"). At the prompts, the user may enter y, Y, or SPC to act on that object; n, N, or DEL to skip that object; ! to act on all following objects; diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index b0d2ff96629..eb66e8f25a3 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1852,12 +1852,12 @@ add a call to it along with some explanatory comments." (save-restriction (widen) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror)))) + (re-search-forward "(package-initialize\\_>" nil 'noerror)))) ;; Don't visit the file if we don't have to. (with-temp-buffer (insert-file-contents user-init-file) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror))))) + (re-search-forward "(package-initialize\\_>" nil 'noerror))))) (unless contains-init (with-current-buffer (or buffer (let ((delay-mode-hooks t)) diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 9888e920219..e315733e222 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -143,7 +143,7 @@ If LAX non-nil, don't output parentheses if it doesn't require them. Merges keywords to avoid backtracking in Emacs's regexp matcher." ;; The basic idea is to find the shortest common prefix or suffix, remove it ;; and recurse. If there is no prefix, we divide the list into two so that - ;; \(at least) one half will have at least a one-character common prefix. + ;; (at least) one half will have at least a one-character common prefix. ;; Also we delay the addition of grouping parenthesis as long as possible ;; until we're sure we need them, and try to remove one-character sequences diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index a21ac7a2835..a5ff9722698 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -768,8 +768,8 @@ of all atomic regexps." ((= l 3) (string-match "\\`\\(?:\\\\[cCsS_]\\|\\[[^^]\\]\\)" r)) ((null lax) (cond - ((string-match "\\`\\[^?\]?\\(?:\\[:[a-z]+:]\\|[^\]]\\)*\\]\\'" r)) - ((string-match "\\`\\\\(\\(?:[^\\]\\|\\\\[^\)]\\)*\\\\)\\'" r))))))) + ((string-match "\\`\\[^?\]?\\(?:\\[:[a-z]+:]\\|[^]]\\)*\\]\\'" r)) + ((string-match "\\`\\\\(\\(?:[^\\]\\|\\\\[^)]\\)*\\\\)\\'" r))))))) (defun rx-syntax (form) diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index 8dc91471312..e0f17c0335d 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -270,6 +270,19 @@ If so, return the non-nil value returned by PRED." (throw 'seq--break result)))) nil)) +(cl-defgeneric seq-find (pred seq &optional default) + "Return the first element for which (PRED element) is non-nil in SEQ. +If no element is found, return DEFAULT. + +Note that `seq-find' has an ambiguity if the found element is +identical to DEFAULT, as it cannot be known if an element was +found or not." + (catch 'seq--break + (seq-doseq (elt seq) + (when (funcall pred elt) + (throw 'seq--break elt))) + default)) + (cl-defgeneric seq-count (pred seq) "Return the number of elements for which (PRED element) is non-nil in SEQ." (let ((count 0)) @@ -417,13 +430,7 @@ If no element is found, return nil." (nreverse result))) (cl-defmethod seq-drop-while (pred (list list)) - "Optimized implementation of `seq-drop-while' for lists" - (while (and list (funcall pred (car list))) - (setq list (cdr list))) - list) - -(cl-defmethod seq-drop-while (pred (list list)) - "Optimized implementation of `seq-drop-while' for lists" + "Optimized implementation of `seq-drop-while' for lists." (while (and list (funcall pred (car list))) (setq list (cdr list))) list) diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index c7a95e4e5f3..17e3be7d3ff 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -68,9 +68,9 @@ This is slower, but filters out some innocuous shadowing." "Return a list of Emacs Lisp files that create shadows. This function does the work for `list-load-path-shadows'. -We traverse PATH looking for shadows, and return a \(possibly empty\) +We traverse PATH looking for shadows, and return a \(possibly empty) even-length list of files. A file in this list at position 2i shadows -the file in position 2i+1. Emacs Lisp file suffixes \(.el and .elc\) +the file in position 2i+1. Emacs Lisp file suffixes \(.el and .elc) are stripped from the file names in the list. See the documentation for `list-load-path-shadows' for further information." diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 0c24f796d19..f305025f215 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -213,7 +213,7 @@ one of those elements share the same precedence level and associativity." (defun smie-bnf->prec2 (bnf &rest resolvers) "Convert the BNF grammar into a prec2 table. BNF is a list of nonterminal definitions of the form: - \(NONTERM RHS1 RHS2 ...) + (NONTERM RHS1 RHS2 ...) where each RHS is a (non-empty) list of terminals (aka tokens) or non-terminals. Not all grammars are accepted: - an RHS cannot be an empty list (this is not needed, since SMIE allows all @@ -1136,6 +1136,8 @@ METHOD can be: - :elem, in which case the function should return either: - the offset to use to indent function arguments (ARG = `arg') - the basic indentation step (ARG = `basic'). + - the token to use (when ARG = `empty-line-token') when we don't know how + to indent an empty line. - :list-intro, in which case ARG is a token and the function should return non-nil if TOKEN is followed by a list of expressions (not separated by any token) rather than an expression. @@ -1686,6 +1688,19 @@ should not be computed on the basis of the following token." (+ (smie-indent-virtual) (smie-indent--offset 'basic))) ; (t (smie-indent-virtual)))))) ;An infix. +(defun smie-indent-empty-line () + "Indentation rule when there's nothing yet on the line." + ;; Without this rule, SMIE assumes that an empty line will be filled with an + ;; argument (since it falls back to smie-indent-sexps), which tends + ;; to indent far too deeply. + (when (eolp) + (let ((token (or (funcall smie-rules-function :elem 'empty-line-token) + ;; FIXME: Should we default to ";"? + ;; ";" + ))) + (when (assoc token smie-grammar) + (smie-indent-keyword token))))) + (defun smie-indent-exps () ;; Indentation of sequences of simple expressions without ;; intervening keywords or operators. E.g. "a b c" or "g (balbla) f". @@ -1744,7 +1759,7 @@ should not be computed on the basis of the following token." smie-indent-comment smie-indent-comment-continue smie-indent-comment-close smie-indent-comment-inside smie-indent-inside-string smie-indent-keyword smie-indent-after-keyword - smie-indent-exps) + smie-indent-empty-line smie-indent-exps) "Functions to compute the indentation. Each function is called with no argument, shouldn't move point, and should return either nil if it has no opinion, or an integer representing the column diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 05dd7d57503..95ed775f6b4 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -43,8 +43,6 @@ (eval-when-compile (require 'cl-lib)) -(defvar font-lock-beginning-of-syntax-function) - ;;; Applying syntax-table properties where needed. (defvar syntax-propertize-function nil @@ -106,10 +104,6 @@ Put first the functions more likely to cause a change and cheaper to compute.") (point-max)))) (cons beg end)) -(defvar syntax-propertize--done -1 - "Position up to which syntax-table properties have been set.") -(make-variable-buffer-local 'syntax-propertize--done) - (defun syntax-propertize--shift-groups (re n) (replace-regexp-in-string "\\\\(\\?\\([0-9]+\\):" @@ -290,39 +284,59 @@ The return value is a function suitable for `syntax-propertize-function'." (defun syntax-propertize (pos) "Ensure that syntax-table properties are set until POS." - (when (and syntax-propertize-function - (< syntax-propertize--done pos)) - ;; (message "Needs to syntax-propertize from %s to %s" - ;; syntax-propertize--done pos) - (set (make-local-variable 'parse-sexp-lookup-properties) t) - (save-excursion - (with-silent-modifications - (let* ((start (max syntax-propertize--done (point-min))) - (end (max pos - (min (point-max) - (+ start syntax-propertize-chunk-size)))) - (funs syntax-propertize-extend-region-functions)) - (while funs - (let ((new (funcall (pop funs) start end))) - (if (or (null new) - (and (>= (car new) start) (<= (cdr new) end))) - nil - (setq start (car new)) - (setq end (cdr new)) - ;; If there's been a change, we should go through the - ;; list again since this new position may - ;; warrant a different answer from one of the funs we've - ;; already seen. - (unless (eq funs - (cdr syntax-propertize-extend-region-functions)) - (setq funs syntax-propertize-extend-region-functions))))) - ;; Move the limit before calling the function, so the function - ;; can use syntax-ppss. - (setq syntax-propertize--done end) - ;; (message "syntax-propertizing from %s to %s" start end) - (remove-text-properties start end - '(syntax-table nil syntax-multiline nil)) - (funcall syntax-propertize-function start end)))))) + (when (< syntax-propertize--done pos) + (if (null syntax-propertize-function) + (setq syntax-propertize--done (max (point-max) pos)) + ;; (message "Needs to syntax-propertize from %s to %s" + ;; syntax-propertize--done pos) + (set (make-local-variable 'parse-sexp-lookup-properties) t) + (save-excursion + (with-silent-modifications + (make-local-variable 'syntax-propertize--done) ;Just in case! + (let* ((start (max (min syntax-propertize--done (point-max)) + (point-min))) + (end (max pos + (min (point-max) + (+ start syntax-propertize-chunk-size)))) + (funs syntax-propertize-extend-region-functions)) + (while funs + (let ((new (funcall (pop funs) start end)) + ;; Avoid recursion! + (syntax-propertize--done most-positive-fixnum)) + (if (or (null new) + (and (>= (car new) start) (<= (cdr new) end))) + nil + (setq start (car new)) + (setq end (cdr new)) + ;; If there's been a change, we should go through the + ;; list again since this new position may + ;; warrant a different answer from one of the funs we've + ;; already seen. + (unless (eq funs + (cdr syntax-propertize-extend-region-functions)) + (setq funs syntax-propertize-extend-region-functions))))) + ;; Move the limit before calling the function, so the function + ;; can use syntax-ppss. + (setq syntax-propertize--done end) + ;; (message "syntax-propertizing from %s to %s" start end) + (remove-text-properties start end + '(syntax-table nil syntax-multiline nil)) + ;; Avoid recursion! + (let ((syntax-propertize--done most-positive-fixnum)) + (funcall syntax-propertize-function start end)))))))) + +;;; Link syntax-propertize with syntax.c. + +(defvar syntax-propertize-chunks + ;; We're not sure how far we'll go. In my tests, using chunks of 20000 + ;; brings to overhead to something negligible. Passing ‘charpos’ directly + ;; also works (basically works line-by-line) but results in an overhead which + ;; I thought was a bit too high (like around 50%). + 2000) + +(defun internal--syntax-propertize (charpos) + ;; FIXME: Called directly from C. + (syntax-propertize (min (+ syntax-propertize-chunks charpos) (point-max)))) ;;; Incrementally compute and memoize parser state. @@ -360,6 +374,7 @@ from each other, to avoid keeping too much useless info.") "Function to move back outside of any comment/string/paren. This function should move the cursor back to some syntactically safe point (where the PPSS is equivalent to nil).") +(make-obsolete-variable 'syntax-begin-function nil "25.1") (defvar syntax-ppss-cache nil "List of (POS . PPSS) pairs, in decreasing POS order.") @@ -487,11 +502,6 @@ running the hook." ;; - The function might be slow. ;; - If this function almost always finds a safe nearby spot, ;; the cache won't be populated, so consulting it is cheap. - (when (and (not syntax-begin-function) - (boundp 'font-lock-beginning-of-syntax-function) - font-lock-beginning-of-syntax-function) - (set (make-local-variable 'syntax-begin-function) - font-lock-beginning-of-syntax-function)) (when (and syntax-begin-function (progn (goto-char pos) (funcall syntax-begin-function) diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index dca459f2bf6..c9e3fbe4f7d 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -205,7 +205,7 @@ timers). If nil, allocate a new cell." "Insert TIMER into `timer-idle-list'. This arranges to activate TIMER whenever Emacs is next idle. If optional argument DONT-WAIT is non-nil, set TIMER to activate -immediately \(see below\), or at the right time, if Emacs is +immediately \(see below), or at the right time, if Emacs is already idle. REUSE-CELL, if non-nil, is a cons cell to reuse when inserting @@ -345,18 +345,26 @@ This function is called, by name, directly by the C code." (defun run-at-time (time repeat function &rest args) "Perform an action at time TIME. Repeat the action every REPEAT seconds, if REPEAT is non-nil. -TIME should be one of: a string giving an absolute time like -\"11:23pm\" (the acceptable formats are those recognized by -`diary-entry-time'; note that such times are interpreted as times -today, even if in the past); a string giving a relative time like -\"2 hours 35 minutes\" (the acceptable formats are those -recognized by `timer-duration'); nil meaning now; a number of -seconds from now; a value from `encode-time'; or t (with non-nil -REPEAT) meaning the next integral multiple of REPEAT. REPEAT may -be an integer or floating point number. The action is to call -FUNCTION with arguments ARGS. +REPEAT may be an integer or floating point number. +TIME should be one of: +- a string giving today's time like \"11:23pm\" + (the acceptable formats are HHMM, H:MM, HH:MM, HHam, HHAM, + HHpm, HHPM, HH:MMam, HH:MMAM, HH:MMpm, or HH:MMPM; + a period `.' can be used instead of a colon `:' to separate + the hour and minute parts); +- a string giving a relative time like \"90\" or \"2 hours 35 minutes\" + (the acceptable forms are a number of seconds without units + or some combination of values using units in `timer-duration-words'); +- nil, meaning now; +- a number of seconds from now; +- a value from `encode-time'; +- or t (with non-nil REPEAT) meaning the next integral + multiple of REPEAT. -This function returns a timer object which you can use in `cancel-timer'." +The action is to call FUNCTION with arguments ARGS. + +This function returns a timer object which you can use in +`cancel-timer'." (interactive "sRun at time: \nNRepeat interval: \naFunction: ") (or (null repeat) diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index 9e3667e7a8f..c002ecfd2ff 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el @@ -105,7 +105,7 @@ ;;; Determine Window System, and X Server Vendor (if appropriate). ;;; (defconst edt-window-system (if (featurep 'xemacs) (console-type) window-system) - "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") + "Indicates window system (in GNU Emacs) or console type (in XEmacs).") (declare-function x-server-vendor "xfns.c" (&optional terminal)) diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 9bd1627ffeb..0c089698752 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -213,23 +213,23 @@ use within the EDT emulation." (defcustom edt-word-entities '(?\t) "Specifies the list of EDT word entity characters. -The default list, (\?\\t), contains just the TAB character, which +The default list, (?\\t), contains just the TAB character, which emulates EDT. Characters are specified in the list using their decimal ASCII values. A question mark, followed by the actual character, can be used to indicate the numerical value of the character, instead of the actual decimal value. So, ?A means the -numerical value for the letter A, \?/ means the numerical value for /, +numerical value for the letter A, ?/ means the numerical value for /, etc. Several unprintable and special characters have special representations, which you can also use: - \?\\b specifies BS, C-h - \?\\t specifies TAB, C-i - \?\\n specifies LFD, C-j - \?\\v specifies VTAB, C-k - \?\\f specifies FF, C-l - \?\\r specifies CR, C-m - \?\\e specifies ESC, C-[ - \?\\\\ specifies \\ + ?\\b specifies BS, C-h + ?\\t specifies TAB, C-i + ?\\n specifies LFD, C-j + ?\\v specifies VTAB, C-k + ?\\f specifies FF, C-l + ?\\r specifies CR, C-m + ?\\e specifies ESC, C-[ + ?\\\\ specifies \\ In EDT Emulation movement-by-word commands, each character in the list will be treated as if it were a separate word." @@ -311,10 +311,10 @@ This means that an edt-user.el file was found in the user's `load-path'.") ;;; o edt-emulation-on o edt-load-keys ;;; (defconst edt-emacs-variant (if (featurep 'emacs) "gnu" "xemacs") - "Indicates Emacs variant: GNU Emacs or XEmacs \(aka Lucid Emacs\).") + "Indicates Emacs variant: GNU Emacs or XEmacs (aka Lucid Emacs).") (defconst edt-window-system (if (featurep 'emacs) window-system (console-type)) - "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") + "Indicates window system (in GNU Emacs) or console type (in XEmacs).") (declare-function x-server-vendor "xfns.c" (&optional terminal)) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 93fcec865a7..960ccedd4dd 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1536,7 +1536,7 @@ as a Meta key and any number of multiple escapes are allowed." (defun viper-repeat (arg) "Re-execute last destructive command. Use the info in viper-d-com, which has the form -\(com val ch reg inserted-text command-keys\), +\(com val ch reg inserted-text command-keys), where `com' is the command to be re-executed, `val' is the argument to `com', `ch' is a flag for repeat, and `reg' is optional; if it exists, it is the name of the register for `com'. @@ -3424,7 +3424,7 @@ controlled by the sign of prefix numeric value." ((re-search-backward "[][(){}]" beg-lim t)) (t (error "No matching character on line")))) - (cond ((looking-at "[\(\[{]") + (cond ((looking-at "[([{]") (if com (viper-move-marker-locally 'viper-com-point (point))) (forward-sexp 1) (if com @@ -3733,7 +3733,7 @@ With a prefix argument, this function unsets the macros. If the optional prefix argument is non-nil and specifies a valid major mode, this sets the macros only in the macros in that major mode. Otherwise, the macros are set in the current major mode. -\(When unsetting the macros, the second argument has no effect.\)" +\(When unsetting the macros, the second argument has no effect.)" (interactive "P") (or noninteractive (if (not unset) @@ -3980,7 +3980,7 @@ Null string will repeat previous search." (let (buffer buffer-name) (setq buffer-name (funcall viper-read-buffer-function - (format "Kill buffer \(%s\): " + (format "Kill buffer (%s): " (buffer-name (current-buffer))))) (setq buffer (if (null buffer-name) @@ -4588,7 +4588,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back." ;; Viewing registers (defun viper-ket-function (arg) - "Function called by \], the ket. View registers and call \]\]." + "Function called by ], the ket. View registers and call ]]." (interactive "P") (let ((reg (read-char))) (cond ((viper-valid-register reg '(letter Letter)) @@ -4605,7 +4605,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back." viper-InvalidRegister reg))))) (defun viper-brac-function (arg) - "Function called by \[, the brac. View textmarkers and call \[\[." + "Function called by [, the brac. View textmarkers and call [[." (interactive "P") (let ((reg (read-char))) (cond ((viper= ?\[ reg) @@ -4981,7 +4981,7 @@ back trace of the execution that leads to the error. Please include this trace in your bug report. If you believe that one of Viper's commands goes into an infinite loop -\(e.g., Emacs freezes\), type: +\(e.g., Emacs freezes), type: M-x set-variable <Return> debug-on-quit <Return> t <Return> diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index fb2c1792a41..6e55ac5b5d6 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -396,7 +396,7 @@ reversed." )) ;; Get an ex-token which is either an address or a command. -;; A token has a type, \(command, address, end-mark\), and a value +;; A token has a type, (command, address, end-mark), and a value (defun viper-get-ex-token () (save-window-excursion (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) @@ -1658,7 +1658,7 @@ reversed." (if (and (not (string= ex-file (buffer-file-name))) (buffer-modified-p) (not ex-variant)) - (error "No write since last change \(:rec! overrides\)")) + (error "No write since last change (:rec! overrides)")) (recover-file ex-file)) ;; Tell that `rewind' is obsolete and to use `:next count' instead diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 092de55e70e..f422a1354a9 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -102,7 +102,7 @@ docstring. The variable becomes buffer-local whenever set." (declare (indent defun)) `(progn (defvar ,var ,default-value - ,(format "%s\n\(buffer local\)" documentation)) + ,(format "%s\n(buffer local)" documentation)) (make-variable-buffer-local ',var))) ;; (viper-loop COUNT BODY) Execute BODY COUNT times. @@ -778,7 +778,7 @@ Related buffers can be cycled through via :R and :P commands." "^\\\\[sb][a-z]*{.*}\\s-*$\\|" ; latex "^@node\\|@table\\|^@m?enu\\|^@itemize\\|^@if\\|" ; texinfo "^.+:-") ; prolog - "Regexps for Headings. Used by \[\[ and \]\].") + "Regexps for Headings. Used by [[ and ]].") (defvar viper-heading-end (concat "^}\\|" ; C/C++ @@ -786,7 +786,7 @@ Related buffers can be cycled through via :R and :P commands." "^@end \\|" ; texinfo ")\n\n[ \t\n]*\\|" ; lisp "\\.\\s-*$") ; prolog - "*Regexps to end Headings/Sections. Used by \[\].") + "*Regexps to end Headings/Sections. Used by [].") ;; These two vars control the interaction of jumps performed by ' and `. diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index 4fa07792334..3aff0628b5f 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el @@ -327,8 +327,8 @@ Can be used in `viper-custom-file-name' to define permanent macros. MACRO-NAME is a string of characters or a vector of keys. STATE is either `vi-state' or `insert-state'. It specifies the Viper state in which to define the macro. MACRO-BODY is a string that represents the keyboard macro. -Optional SCOPE says whether the macro should be global \(t\), mode-specific -\(a major-mode symbol\), or buffer-specific \(buffer name, a string\). +Optional SCOPE says whether the macro should be global \(t), mode-specific +\(a major-mode symbol), or buffer-specific \(buffer name, a string). If SCOPE is nil, the user is asked to specify the scope." (let* (state-name keymap (macro-alist-var @@ -894,7 +894,7 @@ mistakes in macro names to be passed to this function is to use (set-register reg last-kbd-macro)) (defun viper-register-macro (count) - "Keyboard macros in registers - a modified \@ command." + "Keyboard macros in registers - a modified @ command." (interactive "P") (let ((reg (downcase (read-char)))) (cond ((or (and (<= ?a reg) (<= reg ?z))) diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el index 4d5c86fd6aa..5c82bf1f55d 100644 --- a/lisp/emulation/viper-mous.el +++ b/lisp/emulation/viper-mous.el @@ -145,7 +145,7 @@ If CLICK-COUNT is 2,then `word' is a Word in Vi sense. If the character clicked on is a non-separator and is non-alphanumeric but is adjacent to an alphanumeric symbol, then it is considered alphanumeric for the purpose of this command. If this character has a matching -character, such as `\(' is a match for `\)', then the matching character is +character, such as `(' is a match for `)', then the matching character is also considered alphanumeric. For convenience, in Lisp modes, `-' is considered alphanumeric. @@ -250,7 +250,7 @@ On single or double click, returns the word as determined by With prefix argument, N, insert that many words. This command must be bound to a mouse click. The double-click action of the same mouse button must not be bound -\(or it must be bound to the same function\). +\(or it must be bound to the same function). See `viper-surrounding-word' for the definition of a word in this case." (interactive "e\nP") (if viper-frame-of-focus ;; to handle clicks in another frame @@ -339,7 +339,7 @@ See `viper-surrounding-word' for the definition of a word in this case." "Find the word clicked or double-clicked on. Word may be in another window. With prefix argument, N, search for N-th occurrence. This command must be bound to a mouse click. The double-click action of the -same button must not be bound \(or it must be bound to the same function\). +same button must not be bound \(or it must be bound to the same function). See `viper-surrounding-word' for the details on what constitutes a word for this command." (interactive "e\nP") diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index c4dc569efb3..8c2ad581a75 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -379,7 +379,7 @@ Otherwise return the normal value." ;; Append LIS2 to LIS1, both alists, by side-effect and returns LIS1 ;; LIS2 is modified by filtering it: deleting its members of the form -;; \(car elt\) such that (car elt') is in LIS1. +;; (car elt) such that (car elt') is in LIS1. (defun viper-append-filter-alist (lis1 lis2) (let ((temp lis1) elt) @@ -426,7 +426,7 @@ Otherwise return the normal value." ;; Issue an error, if no match. (unless (eq 0 status) (save-excursion - (skip-chars-forward " \t\n\j") + (skip-chars-forward " \t\n") (if (looking-at "ls:") (viper-forward-Word 1)) (error "%s: %s" @@ -859,7 +859,7 @@ Otherwise return the normal value." (defsubst viper-is-in-minibuffer () (save-match-data - (string-match "\*Minibuf-" (buffer-name)))) + (string-match "\\*Minibuf-" (buffer-name)))) @@ -1330,7 +1330,7 @@ Works best when set in the hooks to various major modes. `strict-vi' means Viper words are (hopefully) exactly as in Vi. `reformed-vi' means Viper words are like Emacs words \(as determined using -Emacs syntax tables, which are different for different major modes\) with two +Emacs syntax tables, which are different for different major modes) with two exceptions: the symbol `_' is always part of a word and typical Vi non-word symbols, such as `,',:,\",),{, etc., are excluded. This behaves very close to `strict-vi', but also works well with non-ASCII diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 0933c949df0..6398b476fad 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -819,7 +819,7 @@ It also can't undo some Viper settings." ;; fundamental (defun viper-major-mode-change-sentinel () (save-match-data - (or (string-match "\*Minibuf-" (buffer-name)) + (or (string-match "\\*Minibuf-" (buffer-name)) (setq viper-new-major-mode-buffer-list (cons (current-buffer) viper-new-major-mode-buffer-list)))) ;; change the global value of hook diff --git a/lisp/epg.el b/lisp/epg.el index ed71e966853..aa79c7d0fc2 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -2199,7 +2199,7 @@ The return value is an alist mapping from types to values." (if (eq index (string-match "[ \t\n\r]*" string index)) (setq index (match-end 0))) (if (eq index (string-match - "\\([0-9]+\\(\\.[0-9]+\\)*\\)\[ \t\n\r]*=[ \t\n\r]*" + "\\([0-9]+\\(\\.[0-9]+\\)*\\)[ \t\n\r]*=[ \t\n\r]*" string index)) (setq type (match-string 1 string) index (match-end 0)) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 958c5ef8b62..ec45dcfcf24 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -1541,7 +1541,7 @@ A server may send more than one 005 message." (while (erc-response.command-args parsed) (let ((section (pop (erc-response.command-args parsed)))) ;; fill erc-server-parameters - (when (string-match "^\\([A-Z]+\\)\=\\(.*\\)$\\|^\\([A-Z]+\\)$" + (when (string-match "^\\([A-Z]+\\)=\\(.*\\)$\\|^\\([A-Z]+\\)$" section) (add-to-list 'erc-server-parameters `(,(or (match-string 1 section) diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 55f298bbf69..0622b18ca7f 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -84,7 +84,7 @@ Useful to mark nicks from dangerous hosts." (defcustom erc-current-nick-highlight-type 'keyword "Determines how to highlight text in which your current nickname appears -\(does not apply to text sent by you\). +\(does not apply to text sent by you). The following values are allowed: diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index 441663f3b3b..2891fe17be6 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el @@ -588,7 +588,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges." (LagNet "lagnet.org.za") (Librenet "librenet.net") (LinkNet "link-net.org") - (LinuxChix "cats\.meow\.at\\|linuxchix\.org") + (LinuxChix "cats\\.meow\\.at\\|linuxchix\\.org") (Liquidized "liquidized.net") (M-IRC "m-sys.org") (MagicStar "magicstar.net") diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 2d2fa6230c3..274b01ffbd1 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -280,7 +280,7 @@ Example of use: "IDENTIFY" nil nil nil)) "Alist of NickServer details, sorted by network. Every element in the list has the form - \(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER SUCCESS-REGEXP) + (SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER SUCCESS-REGEXP) SYMBOL is a network identifier, a symbol, as used in `erc-networks-alist'. NICKSERV is the description of the nickserv in the form nick!user@host. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 62be63e9aa4..8e26db1d9d3 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -258,20 +258,20 @@ If nil, only \"> \" will be shown." (defcustom erc-hide-list nil "A global list of IRC message types to hide. -A typical value would be '(\"JOIN\" \"PART\" \"QUIT\")." +A typical value would be \(\"JOIN\" \"PART\" \"QUIT\")." :group 'erc-ignore :type 'erc-message-type) (defcustom erc-network-hide-list nil "A list of IRC networks to hide message types from. -A typical value would be '((\"freenode\" \"MODE\") +A typical value would be \((\"freenode\" \"MODE\") (\"OFTC\" \"JOIN\" \"QUIT\"))." :group 'erc-ignore :type 'erc-message-type) (defcustom erc-channel-hide-list nil "A list of IRC channels to hide message types from. -A typical value would be '((\"#emacs\" \"QUIT\" \JOIN\") +A typical value would be \((\"#emacs\" \"QUIT\" \"JOIN\") (\"#erc\" \"NICK\")." :group 'erc-ignore :type 'erc-message-type) @@ -2503,7 +2503,7 @@ non-nil." (defcustom erc-lurker-hide-list nil "List of IRC type messages to hide when sent by lurkers. -A typical value would be '(\"JOIN\" \"PART\" \"QUIT\"). +A typical value would be \(\"JOIN\" \"PART\" \"QUIT\"). See also `erc-lurker-p' and `erc-hide-list'." :group 'erc-lurker :type 'erc-message-type) @@ -2973,7 +2973,7 @@ VERSION and so on. It is called with ARGS." If FUNC contains a valid function or variable, help about that will be displayed. If FUNC is empty, display an apropos about ERC commands. Otherwise, do `apropos' in the ERC namespace -\(\"erc-.*LINE\"\). +\(\"erc-.*LINE\"). Examples: To find out about erc and bbdb, do diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index f2e67cc8c32..f0a85152382 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -193,8 +193,8 @@ The basic syntax is: * .* matches any group of characters (or none) # * matches zero or more occurrences of preceding ## + matches one or more occurrences of preceding - (x) \(x\) makes `x' a regular expression group - | \| boolean OR within an expression group + (x) \\(x\\) makes `x' a regular expression group + | \\| boolean OR within an expression group [a-b] [a-b] matches a character or range [^a] [^a] excludes a character or range diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 499eda40dc3..90dec596701 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -639,7 +639,7 @@ matched." ;; `!' ;; Start a history substitution, except when followed by a ;; space, tab, the end of the line, = or (. - (if (not (string-match "^![^ \t\n=\(]" reference)) + (if (not (string-match "^![^ \t\n=(]" reference)) reference (setq eshell-history-index nil) (let ((event (eshell-hist-parse-event-designator reference))) diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 76751e51dfd..ae6e0d3e886 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -47,7 +47,7 @@ properties to colorize its output based on the setting of (defcustom eshell-ls-date-format "%Y-%m-%d" "How to display time information in `eshell-ls-file'. This is passed to `format-time-string' as a format string. -To display the date using the current locale, use \"%b \%e\"." +To display the date using the current locale, use \"%b \ %e\"." :version "24.1" :type 'string) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 8ae81df92e5..19597dfbc1f 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -517,7 +517,7 @@ Remove the DIRECTORY(ies), if they are empty.") :usage "[OPTION]... SOURCE DEST or: mv [OPTION]... SOURCE... DIRECTORY Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. -\[OPTION] DIRECTORY...") +[OPTION] DIRECTORY...") (let ((no-dereference t)) (eshell-mvcpln-template "mv" "moving" 'rename-file eshell-mv-interactive-query diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 22ccf4e91f9..3df820d5956 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -627,10 +627,11 @@ newline." (let ((proc-running-p (and (eshell-interactive-process) (not queue-p))) (inhibit-point-motion-hooks t) - after-change-functions) + (inhibit-modification-hooks t)) (unless (and proc-running-p (not (eq (process-status - (eshell-interactive-process)) 'run))) + (eshell-interactive-process)) + 'run))) (if (or proc-running-p (>= (point) eshell-last-output-end)) (goto-char (point-max)) @@ -697,7 +698,7 @@ This is done after all necessary filtering has been done." (let ((oprocbuf (if process (process-buffer process) (current-buffer))) (inhibit-point-motion-hooks t) - after-change-functions) + (inhibit-modification-hooks t)) (let ((functions eshell-preoutput-filter-functions)) (while (and functions string) (setq string (funcall (car functions) string)) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 2565842706e..f645702ac2b 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -228,7 +228,7 @@ If N or M is nil, it means the end of the list." (defvar eshell-path-env (getenv "PATH") "Content of $PATH. -It might be different from \(getenv \"PATH\"\), when +It might be different from \(getenv \"PATH\"), when `default-directory' points to a remote host.") (make-variable-buffer-local 'eshell-path-env) diff --git a/lisp/expand.el b/lisp/expand.el index 4459c3ae960..97c8a259459 100644 --- a/lisp/expand.el +++ b/lisp/expand.el @@ -213,7 +213,7 @@ "for" ; foreach (concat "for ( )\n" - "{\n\n\}" + "{\n\n}" ) (list 7 12)) @@ -221,7 +221,7 @@ "whi" ; foreach (concat "while ( )\n" - "{\n\n\}" + "{\n\n}" ) (list 9 15)) @@ -233,7 +233,7 @@ "iff" (concat "if ( )\n" - "{\n\n\}" + "{\n\n}" ) (list 6 12)) diff --git a/lisp/faces.el b/lisp/faces.el index 5485d80c926..4e7f1a42bff 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -433,7 +433,7 @@ completely specified)." (defun face-attribute-merged-with (attribute value faces &optional frame) "Merges ATTRIBUTE, initially VALUE, with faces from FACES until absolute. FACES may be either a single face or a list of faces. -\[This is an internal function.]" +[This is an internal function.]" (cond ((not (face-attribute-relative-p attribute value)) value) ((null faces) @@ -2691,10 +2691,12 @@ It is used for characters of no fonts too." :background "turquoise") ; looks OK on tty (becomes cyan) (((class color) (background dark)) :background "steelblue3") ; looks OK on tty (becomes blue) - (((background dark)) + (((background dark) (min-colors 4)) :background "grey50") + (((background light) (min-colors 4)) + :background "gray") (t - :background "gray")) + :inherit underline)) "Face used for a matching paren." :group 'paren-showing-faces) diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 5822cf0cc7e..a07f99adcbf 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -1,4 +1,4 @@ -;;; filenotify.el --- watch files for changes on disk +;;; filenotify.el --- watch files for changes on disk -*- lexical-binding:t -*- ;; Copyright (C) 2013-2015 Free Software Foundation, Inc. @@ -43,7 +43,7 @@ A key in this hash table is the descriptor as returned from `gfilenotify', `inotify', `w32notify' or a file name handler. The value in the hash table is a list - \(DIR (FILE . CALLBACK) (FILE . CALLBACK) ...) + (DIR (FILE . CALLBACK) (FILE . CALLBACK) ...) Several values for a given DIR happen only for `inotify', when different files from the same directory are watched.") @@ -54,7 +54,7 @@ different files from the same directory are watched.") "Handle file system monitoring event. If EVENT is a filewatch event, call its callback. It has the format - \(file-notify (DESCRIPTOR ACTIONS FILE [FILE1-OR-COOKIE]) CALLBACK) + (file-notify (DESCRIPTOR ACTIONS FILE [FILE1-OR-COOKIE]) CALLBACK) Otherwise, signal a `file-notify-error'." (interactive "e") @@ -161,7 +161,7 @@ EVENT is the cadr of the event in `file-notify-handle-event' ((eq action 'attrib) 'attribute-changed) ((memq action '(create added)) 'created) ((memq action '(modify modified)) 'changed) - ((memq action '(delete 'delete-self move-self removed)) 'deleted) + ((memq action '(delete delete-self move-self removed)) 'deleted) ;; Make the event pending. ((memq action '(moved-from renamed-from)) (setq file-notify--pending-event @@ -177,9 +177,9 @@ EVENT is the cadr of the event in `file-notify-handle-event' (car file-notify--pending-event))) ;; If the source is handled by another watch, we ;; must fire the rename event there as well. - (when (not (eq (file-notify--descriptor desc) - (file-notify--descriptor - (caar file-notify--pending-event)))) + (when (not (equal (file-notify--descriptor desc) + (file-notify--descriptor + (caar file-notify--pending-event)))) (setq pending-event `((,(caar file-notify--pending-event) renamed ,file ,file1) @@ -291,7 +291,7 @@ FILE is the name of the file whose event is being reported." ;; Determine respective flags. (if (eq file-notify--library 'gfilenotify) - (setq l-flags '(watch-mounts send-moved)) + (setq l-flags (append '(watch-mounts send-moved) flags)) (when (memq 'change flags) (setq l-flags @@ -300,11 +300,10 @@ FILE is the name of the file whose event is being reported." ((eq file-notify--library 'w32notify) '(file-name directory-name size last-write-time))))) (when (memq 'attribute-change flags) - (add-to-list - 'l-flags - (cond - ((eq file-notify--library 'inotify) 'attrib) - ((eq file-notify--library 'w32notify) 'attributes))))) + (push (cond + ((eq file-notify--library 'inotify) 'attrib) + ((eq file-notify--library 'w32notify) 'attributes)) + l-flags))) ;; Call low-level function. (setq desc (funcall func dir l-flags 'file-notify-callback))) @@ -328,35 +327,64 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'." (let* ((desc (if (consp descriptor) (car descriptor) descriptor)) (file (if (consp descriptor) (cdr descriptor))) (dir (car (gethash desc file-notify-descriptors))) - handler registered) + (handler (and (stringp dir) + (find-file-name-handler dir 'file-notify-rm-watch))) + (registered (gethash desc file-notify-descriptors))) (when (stringp dir) - (setq handler (find-file-name-handler dir 'file-notify-rm-watch)) + ;; Call low-level function. + (when (null (cdr registered)) + (condition-case nil + (if handler + ;; A file name handler could exist even if there is no local + ;; file notification support. + (funcall handler 'file-notify-rm-watch desc) + + (funcall + (cond + ((eq file-notify--library 'gfilenotify) 'gfile-rm-watch) + ((eq file-notify--library 'inotify) 'inotify-rm-watch) + ((eq file-notify--library 'w32notify) 'w32notify-rm-watch)) + desc)) + (file-notify-error nil))) ;; Modify `file-notify-descriptors'. (if (not file) (remhash desc file-notify-descriptors) - (setq registered (gethash desc file-notify-descriptors)) (setcdr registered (delete (assoc file (cdr registered)) (cdr registered))) (if (null (cdr registered)) (remhash desc file-notify-descriptors) - (puthash desc registered file-notify-descriptors))) + (puthash desc registered file-notify-descriptors)))))) - ;; Call low-level function. - (when (null (cdr registered)) - (if handler - ;; A file name handler could exist even if there is no local - ;; file notification support. - (funcall handler 'file-notify-rm-watch desc) +(defun file-notify-valid-p (descriptor) + "Check a watch specified by its DESCRIPTOR. +DESCRIPTOR should be an object returned by `file-notify-add-watch'." + (let* ((desc (if (consp descriptor) (car descriptor) descriptor)) + (file (if (consp descriptor) (cdr descriptor))) + (registered (gethash desc file-notify-descriptors)) + (dir (car registered)) + handler) - (funcall - (cond - ((eq file-notify--library 'gfilenotify) 'gfile-rm-watch) - ((eq file-notify--library 'inotify) 'inotify-rm-watch) - ((eq file-notify--library 'w32notify) 'w32notify-rm-watch)) - desc)))))) + (when (stringp dir) + (setq handler (find-file-name-handler dir 'file-notify-valid-p)) + + (and (or ;; It is a directory. + (not file) + ;; The file is registered. + (assoc file (cdr registered))) + (if handler + ;; A file name handler could exist even if there is no + ;; local file notification support. + (funcall handler 'file-notify-valid-p descriptor) + (funcall + (cond + ((eq file-notify--library 'gfilenotify) 'gfile-valid-p) + ((eq file-notify--library 'inotify) 'inotify-valid-p) + ((eq file-notify--library 'w32notify) 'w32notify-valid-p)) + desc)) + t)))) ;; The end: (provide 'filenotify) diff --git a/lisp/files.el b/lisp/files.el index c309f86f85b..8565aa83266 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1057,7 +1057,7 @@ Tip: You can use this expansion of remote identifier components to derive a new remote file name from an existing one. For example, if FILE is \"/sudo::/path/to/file\" then - \(concat \(file-remote-p FILE) \"/bin/sh\") + (concat (file-remote-p FILE) \"/bin/sh\") returns a remote file name for file \"/bin/sh\" that has the same remote identifier as FILE but expanded; a name such as @@ -3863,7 +3863,7 @@ directories." However, the mode will not be changed if \(1) a local variables list or the `-*-' line specifies a major mode, or \(2) the current major mode is a \"special\" mode, -\ not suitable for ordinary files, or + not suitable for ordinary files, or \(3) the new file name does not particularly specify any mode." :type 'boolean :group 'editing-basics) diff --git a/lisp/filesets.el b/lisp/filesets.el index 464c7c3eec5..ab332bbeff0 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -415,10 +415,10 @@ at the last position. Possible uses: If you don't want to save `filesets-data' in your normal configuration file, you can add a something like this - \(lambda () - \(insert (format \"(setq-default filesets-data \\='%S)\" + (lambda () + (insert (format \"(setq-default filesets-data \\='%S)\" filesets-data)) - \(newline 2)) + (newline 2)) to this hook. @@ -550,14 +550,14 @@ will be recursively added to the menu. `filesets-tree-max-level' tells up to which level the directory structure should be scanned/listed, i.e. how deep the menu should be. Try something like - \(\"HOME -- only one level\" - \(:tree \"~\" \"^[^.].*[^~]$\") - \(:tree-max-level 1) - \(:filter-dirs-flag t)) - \(\"HOME -- up to 3 levels\" - \(:tree \"~\" \"^[^.].*[^~]$\") - \(:tree-max-level 3) - \(:filter-dirs-flag t)) + (\"HOME -- only one level\" + (:tree \"~\" \"^[^.].*[^~]$\") + (:tree-max-level 1) + (:filter-dirs-flag t)) + (\"HOME -- up to 3 levels\" + (:tree \"~\" \"^[^.].*[^~]$\") + (:tree-max-level 3) + (:filter-dirs-flag t)) and it should become clear what this option is about. In any case, including directory trees to the menu can take a lot of memory." @@ -679,20 +679,20 @@ variables my-ps-viewer, my-pdf-viewer, my-dvi-viewer, my-pic-viewer. In order to view pdf or rtf files in an Emacs buffer, you could use these: - \(\"^.+\\\\.pdf\\\\\\='\" \"pdftotext\" - \((:capture-output t) - \(:args (\"%S - | fmt -w \" window-width)) - \(:ignore-on-read-text t) - \(:constraintp (lambda () - \(and \(filesets-which-command-p \"pdftotext\") - \(filesets-which-command-p \"fmt\")))))) - \(\"^.+\\\\.rtf\\\\\\='\" \"rtf2htm\" - \((:capture-output t) - \(:args (\"%S 2> /dev/null | w3m -dump -T text/html\")) - \(:ignore-on-read-text t) - \(:constraintp (lambda () - \(and (filesets-which-command-p \"rtf2htm\") - \(filesets-which-command-p \"w3m\"))))))" + (\"^.+\\\\.pdf\\\\\\='\" \"pdftotext\" + ((:capture-output t) + (:args (\"%S - | fmt -w \" window-width)) + (:ignore-on-read-text t) + (:constraintp (lambda () + (and (filesets-which-command-p \"pdftotext\") + (filesets-which-command-p \"fmt\")))))) + (\"^.+\\\\.rtf\\\\\\='\" \"rtf2htm\" + ((:capture-output t) + (:args (\"%S 2> /dev/null | w3m -dump -T text/html\")) + (:ignore-on-read-text t) + (:constraintp (lambda () + (and (filesets-which-command-p \"rtf2htm\") + (filesets-which-command-p \"w3m\"))))))" :set (function filesets-set-default) :type '(repeat :tag "Viewer" (list :tag "Definition" @@ -756,7 +756,7 @@ In order to view pdf or rtf files in an Emacs buffer, you could use these: (defcustom filesets-ingroup-patterns '(("^.+\\.tex$" t (((:name "Package") - (:pattern "\\\\usepackage\\W*\\(\\[[^\]]*\\]\\W*\\)?{\\W*\\(.+\\)\\W*}") + (:pattern "\\\\usepackage\\W*\\(\\[[^]]*\\]\\W*\\)?{\\W*\\(.+\\)\\W*}") (:match-number 2) (:stub-flag t) (:get-file-name (lambda (master file) @@ -951,18 +951,18 @@ variable will take effect after rebuilding the menu. Caveat: Fileset names have to be unique. Example definition: - \\='\(\(\"My Wiki\" - \(:ingroup \"~/Etc/My-Wiki/WikiContents\")) - \(\"My Homepage\" - \(:pattern \"~/public_html/\" \"^.+\\\\.html$\") - \(:open filesets-find-file)) - \(\"User Configuration\" - \(:files \"~/.xinitrc\" + \\='((\"My Wiki\" + (:ingroup \"~/Etc/My-Wiki/WikiContents\")) + (\"My Homepage\" + (:pattern \"~/public_html/\" \"^.+\\\\.html$\") + (:open filesets-find-file)) + (\"User Configuration\" + (:files \"~/.xinitrc\" \"~/.bashrc\" \"~/.bash_profile\")) - \(\"HOME\" - \(:tree \"~\" \"^[^.].*[^~]$\") - \(:filter-dirs-flag t))) + (\"HOME\" + (:tree \"~\" \"^[^.].*[^~]$\") + (:filter-dirs-flag t))) `filesets-data' is a list of (NAME-AS-STRING . DEFINITION), DEFINITION being an association list with the fields: @@ -2450,13 +2450,13 @@ and edit your startup file as shown below: 1. `filesets-data': Edit all :pattern filesets in your startup file and transform all entries as shown in this example: - \(\"Test\" (:pattern \"~/dir/^pattern$\")) - --> \(\"Test\" (:pattern \"~/dir/\" \"^pattern$\")) + (\"Test\" (:pattern \"~/dir/^pattern$\")) + --> (\"Test\" (:pattern \"~/dir/\" \"^pattern$\")) 2. `filesets-data': Change all occurrences of \":document\" to \":ingroup\": - \(\(\"Test\" \(:document \"~/dir/file\")) - --> \(\(\"Test\" \(:ingroup \"~/dir/file\")) + ((\"Test\" (:document \"~/dir/file\")) + --> ((\"Test\" (:ingroup \"~/dir/file\")) 3. `filesets-subdocument-patterns': If you already modified the variable previously called `filesets-subdocument-patterns', change its name to diff --git a/lisp/find-cmd.el b/lisp/find-cmd.el index d78a0b35fab..71c7a9b9c77 100644 --- a/lisp/find-cmd.el +++ b/lisp/find-cmd.el @@ -140,10 +140,10 @@ the string will be quoted).") "Initiate the building of a find command. For example: -\(find-cmd \\='\(prune \(name \".svn\" \".git\" \".CVS\"\)\) - \\='\(and \(or \(name \"*.pl\" \"*.pm\" \"*.t\"\) - \(mtime \"+1\"\)\) - \(fstype \"nfs\" \"ufs\"\)\)\)\) +\(find-cmd \\='(prune (name \".svn\" \".git\" \".CVS\")) + \\='(and (or (name \"*.pl\" \"*.pm\" \"*.t\") + (mtime \"+1\")) + (fstype \"nfs\" \"ufs\")))) `default-directory' is used as the initial search path. The result is a string that should be ready for the command line." @@ -159,9 +159,9 @@ result is a string that should be ready for the command line." (defun find-and (form) "And FORMs together, so: - \(and \(mtime \"+1\"\) \(name \"something\"\)\) + (and (mtime \"+1\") (name \"something\")) will produce: - find . \\\( -mtime +1 -and -name something \\\)" + find . \\( -mtime +1 -and -name something \\)" (if (< (length form) 2) (find-to-string (car form)) (concat "\\( " @@ -170,9 +170,9 @@ will produce: (defun find-or (form) "Or FORMs together, so: - \(or \(mtime \"+1\"\) \(name \"something\"\)\) + (or (mtime \"+1\") (name \"something\")) will produce: - find . \\\( -mtime +1 -or -name something \\\)" + find . \\( -mtime +1 -or -name something \\)" (if (< (length form) 2) (find-to-string (car form)) (concat "\\( " @@ -181,21 +181,21 @@ will produce: (defun find-not (form) "Or FORMs together and prefix with a -not, so: - \(not \(mtime \"+1\"\) \(name \"something\"\)\) + (not (mtime \"+1\") (name \"something\")) will produce: - -not \\\( -mtime +1 -or -name something \\\) + -not \\( -mtime +1 -or -name something \\) If you wanted the FORMs -and(ed) together instead then this would suffice: - \(not \(and \(mtime \"+1\"\) \(name \"something\"\)\)\)" + (not (and (mtime \"+1\") (name \"something\")))" (concat "-not " (find-or (mapcar #'find-to-string form)))) (defun find-prune (form) "-or together FORMs postfix `-prune' and then -or that with a -true, so: - \(\(prune \(name \".svn\" \".git\"\)\) \(name \"*.pm\"\)\) + ((prune (name \".svn\" \".git\")) (name \"*.pm\")) will produce (unwrapped): - \\\( \\\( \\\( -name .svn -or -name .git \\\) / - -prune -or -true \\\) -and -name *.pm \\\)" + \\( \\( \\( -name .svn -or -name .git \\) / + -prune -or -true \\) -and -name *.pm \\)" (find-or (list (concat (find-or (mapcar #'find-to-string form)) (find-generic "prune")) diff --git a/lisp/find-dired.el b/lisp/find-dired.el index b53c1da2a80..c4ef0fef229 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -72,10 +72,10 @@ a file listing in the desired format. LS-SWITCHES is a set of The two options must be set to compatible values. For example, to use human-readable file sizes with GNU ls: - \(\"-exec ls -ldh {} +\" . \"-ldh\") + (\"-exec ls -ldh {} +\" . \"-ldh\") To use GNU find's inbuilt \"-ls\" option to list files: - \(\"-ls\" . \"-dilsb\") + (\"-ls\" . \"-dilsb\") since GNU find's output has the same format as using GNU ls with the options \"-dilsb\"." :version "24.1" ; add tests for -ls and -exec + support diff --git a/lisp/find-file.el b/lisp/find-file.el index 97e95d206d8..5c2c5064453 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -183,7 +183,7 @@ To override this, give an argument to `ff-find-other-file'." ;;;###autoload (defcustom ff-special-constructs ;; C/C++ include, for NeXTstep too - `((,(purecopy "^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") . + `((,(purecopy "^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") . (lambda () (buffer-substring (match-beginning 2) (match-end 2))))) ;; We include `ff-treat-as-special' documentation here so that autoload @@ -678,7 +678,7 @@ name of the first file found." (setq suffixes suffix-list) ;; if dir does not contain '/*', look for the file - (if (and dir (not (string-match "\\([^*]*\\)/\\\*\\(/.*\\)*" dir))) + (if (and dir (not (string-match "\\([^*]*\\)/\\*\\(/.*\\)*" dir))) (progn ;; suffixes is nil => fname-stub is the file we are looking for diff --git a/lisp/foldout.el b/lisp/foldout.el index 64c0af451b8..0a401c77ddf 100644 --- a/lisp/foldout.el +++ b/lisp/foldout.el @@ -250,7 +250,7 @@ An end marker of nil means the fold ends after (point-max).") "Open the subtree under the current heading and narrow to it. Normally the body and the immediate subheadings are exposed, but -optional arg EXPOSURE \(interactively with prefix arg\) changes this:- +optional arg EXPOSURE \(interactively with prefix arg) changes this:- EXPOSURE > 0 exposes n levels of subheadings (c.f. show-children) EXPOSURE < 0 exposes only the body diff --git a/lisp/follow.el b/lisp/follow.el index d62d5577dab..938c59e8506 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -347,6 +347,9 @@ Used by `follow-window-size-change'.") (defvar follow-windows-start-end-cache nil "Cache used by `follow-window-start-end'.") +(defvar follow-fixed-window nil + "If non-nil, the current window must not be scrolled. +This is typically set by explicit scrolling commands.") ;;; Debug messages ;; This inline function must be as small as possible! @@ -439,6 +442,54 @@ Keys specific to Follow mode: ;;; Scroll +(defun follow-get-scrolled-point (dest windows) + "Calculate the correct value for point after a scrolling operation. + +DEST is our default position, typically where point was before the scroll. +If `scroll-preserve-screen-position' is non-nil and active, DEST will be +in the same screen position as before the scroll. WINDOWS is the list of +windows in the follow chain. + +This function attempts to duplicate the point placing from +`window_scroll_line_based' in the Emacs core source window.c. + +Return the new position." + (if (and scroll-preserve-screen-position + (get this-command 'scroll-command)) + dest + (let ((dest-column + (save-excursion + (goto-char dest) + (- (current-column) + (progn (vertical-motion 0) (current-column))))) + (limit0 + (with-selected-window (car windows) + (save-excursion + (goto-char (window-start)) + (vertical-motion 0) + (point)))) + (limitn + (with-selected-window (car (reverse windows)) + (save-excursion + (goto-char (window-end nil t)) + (if (pos-visible-in-window-p) + (point) ; i.e. (point-max) + (1- (point))))))) + (cond + ((< dest limit0) + (with-selected-window (car windows) + (save-excursion + (goto-char limit0) + (vertical-motion (cons dest-column 0)) + (point)))) + ((> dest limitn) + (with-selected-window (car (reverse windows)) + (save-excursion + (goto-char limitn) + (vertical-motion (cons dest-column 0)) + (point)))) + (t dest))))) + ;; `scroll-up' and `-down', but for windows in Follow mode. ;; ;; Almost like the real thing, except when the cursor ends up outside @@ -454,6 +505,7 @@ Keys specific to Follow mode: ;; position... (This would also be corrected if we would have had a ;; good redisplay abstraction.) +;;;###autoload (defun follow-scroll-up (&optional arg) "Scroll text in a Follow mode window chain up. @@ -467,22 +519,26 @@ Works like `scroll-up' when not in Follow mode." (interactive "P") (cond ((not follow-mode) (scroll-up arg)) - (arg - (save-excursion (scroll-up arg)) - (setq follow-internal-force-redisplay t)) + ((eq arg '-) + (follow-scroll-down)) (t - (let* ((windows (follow-all-followers)) - (end (window-end (car (reverse windows))))) - (if (eq end (point-max)) - (signal 'end-of-buffer nil) - (select-window (car windows)) - ;; `window-end' might return nil. - (if end - (goto-char end)) - (vertical-motion (- next-screen-context-lines)) - (set-window-start (car windows) (point))))))) - + (let ((opoint (point)) (owin (selected-window))) + (while + ;; If we are too near EOB, try scrolling the previous window. + (condition-case nil (progn (scroll-up arg) nil) + (end-of-buffer + (condition-case nil (progn (follow-previous-window) t) + (error + (select-window owin) + (goto-char opoint) + (signal 'end-of-buffer nil)))))) + (unless (and scroll-preserve-screen-position + (get this-command 'scroll-command)) + (goto-char opoint)) + (setq follow-fixed-window t))))) +(put 'follow-scroll-up 'scroll-command t) +;;;###autoload (defun follow-scroll-down (&optional arg) "Scroll text in a Follow mode window chain down. @@ -492,27 +548,20 @@ the top window in the chain will be visible in the bottom window. If called with an argument, scroll ARG lines down. Negative ARG means scroll upward. -Works like `scroll-up' when not in Follow mode." +Works like `scroll-down' when not in Follow mode." (interactive "P") (cond ((not follow-mode) - (scroll-up arg)) - (arg - (save-excursion (scroll-down arg))) + (scroll-down arg)) + ((eq arg '-) + (follow-scroll-up)) (t - (let* ((windows (follow-all-followers)) - (win (car (reverse windows))) - (start (window-start (car windows)))) - (if (eq start (point-min)) - (signal 'beginning-of-buffer nil) - (select-window win) - (goto-char start) - (vertical-motion (- (- (window-height win) - (if header-line-format 2 1) - next-screen-context-lines))) - (set-window-start win (point)) - (goto-char start) - (vertical-motion (- next-screen-context-lines 1)) - (setq follow-internal-force-redisplay t)))))) + (let ((opoint (point))) + (scroll-down arg) + (unless (and scroll-preserve-screen-position + (get this-command 'scroll-command)) + (goto-char opoint)) + (setq follow-fixed-window t))))) +(put 'follow-scroll-down 'scroll-command t) (declare-function comint-adjust-point "comint" (window)) (defvar comint-scroll-show-maximum-output) @@ -766,15 +815,16 @@ from the selected window." Return (END-POS END-OF-BUFFER). Actually, the position returned is the start of the line after -the last fully-visible line in WIN. If WIN is nil, the selected -window is used." +the last fully-visible line in WIN. END-OF-BUFFER is t when EOB +is fully-visible in WIN. If WIN is nil, the selected window is +used." (let* ((win (or win (selected-window))) (edges (window-inside-pixel-edges win)) (ht (- (nth 3 edges) (nth 1 edges))) (last-line-pos (posn-point (posn-at-x-y 0 (1- ht) win)))) (if (pos-visible-in-window-p last-line-pos win) (let ((end (window-end win t))) - (list end (= end (point-max)))) + (list end (pos-visible-in-window-p (point-max) win))) (list last-line-pos nil)))) (defun follow-calc-win-start (windows pos win) @@ -1008,7 +1058,7 @@ should be a member of WINDOWS, starts at position START." (goto-char start) (vertical-motion 0 win) (dolist (w windows-before) - (vertical-motion (- 1 (window-text-height w)) w)) + (vertical-motion (- (window-text-height w)) w)) (point)))) @@ -1130,138 +1180,144 @@ non-first windows in Follow mode." (cl-assert (eq (window-buffer win) (current-buffer))) (when (and follow-mode (not (window-minibuffer-p win))) - (let* ((dest (point)) - (windows (follow-all-followers win)) - (win-start-end (progn - (follow-update-window-start (car windows)) - (follow-windows-start-end windows))) - (aligned (follow-windows-aligned-p win-start-end)) - (visible (follow-pos-visible dest win win-start-end)) - selected-window-up-to-date) - (unless (and aligned visible) - (setq follow-windows-start-end-cache nil)) - - ;; Select a window to display point. - (unless follow-internal-force-redisplay - (if (eq dest (point-max)) - ;; Be careful at point-max: the display can be aligned - ;; while DEST can be visible in several windows. - (cond - ;; Select the current window, but only when the display - ;; is correct. (When inserting characters in a tail - ;; window, the display is not correct, as they are - ;; shown twice.) - ;; - ;; Never stick to the current window after a deletion. - ;; Otherwise, when typing `DEL' in a window showing - ;; only the end of the file, a character would be - ;; removed from the window above, which is very - ;; unintuitive. - ((and visible - aligned - (not (memq this-command - '(backward-delete-char - delete-backward-char - backward-delete-char-untabify - kill-region)))) - (follow-debug-message "Max: same")) - ;; If the end is visible, and the window doesn't - ;; seems like it just has been moved, select it. - ((follow-select-if-end-visible win-start-end) - (follow-debug-message "Max: end visible") - (setq visible t aligned nil) - (goto-char dest)) - ;; Just show the end... - (t - (follow-debug-message "Max: default") - (select-window (car (last windows))) - (goto-char dest) - (setq visible nil aligned nil))) - - ;; We're not at the end, here life is much simpler. - (cond - ;; This is the normal case! - ;; It should be optimized for speed. - ((and visible aligned) - (follow-debug-message "same")) - ;; Pick a position in any window. If the display is ok, - ;; this picks the `correct' window. - ((follow-select-if-visible dest win-start-end) - (follow-debug-message "visible") - (goto-char dest) - ;; Perform redisplay, in case line is partially visible. - (setq visible nil)) - ;; Not visible anywhere else, lets pick this one. - (visible - (follow-debug-message "visible in selected.")) - ;; If DEST is before the first window start, select the - ;; first window. - ((< dest (nth 1 (car win-start-end))) - (follow-debug-message "before first") - (select-window (car windows)) - (goto-char dest) - (setq visible nil aligned nil)) - ;; If we can position the cursor without moving the first - ;; window, do it. This is the case that catches `RET' at - ;; the bottom of a window. - ((follow-select-if-visible-from-first dest windows) - (follow-debug-message "Below first") - (setq visible t aligned t)) - ;; None of the above. Stick to the selected window. - (t - (follow-debug-message "None") - (setq visible nil aligned nil)))) - - ;; If a new window was selected, make sure that the old is - ;; not scrolled when point is outside the window. - (unless (eq win (selected-window)) - (let ((p (window-point win))) - (set-window-start win (window-start win) nil) - (set-window-point win p)))) - - (unless visible - ;; If point may not be visible in the selected window, - ;; perform a redisplay; this ensures scrolling. - (let ((opoint (point))) - (redisplay) - ;; If this `redisplay' moved point, we got clobbered by a - ;; previous call to `set-window-start'. Try again. - (when (/= (point) opoint) - (goto-char opoint) - (redisplay))) - - (setq selected-window-up-to-date t) - (follow-avoid-tail-recenter) - (setq win-start-end (follow-windows-start-end windows) - follow-windows-start-end-cache nil - aligned nil)) - - ;; Now redraw the windows around the selected window. - (unless (and (not follow-internal-force-redisplay) - (or aligned - (follow-windows-aligned-p win-start-end)) - (follow-point-visible-all-windows-p win-start-end)) - (setq follow-internal-force-redisplay nil) - (follow-redisplay windows (selected-window) - selected-window-up-to-date) - (setq win-start-end (follow-windows-start-end windows) - follow-windows-start-end-cache nil) - ;; Point can end up in another window when DEST is at - ;; the beginning of the buffer and the selected window is - ;; not the first. It can also happen when long lines are - ;; used and there is a big difference between the width of - ;; the windows. (When scrolling one line in a wide window - ;; which will cause a move larger that an entire small - ;; window.) - (unless (follow-pos-visible dest win win-start-end) - (follow-select-if-visible dest win-start-end) - (goto-char dest))) - - ;; If the region is visible, make it look good when spanning - ;; multiple windows. - (when (region-active-p) - (follow-maximize-region - (selected-window) windows win-start-end))) + (let ((windows (follow-all-followers win))) + ;; If we've explicitly scrolled, align the windows first. + (when follow-fixed-window + (follow-debug-message "fixed") + (follow-redisplay windows win) + (goto-char (follow-get-scrolled-point (point) windows)) + (setq follow-fixed-window nil)) + (let* ((dest (point)) + (win-start-end (progn + (follow-update-window-start (car windows)) + (follow-windows-start-end windows))) + (aligned (follow-windows-aligned-p win-start-end)) + (visible (follow-pos-visible dest win win-start-end)) + selected-window-up-to-date) + (unless (and aligned visible) + (setq follow-windows-start-end-cache nil)) + + ;; Select a window to display point. + (unless follow-internal-force-redisplay + (if (eq dest (point-max)) + ;; Be careful at point-max: the display can be aligned + ;; while DEST can be visible in several windows. + (cond + ;; Select the current window, but only when the display + ;; is correct. (When inserting characters in a tail + ;; window, the display is not correct, as they are + ;; shown twice.) + ;; + ;; Never stick to the current window after a deletion. + ;; Otherwise, when typing `DEL' in a window showing + ;; only the end of the file, a character would be + ;; removed from the window above, which is very + ;; unintuitive. + ((and visible + aligned + (not (memq this-command + '(backward-delete-char + delete-backward-char + backward-delete-char-untabify + kill-region)))) + (follow-debug-message "Max: same")) + ;; If the end is visible, and the window doesn't + ;; seems like it just has been moved, select it. + ((follow-select-if-end-visible win-start-end) + (follow-debug-message "Max: end visible") + (setq visible t aligned nil) + (goto-char dest)) + ;; Just show the end... + (t + (follow-debug-message "Max: default") + (select-window (car (last windows))) + (goto-char dest) + (setq visible nil aligned nil))) + + ;; We're not at the end, here life is much simpler. + (cond + ;; This is the normal case! + ;; It should be optimized for speed. + ((and visible aligned) + (follow-debug-message "same")) + ;; Pick a position in any window. If the display is ok, + ;; this picks the `correct' window. + ((follow-select-if-visible dest win-start-end) + (follow-debug-message "visible") + (goto-char dest) + ;; Perform redisplay, in case line is partially visible. + (setq visible nil)) + ;; Not visible anywhere else, lets pick this one. + (visible + (follow-debug-message "visible in selected.")) + ;; If DEST is before the first window start, select the + ;; first window. + ((< dest (nth 1 (car win-start-end))) + (follow-debug-message "before first") + (select-window (car windows)) + (goto-char dest) + (setq visible nil aligned nil)) + ;; If we can position the cursor without moving the first + ;; window, do it. This is the case that catches `RET' at + ;; the bottom of a window. + ((follow-select-if-visible-from-first dest windows) + (follow-debug-message "Below first") + (setq visible t aligned t)) + ;; None of the above. Stick to the selected window. + (t + (follow-debug-message "None") + (setq visible nil aligned nil)))) + + ;; If a new window was selected, make sure that the old is + ;; not scrolled when point is outside the window. + (unless (eq win (selected-window)) + (let ((p (window-point win))) + (set-window-start win (window-start win) nil) + (set-window-point win p)))) + + (unless visible + ;; If point may not be visible in the selected window, + ;; perform a redisplay; this ensures scrolling. + (let ((opoint (point))) + (redisplay) + ;; If this `redisplay' moved point, we got clobbered by a + ;; previous call to `set-window-start'. Try again. + (when (/= (point) opoint) + (goto-char opoint) + (redisplay))) + + (setq selected-window-up-to-date t) + (follow-avoid-tail-recenter) + (setq win-start-end (follow-windows-start-end windows) + follow-windows-start-end-cache nil + aligned nil)) + + ;; Now redraw the windows around the selected window. + (unless (and (not follow-internal-force-redisplay) + (or aligned + (follow-windows-aligned-p win-start-end)) + (follow-point-visible-all-windows-p win-start-end)) + (setq follow-internal-force-redisplay nil) + (follow-redisplay windows (selected-window) + selected-window-up-to-date) + (setq win-start-end (follow-windows-start-end windows) + follow-windows-start-end-cache nil) + ;; Point can end up in another window when DEST is at + ;; the beginning of the buffer and the selected window is + ;; not the first. It can also happen when long lines are + ;; used and there is a big difference between the width of + ;; the windows. (When scrolling one line in a wide window + ;; which will cause a move larger that an entire small + ;; window.) + (unless (follow-pos-visible dest win win-start-end) + (follow-select-if-visible dest win-start-end) + (goto-char dest))) + + ;; If the region is visible, make it look good when spanning + ;; multiple windows. + (when (region-active-p) + (follow-maximize-region + (selected-window) windows win-start-end)))) ;; Whether or not the buffer was in follow mode, update windows ;; displaying the tail so that Emacs won't recenter them. diff --git a/lisp/font-core.el b/lisp/font-core.el index 6d8588bfa33..2253204d9f7 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -30,7 +30,7 @@ "Defaults for Font Lock mode specified by the major mode. Defaults should be of the form: - (KEYWORDS [KEYWORDS-ONLY [CASE-FOLD [SYNTAX-ALIST [SYNTAX-BEGIN ...]]]]) + (KEYWORDS [KEYWORDS-ONLY [CASE-FOLD [SYNTAX-ALIST ...]]]) KEYWORDS may be a symbol (a variable or function whose value is the keywords to use for fontification) or a list of symbols (specifying different levels @@ -45,20 +45,9 @@ If SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form \(CHAR-OR-STRING . STRING) used to set the local Font Lock syntax table, for keyword and syntactic fontification (see `modify-syntax-entry'). -If SYNTAX-BEGIN is non-nil, it should be a function with no args used to move -backwards outside any enclosing syntactic block, for syntactic fontification. -Typical values are `beginning-of-line' (i.e., the start of the line is known to -be outside a syntactic block), or `beginning-of-defun' for programming modes or -`backward-paragraph' for textual modes (i.e., the mode-dependent function is -known to move outside a syntactic block). If nil, the beginning of the buffer -is used as a position outside of a syntactic block, in the worst case. - -\(See also Info node `(elisp)Font Lock Basics'.) - These item elements are used by Font Lock mode to set the variables `font-lock-keywords', `font-lock-keywords-only', -`font-lock-keywords-case-fold-search', `font-lock-syntax-table' and -`font-lock-beginning-of-syntax-function', respectively. +`font-lock-keywords-case-fold-search', `font-lock-syntax-table'. Further item elements are alists of the form (VARIABLE . VALUE) and are in no particular order. Each VARIABLE is made buffer-local before set to VALUE. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index cec95bf259c..e2660bfab91 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -556,21 +556,6 @@ This is normally set via `font-lock-defaults'.") If this is nil, the major mode's syntax table is used. This is normally set via `font-lock-defaults'.") -(defvar font-lock-beginning-of-syntax-function nil - "Non-nil means use this function to move back outside all constructs. -When called with no args it should move point backward to a place which -is not in a string or comment and not within any bracket-pairs (or else, -a place such that any bracket-pairs outside it can be ignored for Emacs -syntax analysis and fontification). - -If this is nil, Font Lock uses `syntax-begin-function' to move back -outside of any comment, string, or sexp. This variable is semi-obsolete; -we recommend setting `syntax-begin-function' instead. - -This is normally set via `font-lock-defaults'.") -(make-obsolete-variable 'font-lock-beginning-of-syntax-function - 'syntax-begin-function "23.3" 'set) - (defvar font-lock-mark-block-function nil "Non-nil means use this function to mark a block of text. When called with no args it should leave point at the beginning of any @@ -1347,7 +1332,7 @@ no ARG is given and `font-lock-mark-block-function' is nil. If `font-lock-mark-block-function' non-nil and no ARG is given, it is used to delimit the region to fontify." (interactive "P") - (let ((inhibit-point-motion-hooks t) font-lock-beginning-of-syntax-function + (let ((inhibit-point-motion-hooks t) deactivate-mark) ;; Make sure we have the right `font-lock-keywords' etc. (if (not font-lock-mode) (font-lock-set-defaults)) @@ -1765,11 +1750,10 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for (cons t (cons keywords (mapcar #'font-lock-compile-keyword keywords)))) (if (and (not syntactic-keywords) - (let ((beg-function - (or font-lock-beginning-of-syntax-function - syntax-begin-function))) + (let ((beg-function syntax-begin-function)) (or (eq beg-function 'beginning-of-defun) - (get beg-function 'font-lock-syntax-paren-check))) + (if (symbolp beg-function) + (get beg-function 'font-lock-syntax-paren-check)))) (not beginning-of-defun-function)) ;; Try to detect when a string or comment contains something that ;; looks like a defun and would thus confuse font-lock. @@ -1890,17 +1874,14 @@ Sets various variables using `font-lock-defaults' and (list (car selem)) (mapcar 'identity (car selem)))) (modify-syntax-entry char syntax font-lock-syntax-table))))) - ;; Syntax function for syntactic fontification? - (if (nth 4 defaults) - (set (make-local-variable 'font-lock-beginning-of-syntax-function) - (nth 4 defaults)) - (kill-local-variable 'font-lock-beginning-of-syntax-function)) + ;; (nth 4 defaults) used to hold `font-lock-beginning-of-syntax-function', + ;; but that was removed in 25.1, so if it's a cons cell, we assume that + ;; it's part of the variable alist. ;; Variable alist? - (dolist (x (nthcdr 5 defaults)) + (dolist (x (nthcdr (if (consp (nth 4 defaults)) 4 5) defaults)) (set (make-local-variable (car x)) (cdr x))) ;; Set up `font-lock-keywords' last because its value might depend - ;; on other settings (e.g. font-lock-compile-keywords uses - ;; font-lock-beginning-of-syntax-function). + ;; on other settings. (set (make-local-variable 'font-lock-keywords) (font-lock-eval-keywords keywords)) ;; Local fontification? diff --git a/lisp/format.el b/lisp/format.el index dbc814e5b01..8a756e3396c 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -513,7 +513,7 @@ Optional args BEG and END specify a region of the buffer on which to operate." (defun format-delq-cons (cons list) "Remove the given CONS from LIST by side effect and return the new LIST. Since CONS could be the first element of LIST, write -`\(setq foo \(format-delq-cons element foo))' to be sure of changing +\(setq foo \(format-delq-cons element foo)) to be sure of changing the value of `foo'." (if (eq cons list) (cdr list) @@ -619,7 +619,7 @@ the rest of the arguments are any PARAMETERs found in that region. Any annotations that are found by NEXT-FN but not defined by TRANSLATIONS are saved as values of the `unknown' text-property \(which is list-valued). The TRANSLATIONS list should usually contain an entry of the form - \(unknown \(nil format-annotate-value)) + (unknown (nil format-annotate-value)) to write these unknown annotations back into the file." (save-excursion (save-restriction @@ -827,7 +827,7 @@ in the region, it is treated as though it were DEFAULT." Insert each element of the given LIST of buffer annotations at its appropriate place. Use second arg OFFSET if the annotations' locations are not relative to the beginning of the buffer: annotations will be inserted -at their location-OFFSET+1 \(ie, the offset is treated as the position of +at their location-OFFSET+1 \(i.e., the offset is treated as the position of the first character in the buffer)." (if (not offset) (setq offset 0) @@ -839,7 +839,7 @@ the first character in the buffer)." (setq l (cdr l))))) (defun format-annotate-value (old new) - "Return OLD and NEW as a \(CLOSE . OPEN) annotation pair. + "Return OLD and NEW as a (CLOSE . OPEN) annotation pair. Useful as a default function for TRANSLATIONS alist when the value of the text property is the name of the annotation that you want to use, as it is for the `unknown' text property." diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index ce8e1b91e4f..29ab9788bba 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -7711,7 +7711,7 @@ (gnus-agent-fetch-selected-article): New function for gnus-select-article-hook or gnus-mark-article-hook. -2002-10-02 Peter von der Ahe <nospam2159@daimi.au.dk> +2002-10-02 Peter von der Ahé <nospam2159@daimi.au.dk> * gnus-ems.el (gnus-x-splash): Set coding-system-for-read to raw-text. diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 3f426bf95f6..f101ecdea08 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -362,7 +362,7 @@ If the value is not a list, symmetric encryption will be used." "Read one of CHOICES by `read-char-choice', or `read-char'. `dropdown-list' support is disabled because it doesn't work reliably. Only one of CHOICES will be returned. The PROMPT is augmented -with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." +with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)." (when choices (let* ((prompt-choices (apply 'concat (loop for c in choices @@ -1557,20 +1557,20 @@ You'll get back all the properties of the token as a plist. Here's an example that looks for the first item in the `Login' Secrets collection: - \(let ((auth-sources \\='(\"secrets:Login\"))) + (let ((auth-sources \\='(\"secrets:Login\"))) (auth-source-search :max 1) Here's another that looks for the first item in the `Login' Secrets collection whose label contains `gnus': - \(let ((auth-sources \\='(\"secrets:Login\"))) + (let ((auth-sources \\='(\"secrets:Login\"))) (auth-source-search :max 1 :label \"gnus\") And this one looks for the first item in the `Login' Secrets collection that's a Google Chrome entry for the git.gnus.org site authentication tokens: - \(let ((auth-sources \\='(\"secrets:Login\"))) + (let ((auth-sources \\='(\"secrets:Login\"))) (auth-source-search :max 1 :signon_realm \"https://git.gnus.org/Git\")) " @@ -1691,19 +1691,19 @@ field), :user maps to \"-a USER\", and :port maps to \"-s PORT\". Here's an example that looks for the first item in the default generic MacOS Keychain: - \(let ((auth-sources \\='(macos-keychain-generic))) + (let ((auth-sources \\='(macos-keychain-generic))) (auth-source-search :max 1) Here's another that looks for the first item in the internet MacOS Keychain collection whose label is `gnus': - \(let ((auth-sources \\='(macos-keychain-internet))) + (let ((auth-sources \\='(macos-keychain-internet))) (auth-source-search :max 1 :label \"gnus\") And this one looks for the first item in the internet keychain entries for git.gnus.org: - \(let ((auth-sources \\='(macos-keychain-internet\"))) + (let ((auth-sources \\='(macos-keychain-internet\"))) (auth-source-search :max 1 :host \"git.gnus.org\")) " ;; TODO diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 8ad81c9fc3e..44aff772402 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5516,7 +5516,7 @@ If no internal viewer is available, use an external viewer." (mm-display-part handle nil t)))))) (defun gnus-mime-action-on-part (&optional action) - "Do something with the MIME attachment at \(point\)." + "Do something with the MIME attachment at (point)." (interactive (list (gnus-completing-read "Action" (mapcar 'car gnus-mime-action-alist) t))) (gnus-article-check-buffer) @@ -5992,7 +5992,7 @@ If t, it overrides nil values of "Display \"multipart/related\" parts as \"multipart/mixed\". If displaying \"text/html\" is discouraged \(see -`mm-discouraged-alternatives'\) images or other material inside a +`mm-discouraged-alternatives') images or other material inside a \"multipart/related\" part might be overlooked when this variable is nil." :version "22.1" :group 'gnus-article-mime @@ -7545,7 +7545,7 @@ must return `mid', `mail', `invalid' or `ask'." (10.0 . "^[^0-9]+@") (3.0 . "^[^0-9]+[0-9][0-9]?[0-9]?@") ;; ^[^0-9]+[0-9]{1,3}\@ digits only at end of local part - (3.0 . "\@stud") + (3.0 . "@stud") ;; (2.0 . "[a-z][a-z][._-][A-Z][a-z].*@") ;; @@ -7553,7 +7553,7 @@ must return `mid', `mail', `invalid' or `ask'." (0.5 . "^[A-Z][a-z][a-z]") (1.5 . "^[A-Z][a-z][A-Z][a-z][^a-z]") ;; ^[A-Z][a-z]{3,3} (2.0 . "^[A-Z][a-z][A-Z][a-z][a-z][^a-z]")) ;; ^[A-Z][a-z]{4,4} - "An alist of \(RATE . REGEXP\) pairs for `gnus-button-mid-or-mail-heuristic'. + "An alist of (RATE . REGEXP) pairs for `gnus-button-mid-or-mail-heuristic'. A negative RATE indicates a message IDs, whereas a positive indicates a mail address. The REGEXP is processed with `case-fold-search' set to nil." @@ -7612,9 +7612,9 @@ address, `ask' if unsure and `invalid' if the string is invalid." (gnus-message 9 "Many digits in `%s', rate `%s', result `%s'." mid-or-mail rate result)) - ((string-match "[^aeiouy][^aeiouy][^aeiouy][^aeiouy]+.*\@" + ((string-match "[^aeiouy][^aeiouy][^aeiouy][^aeiouy]+.*@" mid-or-mail) - ;; Too few vowels [^aeiouy]{4,}.*\@ + ;; Too few vowels [^aeiouy]{4,}.*@ (setq result (+ result -5.0)) (gnus-message 9 "Few vowels in `%s', rate `%s', result `%s'." @@ -7724,7 +7724,7 @@ Calls `describe-variable' or `describe-function'." "Call `locate-library' when pushing the corresponding URL button." (gnus-message 9 "url=`%s'" url) (let* ((lib (locate-library url)) - (file (gnus-replace-in-string (or lib "") "\.elc" ".el"))) + (file (gnus-replace-in-string (or lib "") "\\.elc" ".el"))) (if (not lib) (gnus-message 1 "Cannot locale library `%s'." url) (find-file-read-only file)))) @@ -8113,7 +8113,7 @@ url is put as the `gnus-button-url' overlay property on the button." (< (match-end 0) start)) (regexp-quote (match-string 0))) "\ -\[\t ]*\\(?:\\([^\t\n \">]+\\)[\t ]*$\\|\\([^\t\n \">]*\\)[\t ]*" +[\t ]*\\(?:\\([^\t\n \">]+\\)[\t ]*$\\|\\([^\t\n \">]*\\)[\t ]*" delim "\\)")) (while (progn (forward-line 1) diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index e26c78b65c5..3e4807cd7ce 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -101,7 +101,7 @@ List of details is defined in `gnus-bookmark-bookmark-inline-details'. This may result in truncated bookmark names. To disable this, put the following in your `.emacs' file: -\(setq gnus-bookmark-bmenu-toggle-infos nil\)" +\(setq gnus-bookmark-bmenu-toggle-infos nil)" :type 'boolean :group 'gnus-bookmark) @@ -118,7 +118,7 @@ You can toggle whether details are shown with \\<gnus-bookmark-bmenu-mode-map>\\ (defcustom gnus-bookmark-bookmark-inline-details '(author) "Details to be shown with `gnus-bookmark-bmenu-toggle-infos'. -The default value is \(subject\)." +The default value is \(subject)." :type '(list :tag "Gnus bookmark details" (set :inline t (const :tag "Author" author) @@ -131,7 +131,7 @@ The default value is \(subject\)." (defcustom gnus-bookmark-bookmark-details '(author subject date group annotation) "Details to be shown with `gnus-bookmark-bmenu-show-details'. -The default value is \(author subject date group annotation\)." +The default value is \(author subject date group annotation)." :type '(list :tag "Gnus bookmark details" (set :inline t (const :tag "Author" author) @@ -160,17 +160,17 @@ You should never need to change this.") "Association list of Gnus bookmarks and their records. The format of the alist is - \(BMK1 BMK2 ...\) + (BMK1 BMK2 ...) where each BMK is of the form \(NAME - \(group . GROUP\) - \(message-id . MESSAGE-ID\) - \(author . AUTHOR\) - \(date . DATE\) - \(subject . SUBJECT\) - \(annotation . ANNOTATION\)\) + (group . GROUP) + (message-id . MESSAGE-ID) + (author . AUTHOR) + (date . DATE) + (subject . SUBJECT) + (annotation . ANNOTATION)) So the cdr of each bookmark is an alist too.") @@ -432,7 +432,7 @@ That is, all information but the name." (car (cdr (gnus-bookmark-get-bookmark bookmark)))) (defun gnus-bookmark-name-from-full-record (full-record) - "Return name of FULL-RECORD \(an alist element instead of a string\)." + "Return name of FULL-RECORD (an alist element instead of a string)." (car full-record)) (defvar gnus-bookmark-bmenu-bookmark-column nil) @@ -484,7 +484,7 @@ Gnus bookmarks names preceded by a \"*\" have annotations. Also show bookmarks marked using m in other windows. \\[gnus-bookmark-bmenu-toggle-infos] -- toggle displaying of details (they may obscure long bookmark names). \\[gnus-bookmark-bmenu-locate] -- display (in minibuffer) location of this bookmark. -\\[gnus-bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\). +\\[gnus-bookmark-bmenu-rename] -- rename this bookmark (prompts for new name). \\[gnus-bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down. \\[gnus-bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up. \\[gnus-bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[gnus-bookmark-bmenu-delete]'. @@ -806,7 +806,7 @@ command." Removes only the first instance of a bookmark with that name. If there are one or more other bookmarks with the same name, they will not be deleted. Defaults to the \"current\" bookmark \(that is, the -one most recently used in this file, if any\). +one most recently used in this file, if any). Optional second arg BATCH means don't update the bookmark list buffer, probably because we were called from there." (gnus-bookmark-maybe-load-default-file) diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 93b7a1ba635..9b8cbc3589d 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -436,7 +436,7 @@ to the groups in this topic, then edit the value to suit your taste." :greedy t :tag "Agent Parameters" :format "%t:\n%h%v" - :doc "\ These agent parameters are + :doc "These agent parameters are recognized by Gnus. They control article selection and expiration for use in the unplugged cache. Check the [ ] for the parameters you want to apply to this group or to the groups in this topic, then edit the diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index ad49824f028..b1a4933ebf1 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -155,7 +155,7 @@ list." (function-item gnus-group-sort-by-rank) (function :tag "other" nil)))) -(defcustom gnus-group-line-format "%M\%S\%p\%P\%5y:%B%(%g%)\n" +(defcustom gnus-group-line-format "%M\ %S\ %p\ %P\ %5y:%B%(%g%)\n" "*Format of group lines. It works along the same lines as a normal formatting string, with some simple extensions. @@ -213,7 +213,7 @@ See Info node `(gnus)Formatting Variables'." :group 'gnus-group-visual :type 'string) -(defcustom gnus-group-mode-line-format "Gnus: %%b {%M\%:%S}" +(defcustom gnus-group-mode-line-format "Gnus: %%b {%M\ %:%S}" "*The format specification for the group mode line. It works along the same lines as a normal formatting string, with some simple extensions: @@ -445,7 +445,7 @@ If non-nil, the value should be a string or an alist. If it is a string, e.g. \"nnml:\", in which case `gnus-group-jump-to-group' offers \"Group: nnml:\" in the minibuffer prompt. -If it is an alist, it must consist of \(NUMBER . PROMPT\) pairs, for example: +If it is an alist, it must consist of \(NUMBER . PROMPT) pairs, for example: \((1 . \"\") (2 . \"nnfolder+archive:\")). The element with number 0 is used when no prefix argument is given to `gnus-group-jump-to-group'." :version "22.1" @@ -2174,7 +2174,7 @@ be permanent." (gnus-group-decoded-name group))) (let ((regexp "[][\C-@-\t\v-*,/:-@\\^`{-\C-?]*\ \\(nn[a-z]+\\(?:\\+[^][\C-@-*,/:-@\\^`{-\C-?]+\\)?:\ -\[^][\C-@-*,./:-@\\^`{-\C-?]+\\(?:\\.[^][\C-@-*,./:-@\\^`{-\C-?]+\\)*\ +[^][\C-@-*,./:-@\\^`{-\C-?]+\\(?:\\.[^][\C-@-*,./:-@\\^`{-\C-?]+\\)*\ \\|[^][\C-@-*,./:-@\\^`{-\C-?]+\\(?:\\.[^][\C-@-*,./:-@\\^`{-\C-?]+\\)+\\)") (start (point)) (case-fold-search nil)) @@ -2435,7 +2435,7 @@ Valid input formats include: ;; URLs providing `group', `start' and `range': ((string-match ;; http://thread.gmane.org/gmane.emacs.devel/86326/focus=86525 - "^http://thread\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)/focus=\\([0-9]+\\)$" + "^http://thread\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)/focus=\\([0-9]+\\)$" url) (setq group (match-string 1 url) start (string-to-number (match-string 2 url)) @@ -2446,15 +2446,15 @@ Valid input formats include: ;; URLs providing `group' and `start': ((or (string-match ;; http://article.gmane.org/gmane.comp.gnu.make.bugs/3584 - "^http://\\(?:thread\\|article\\|permalink\\)\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)" + "^http://\\(?:thread\\|article\\|permalink\\)\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)" url) (string-match ;; Don't advertise these in the doc string yet: - "^\\(?:nntp\\|news\\)://news\.gmane\.org/\\([^/]+\\)/\\([0-9]+\\)" + "^\\(?:nntp\\|news\\)://news\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)" url) (string-match ;; http://news.gmane.org/group/gmane.emacs.gnus.general/thread=65099/force_load=t - "^http://news\.gmane\.org/group/\\([^/]+\\)/thread=\\([0-9]+\\)" + "^http://news\\.gmane\\.org/group/\\([^/]+\\)/thread=\\([0-9]+\\)" url)) (setq group (match-string 1 url) start (string-to-number (match-string 2 url)))) diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el index 56166f2fca2..37a5d6150db 100644 --- a/lisp/gnus/gnus-mlspl.el +++ b/lisp/gnus/gnus-mlspl.el @@ -100,7 +100,7 @@ See `gnus-group-split-fancy' for more information. "Uses information from group parameters in order to split mail. It can be embedded into `nnmail-split-fancy' lists with the SPLIT -\(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL\) +\(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL) GROUPS may be a regular expression or a list of group names, that will be used to select candidate groups. If it is omitted or nil, all diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 23c79cbdb15..77ff428e1f1 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -251,7 +251,7 @@ In order to prevent constant pruning, we prune back to a number somewhat less than the maximum size. This option controls exactly how much less. For example, given a maximum size of 50000 and a prune factor of 0.1, the pruning process will try to -cut the registry back to \(- 50000 \(* 50000 0.1\)\) -> 45000 +cut the registry back to \(- 50000 \(* 50000 0.1)) -> 45000 entries. The pruning process is constrained by the presence of \"precious\" entries." :version "25.1" diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 5776b0a569f..bca5f43cd5f 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -62,7 +62,7 @@ :group 'gnus-summary-pick) (defcustom gnus-summary-pick-line-format - "%-5P %U\%R\%z\%I\%(%[%4L: %-23,23n%]%) %s\n" + "%-5P %U\ %R\ %z\ %I\ %(%[%4L: %-23,23n%]%) %s\n" "*The format specification of the lines in pick buffers. It accepts the same format specs that `gnus-summary-line-format' does." :type 'string diff --git a/lisp/gnus/gnus-sieve.el b/lisp/gnus/gnus-sieve.el index cde93764cac..2a8ea3ed201 100644 --- a/lisp/gnus/gnus-sieve.el +++ b/lisp/gnus/gnus-sieve.el @@ -80,7 +80,7 @@ formatting characters are recognized: (defun gnus-sieve-update () "Update the Sieve script in gnus-sieve-file, by replacing the region between gnus-sieve-region-start and gnus-sieve-region-end with -\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost\), then +\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost), then execute gnus-sieve-update-shell-command. See the documentation for these variables and functions for details." (interactive) @@ -97,7 +97,7 @@ See the documentation for these variables and functions for details." (defun gnus-sieve-generate () "Generate the Sieve script in gnus-sieve-file, by replacing the region between gnus-sieve-region-start and gnus-sieve-region-end with -\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost\). +\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost). See the documentation for these variables and functions for details." (interactive) (require 'sieve) @@ -195,9 +195,9 @@ For example: (defun gnus-sieve-script (&optional method crosspost) "Generate a Sieve script based on groups with select method METHOD -\(or all groups if nil\). Only groups having a `sieve' parameter are +\(or all groups if nil). Only groups having a `sieve' parameter are considered. This parameter should contain an elisp test -\(see the documentation of gnus-sieve-test for details\). For each +\(see the documentation of gnus-sieve-test for details). For each such group, a Sieve IF control structure is generated, having the test as the condition and { fileinto \"group.name\"; } as the body. diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 215eac88aef..40e2dcf92fd 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1486,7 +1486,7 @@ sure of changing the value of `foo'." (defvar gnus-directory-sep-char-regexp "/" "The regexp of directory separator character. If you find some problem with the directory separator character, try -\"[/\\\\\]\" for some systems.") +\"[/\\\\]\" for some systems.") (defun gnus-url-unhex (x) (if (> x ?9) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index ea26216faca..a2913ac9fdd 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1361,7 +1361,7 @@ group (or nil) as a parameter. If you want to save your mail in one group and the news articles you write in another group, you could say something like: - \(setq gnus-message-archive-group + (setq gnus-message-archive-group \\='((if (message-news-p) \"misc-news\" \"misc-mail\"))) @@ -2517,10 +2517,10 @@ This should be an alist for Emacs, or a plist for XEmacs." "Which information should be exposed in the User-Agent header. Can be a list of symbols or a string. Valid symbols are `gnus' -\(show Gnus version\) and `emacs' \(show Emacs version\). In +\(show Gnus version) and `emacs' \(show Emacs version). In addition to the Emacs version, you can add `codename' \(show -\(S\)XEmacs codename\) or either `config' \(show system -configuration\) or `type' \(show system type\). If you set it to +\(S)XEmacs codename) or either `config' \(show system +configuration) or `type' \(show system type). If you set it to a string, be sure to use a valid format, see RFC 2616." :version "22.1" diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 5ede15b0538..1b693d77983 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -367,7 +367,7 @@ few false positives here." (defcustom message-archive-header "X-No-Archive: Yes\n" "Header to insert when you don't want your article to be archived. -Archives \(such as groups.google.com\) respect this header." +Archives \(such as groups.google.com) respect this header." :version "22.1" :type 'string :link '(custom-manual "(message)Header Commands") @@ -1200,7 +1200,7 @@ If stringp, use this; if non-nil, use no host name (user name only)." (defvar message-reply-headers nil "The headers of the current replied article. It is a vector of the following headers: -\[number subject from date id references chars lines xref extra].") +[number subject from date id references chars lines xref extra].") (defvar message-newsreader nil) (defvar message-mailer nil) (defvar message-sent-message-via nil) @@ -1303,7 +1303,7 @@ actually occur." "Alist of ways to send outgoing messages. Each element has the form - \(TYPE PREDICATE FUNCTION) + (TYPE PREDICATE FUNCTION) where TYPE is a symbol that names the method; PREDICATE is a function called without any parameters to determine whether the message is @@ -8329,7 +8329,7 @@ From headers in the original article." (list message-hidden-headers) message-hidden-headers)) (inhibit-point-motion-hooks t) - (after-change-functions nil) + (inhibit-modification-hooks t) (end-of-headers (point-min))) (when regexps (save-excursion diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 3d5a15afedb..327b0e6e86f 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1419,7 +1419,7 @@ Return t if meta tag is added or replaced." (goto-char (point-min)) (if (re-search-forward "\ <meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']\ -text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t) +text/\\(\\sw+\\)\\(?:;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t) (if (and (not force-charset) (match-beginning 2) (string-match "\\`html\\'" (match-string 1))) diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 8304f6f6a38..3d1515e8473 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -118,7 +118,7 @@ This can be either \"inline\" or \"attachment\".") mm-uu-shar-extract) (forward ;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and - ;; Peter von der Ah\'e <pahe@daimi.au.dk> + ;; Peter von der Ahé <pahe@daimi.au.dk> "^-+ \\(Start of \\)?Forwarded message" "^-+ End \\(of \\)?forwarded message" mm-uu-forward-extract @@ -771,4 +771,8 @@ Assume text has been decoded if DECODED is non-nil." (provide 'mm-uu) +;; Local Variables: +;; coding: utf-8 +;; End: + ;;; mm-uu.el ends here diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 70d803faf54..cca341875e0 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -742,7 +742,7 @@ from the document.") nil t) (setq subject (concat (match-string 1) subject)) (setq from (concat (match-string 2) " " from)))))) - (while (and from (string-match "(\[^)\]*)" from)) + (while (and from (string-match "([^)]*)" from)) (setq from (replace-match "" t t from))) (insert "From: " (or from "unknown") "\nSubject: " (or subject "(no subject)") "\n") diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index c88f4afa7dc..0d2d453df3e 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -66,7 +66,7 @@ they will keep on jabbering all the time." "*Max length of the head of articles. Value is an integer, nil, or t. nil means read in chunks of a file -indefinitely until a complete head is found\; t means always read the +indefinitely until a complete head is found; t means always read the entire file immediately, disregarding `nnheader-head-chop-length'. Integer values will in effect be rounded up to the nearest multiple of diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 5b72b52079d..3d8926b6925 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -147,7 +147,7 @@ by nnmaildir-request-article.") ;; A NOV structure looks like this (must be prin1-able, so no defstruct): ["subject\tfrom\tdate" - "references\tchars\lines" + "references\tchars\tlines" "To: you\tIn-Reply-To: <your.mess@ge>" (12345 67890) ;; modtime of the corresponding article file (to in-reply-to)] ;; contemporary value of nnmail-extra-headers diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 6c97cecdcdb..ec9a66614b4 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -175,7 +175,7 @@ This variable is used by the various nntp-open-via-* methods.") "*Whether both telnet client and server support the ENVIRON option. If non-nil, there will be no prompt for a login name.") -(defvoo nntp-via-shell-prompt "bash\\|\$ *\r?$\\|> *\r?" +(defvoo nntp-via-shell-prompt "bash\\|[$>] *\r?$" "*Regular expression to match the shell prompt on an intermediate host. This variable is used by the `nntp-open-via-telnet-and-telnet' method.") @@ -1764,7 +1764,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the (defvoo nntp-open-telnet-envuser nil "*If non-nil, telnet session (client and server both) will support the ENVIRON option and not prompt for login name.") -(defvoo nntp-telnet-shell-prompt "bash\\|\$ *\r?$\\|> *\r?" +(defvoo nntp-telnet-shell-prompt "bash\\|[$>] *\r?$" "*Regular expression to match the shell prompt on the remote machine.") (defvoo nntp-rlogin-program "rsh" diff --git a/lisp/gnus/registry.el b/lisp/gnus/registry.el index 783ff36172b..9f3f38175bc 100644 --- a/lisp/gnus/registry.el +++ b/lisp/gnus/registry.el @@ -112,7 +112,7 @@ :initform 0.1 :type float :custom float - :documentation "Prune to \(:max-size * :prune-factor\) less + :documentation "Prune to (:max-size * :prune-factor) less than the :max-size limit. Should be a float between 0 and 1.") (tracked :initarg :tracked :initform nil @@ -222,9 +222,9 @@ When SET is not nil, set it for VAL (use t for an empty list)." (defmethod registry-search ((db registry-db) &rest spec) "Search for SPEC across the registry-db THIS. -For example calling with :member \\='(a 1 2) will match entry \\='((a 3 1)). -Calling with :all t (any non-nil value) will match all. -Calling with :regex \\='\(a \"h.llo\") will match entry \\='((a \"hullo\" \"bye\"). +For example calling with `:member \\='(a 1 2)' will match entry \((a 3 1)). +Calling with `:all t' (any non-nil value) will match all. +Calling with `:regex \\='(a \"h.llo\")' will match entry \(a \"hullo\" \"bye\"). The test order is to check :all first, then :member, then :regex." (when db (let ((all (plist-get spec :all)) @@ -331,7 +331,7 @@ Errors out if the key exists already." "Prunes the registry-db object DB. Attempts to prune the number of entries down to \(* -:max-size :prune-factor\) less than the max-size limit, so +:max-size :prune-factor) less than the max-size limit, so pruning doesn't need to happen on every save. Removes only entries without the :precious keys, so it may not be possible to reach the target limit. diff --git a/lisp/gnus/rfc1843.el b/lisp/gnus/rfc1843.el index cab2f4e751c..83bda2af8a9 100644 --- a/lisp/gnus/rfc1843.el +++ b/lisp/gnus/rfc1843.el @@ -46,11 +46,11 @@ (defvar rfc1843-hzp-word-regexp "~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\ -\[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") +[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") (defvar rfc1843-hzp-word-regexp-strictly "~\\({\\([\041-\167][\041-\176]\\)+\\|\ -\[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)") +[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)") (defcustom rfc1843-decode-loosely nil "Loosely check HZ encoding if non-nil. diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index ea558d75a20..e8a377979ff 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el @@ -102,7 +102,7 @@ quoted-printable and base64 respectively.") (eval-and-compile ;; Necessary to hard code them in `rfc2047-decode-region'. (defconst rfc2047-encoded-word-regexp - "=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\ + "=\\?\\([^][\000-\040()<>@,;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\ \\(B\\?[+/0-9A-Za-z]*=*\ \\|Q\\?[ ->@-~]*\ \\)\\?=" @@ -112,7 +112,7 @@ quoted-printable and base64 respectively.") ;; the characters that those encodings may generally use. ) (defconst rfc2047-encoded-word-regexp-loose - "=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\ + "=\\?\\([^][\000-\040()<>@,;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\ \\(B\\?[+/0-9A-Za-z]*=*\ \\|Q\\?\\(?:\\?+[ -<>@-~]\\)?\\(?:[ ->@-~]+\\?+[ -<>@-~]\\)*[ ->@-~]*\\?*\ \\)\\?=" diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index de680795a10..5871b08b35a 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -43,7 +43,7 @@ If you are using spam.el, consider setting gnus-spam-process-newsgroups or the gnus-group-spam-exit-processor-report-gmane group/topic parameter instead." :type '(radio (const nil) - (regexp :value "^nntp\+.*:gmane\.")) + (regexp :value "^nntp\\+.*:gmane\\.")) :group 'spam-report) (defcustom spam-report-gmane-use-article-number t diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 77ef21d4af1..945b4d523cc 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -178,7 +178,7 @@ if the variable `help-downcase-arguments' is non-nil." (skip-chars-forward "^ ") (while next (or opt (not (looking-at " &")) (setq opt t)) - (if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t)) + (if (not (re-search-forward " \\([\\[(]*\\)\\([^] &).]+\\)" nil t)) (setq next nil) (setq args (cons (match-string 2) args)) (when (and opt (string= (match-string 1) "(")) diff --git a/lisp/help.el b/lisp/help.el index 66df6b08037..3387628fb8a 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -355,7 +355,7 @@ With argument, display info only for the selected version." (while (re-search-forward (if (member file '("NEWS.18" "NEWS.1-17")) "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\\.[0-9]+\\)?\\)" - "^\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t) + "^\\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t) (setq res (cons (match-string-no-properties 1) res))))) (cons "NEWS" (directory-files data-directory nil @@ -392,7 +392,7 @@ With argument, display info only for the selected version." (when (re-search-forward (concat (if (< vn 19) "Changes in Emacs[ \t]*" - "^\* [^0-9\n]*") version "$") + "^\\* [^0-9\n]*") version "$") nil t) (beginning-of-line) (narrow-to-region @@ -402,7 +402,7 @@ With argument, display info only for the selected version." (re-search-forward (if (< vn 19) "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\\.[0-9]+\\)?\\)" - "^\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t)) + "^\\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t)) (equal (match-string-no-properties 1) version))) (or res (goto-char (point-max))) (beginning-of-line) diff --git a/lisp/hfy-cmap.el b/lisp/hfy-cmap.el index b7d3b344aca..6b7f2caed1e 100644 --- a/lisp/hfy-cmap.el +++ b/lisp/hfy-cmap.el @@ -810,7 +810,7 @@ Loads the variable `hfy-rgb-txt-colour-map', which is used by `hfy-fallback-colour-values'." (interactive (list - (read-file-name "rgb.txt \(equivalent\) file: " "" nil t (hfy-rgb-file)))) + (read-file-name "rgb.txt (equivalent) file: " "" nil t (hfy-rgb-file)))) (let ((rgb-buffer nil) (end-of-rgb 0) (rgb-txt nil)) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 74cdfe13f58..0a0a0b346c0 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1140,7 +1140,7 @@ See also `hfy-face-to-css'." (defvar hfy-face-to-css 'hfy-face-to-css-default "Handler for mapping faces to styles. -The signature of the handler is of the form \(lambda (FN) ...\). +The signature of the handler is of the form \(lambda (FN) ...). FN is a font or `defface' specification (cf `face-attr-construct'). The handler should return a cons cell of the form (STYLE-NAME . STYLE-SPEC). @@ -1598,7 +1598,7 @@ information." (defvar hfy-begin-span-handler 'hfy-begin-span "Handler to begin a span of text. The signature of the handler is \(lambda (STYLE TEXT-BLOCK -TEXT-ID TEXT-BEGINS-BLOCK-P) ...\). The handler must insert +TEXT-ID TEXT-BEGINS-BLOCK-P) ...). The handler must insert appropriate tags to begin a span of text. STYLE is the name of the style that begins at point. It is @@ -1626,7 +1626,7 @@ The default handler is `hfy-begin-span'.") (defvar hfy-end-span-handler 'hfy-end-span "Handler to end a span of text. -The signature of the handler is \(lambda () ...\). The handler +The signature of the handler is \(lambda () ...). The handler must insert appropriate tags to end a span of text. The default handler is `hfy-end-span'.") @@ -2412,7 +2412,7 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'." (load file 'NOERROR nil nil) )) -;;;### (autoloads nil "hfy-cmap" "hfy-cmap.el" "ce07a28b93c09032fd6b225ad74be0df") +;;;### (autoloads nil "hfy-cmap" "hfy-cmap.el" "1fb78b15b18622256262c7246b2a3520") ;;; Generated autoloads from hfy-cmap.el (autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\ diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 718471b7993..5065b661101 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1785,7 +1785,7 @@ If point is on a group name, this function operates on that group." (let ((procs 0) (files 0)) (dolist (string strings) - (if (string-match "\\(\?:\\`(\[\[:ascii:\]\]\+)\\)" string) + (if (string-match "\\(?:\\`([[:ascii:]]+)\\)" string) (progn (setq procs (1+ procs)) (if (< (match-end 0) (length string)) (setq files (1+ files)))) @@ -2037,7 +2037,7 @@ the value of point at the beginning of the line for that buffer." (defun ibuffer-update-title-and-summary (format) (ibuffer-assert-ibuffer-mode) ;; Don't do funky font-lock stuff here - (let ((after-change-functions nil)) + (let ((inhibit-modification-hooks t)) (if (get-text-property (point-min) 'ibuffer-title) (delete-region (point-min) (next-single-property-change @@ -2244,7 +2244,7 @@ If optional arg SILENT is non-nil, do not display progress messages." (orig (count-lines (point-min) (point))) ;; Inhibit font-lock caching tricks, since we're modifying the ;; entire buffer at once - (after-change-functions nil) + (inhibit-modification-hooks t) (ext-loaded (featurep 'ibuf-ext)) (bgroups (if ext-loaded (ibuffer-generate-filter-groups bmarklist) diff --git a/lisp/ido.el b/lisp/ido.el index 13b6d52e75c..6ad354c58f2 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3777,13 +3777,13 @@ frame, rather than all frames, regardless of value of `ido-all-frames'." (not (and (eq ido-cur-item 'buffer) ido-buffer-disable-smart-matches)) (not ido-enable-regexp) - (not (string-match "\$\\'" rex0)) + (not (string-match "$\\'" rex0)) (concat "\\`" rex0 (if slash "/" "") "\\'"))) (suffix-re (and do-full slash (not (and (eq ido-cur-item 'buffer) ido-buffer-disable-smart-matches)) (not ido-enable-regexp) - (not (string-match "\$\\'" rex0)) + (not (string-match "$\\'" rex0)) (concat rex0 "/\\'"))) (prefix-re (and full-re (not ido-enable-prefix) (concat "\\`" rexq))) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 013fc5ae393..c5efb338152 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1910,7 +1910,7 @@ overwritten. This confirmation can be turned off using (message "No image at point") (let ((file (image-dired-original-file-name)) command) - (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file)) + (if (not (string-match "\\.[jJ][pP[eE]?[gG]$" file)) (error "Only JPEG images can be rotated!")) (setq command (format-spec image-dired-cmd-rotate-original-options @@ -1950,7 +1950,7 @@ for traceability. The format of the returned file name is YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from `image-dired-copy-with-exif-file-name'." (let (data no-exif-data-found) - (if (not (string-match "\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) + (if (not (string-match "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) (progn (setq no-exif-data-found t) (setq data @@ -2572,7 +2572,7 @@ tags to their respective image file. Internal function used by ;; (let ((fattribs (file-attributes f))) ;; ;; Get last access time and file size ;; `(,(nth 4 fattribs) ,(nth 7 fattribs) ,f))) -;; (directory-files (image-dired-dir) t ".+\.thumb\..+$")) +;; (directory-files (image-dired-dir) t ".+\\.thumb\\..+$")) ;; ;; Sort function. Compare time between two files. ;; (lambda (l1 l2) ;; (time-less-p (car l1) (car l2))))) diff --git a/lisp/image.el b/lisp/image.el index 0c62088ca5d..d557e39aac2 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -34,7 +34,7 @@ (defconst image-type-header-regexps `(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm) - ("\\`P[1-6]\\\(?:\ + ("\\`P[1-6]\\(?:\ \\(?:\\(?:#[^\r\n]*[\r\n]\\)?[[:space:]]\\)+\ \\(?:\\(?:#[^\r\n]*[\r\n]\\)?[0-9]\\)+\ \\)\\{2\\}" . pbm) diff --git a/lisp/info-look.el b/lisp/info-look.el index 6168a0c2660..70c30c3e7a6 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -142,7 +142,7 @@ OTHER-MODES is a list of cross references to other help modes.") "Add or update a help specification. Function arguments are specified as keyword/argument pairs: - \(KEYWORD . ARGUMENT) + (KEYWORD . ARGUMENT) KEYWORD is either `:topic', `:mode', `:regexp', `:ignore-case', `:doc-spec', `:parse-rule', or `:other-modes'. diff --git a/lisp/info.el b/lisp/info.el index a5a2c559e0d..bd12d568291 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3838,7 +3838,7 @@ START is a regular expression which will match the beginning of the tokens delimited string. ALL is a regular expression with a single parenthesized subpattern which is the token to be - returned. E.g. `{\(.*\)}' would return any string + returned. E.g. `{(.*)}' would return any string enclosed in braces around POS. ERRORSTRING optional fourth argument, controls action on no match: nil: return nil @@ -4720,28 +4720,28 @@ first line or header line, and for breadcrumb links.") ;; Fontify titles (goto-char (point-min)) (when (and font-lock-mode not-fontified-p) - (while (and (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$" - nil t) - ;; Only consider it as an underlined title if the ASCII - ;; underline has the same size as the text. A typical - ;; counter example is when a continuation "..." is alone - ;; on a line. - (= (string-width (match-string 1)) - (string-width (match-string 2)))) - (let* ((c (preceding-char)) - (face - (cond ((= c ?*) 'info-title-1) - ((= c ?=) 'info-title-2) - ((= c ?-) 'info-title-3) - (t 'info-title-4)))) - (put-text-property (match-beginning 1) (match-end 1) - 'font-lock-face face)) - ;; This is a serious problem for trying to handle multiple - ;; frame types at once. We want this text to be invisible - ;; on frames that can display the font above. - (when (memq (framep (selected-frame)) '(x pc w32 ns)) - (add-text-properties (1- (match-beginning 2)) (match-end 2) - '(invisible t front-sticky nil rear-nonsticky t))))) + (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$" + nil t) + ;; Only consider it as an underlined title if the ASCII + ;; underline has the same size as the text. A typical + ;; counter example is when a continuation "..." is alone + ;; on a line. + (when (= (string-width (match-string 1)) + (string-width (match-string 2))) + (let* ((c (preceding-char)) + (face + (cond ((= c ?*) 'info-title-1) + ((= c ?=) 'info-title-2) + ((= c ?-) 'info-title-3) + (t 'info-title-4)))) + (put-text-property (match-beginning 1) (match-end 1) + 'font-lock-face face)) + ;; This is a serious problem for trying to handle multiple + ;; frame types at once. We want this text to be invisible + ;; on frames that can display the font above. + (when (memq (framep (selected-frame)) '(x pc w32 ns)) + (add-text-properties (1- (match-beginning 2)) (match-end 2) + '(invisible t front-sticky nil rear-nonsticky t)))))) ;; Fontify cross references (goto-char (point-min)) diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 31f841d7b56..92e55220375 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el @@ -71,6 +71,7 @@ (defun isearch-with-keyboard-coding () (interactive) + ;; FIXME: What does this after-change-functions binding do here? (let ((after-change-functions '(isearch-exit-recursive-edit))) (recursive-edit)) (exit-minibuffer)) diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el index 61db03d9b76..d662699c17c 100644 --- a/lisp/international/iso-cvt.el +++ b/lisp/international/iso-cvt.el @@ -46,7 +46,7 @@ (defvar iso-spanish-trans-tab '( ("~n" "ñ") - ("\([a-zA-Z]\)#" "\\1ñ") + ("([a-zA-Z])#" "\\1ñ") ("~N" "Ñ") ("\\([-a-zA-Z\"`]\\)\"u" "\\1ü") ("\\([-a-zA-Z\"`]\\)\"U" "\\1Ü") diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index d598814a63a..29036ff796b 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -2271,7 +2271,7 @@ isn't changed if the display can render Unicode characters." (?\∨ "OR") (?\∩ "(U") (?\∪ ")U") - (?\∫ "\int ") + (?\∫ "\\int ") (?\∬ "DI") (?\∮ "Io") (?\∴ ".:") diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 4fd4b906b05..0904ff93e23 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -159,7 +159,7 @@ ;; very frequently while editing multilingual text. Now we can use ;; only two such keys: "\C-\\" and "\C-^", but the latter is not ;; convenient because it requires shifting on most keyboards. An -;; alternative is "\C-\]" which is now bound to `abort-recursive-edit' +;; alternative is "\C-]" which is now bound to `abort-recursive-edit' ;; but it won't be used that frequently. (define-key global-map "\C-\\" 'toggle-input-method) @@ -397,7 +397,7 @@ A coding system that requires automatic detection of text+encoding To prefer, for instance, utf-8, say the following: - \(prefer-coding-system \\='utf-8)" + (prefer-coding-system \\='utf-8)" (interactive "zPrefer coding system: ") (if (not (and coding-system (coding-system-p coding-system))) (error "Invalid coding system `%s'" coding-system)) @@ -1272,7 +1272,7 @@ This file contains a list of libraries of Emacs input methods (LEIM) in the format of Lisp expression for registering each input method. Emacs loads this file at startup time.") -(defconst leim-list-header (format +(defconst leim-list-header (format-message ";;; %s -- list of LEIM (Library of Emacs Input Method) -*-coding: utf-8;-*- ;; ;; This file is automatically generated. @@ -1286,9 +1286,9 @@ Emacs loads this file at startup time.") ;; INPUT-METHOD LANGUAGE-NAME ACTIVATE-FUNC ;; TITLE DESCRIPTION ;; ARG ...) -;; See the function ‘register-input-method’ for the meanings of the arguments. +;; See the function `register-input-method' for the meanings of the arguments. ;; -;; If this directory is included in ‘load-path’, Emacs automatically +;; If this directory is included in `load-path', Emacs automatically ;; loads this file at startup time. " @@ -2413,12 +2413,12 @@ See `set-language-info-alist' for use in programs." )) "Alist of locale regexps vs the corresponding languages and coding systems. Each element has this form: - \(LOCALE-REGEXP LANG-ENV CODING-SYSTEM) + (LOCALE-REGEXP LANG-ENV CODING-SYSTEM) The first element whose LOCALE-REGEXP matches the start of a downcased locale specifies the LANG-ENV \(language environment) and CODING-SYSTEM corresponding to that locale. If there is no appropriate language environment, the element may have this form: - \(LOCALE-REGEXP . LANG-ENV) + (LOCALE-REGEXP . LANG-ENV) In this case, LANG-ENV is one of generic language environments for an specific encoding such as \"Latin-1\" and \"UTF-8\".") diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index f3aa70fd66c..b575c2b7db3 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -273,43 +273,48 @@ per-character basis, this may not be accurate." ((not enable-multibyte-characters) ;; Maybe there's a font for it, but we can't put it in the buffer. nil) - ((display-multi-font-p) - ;; On a window system, a character is displayable if we have - ;; a font for that character in the default face of the - ;; currently selected frame. - (car (internal-char-font nil char))) (t - ;; On a terminal, a character is displayable if the coding - ;; system for the terminal can encode it. - (let ((coding (terminal-coding-system))) - (when coding - (let ((cs-list (coding-system-get coding :charset-list))) - (cond - ((listp cs-list) - (catch 'tag - (mapc #'(lambda (charset) - (if (encode-char char charset) - (throw 'tag charset))) - cs-list) - nil)) - ((eq cs-list 'iso-2022) - (catch 'tag2 - (mapc #'(lambda (charset) - (if (and (plist-get (charset-plist charset) - :iso-final-char) - (encode-char char charset)) - (throw 'tag2 charset))) - charset-list) - nil)) - ((eq cs-list 'emacs-mule) - (catch 'tag3 - (mapc #'(lambda (charset) - (if (and (plist-get (charset-plist charset) - :emacs-mule-id) - (encode-char char charset)) - (throw 'tag3 charset))) - charset-list) - nil))))))))) + (let ((font-glyph (internal-char-font nil char))) + (if font-glyph + (if (consp font-glyph) + ;; On a window system, a character is displayable + ;; if a font for that character is in the default + ;; face of the currently selected frame. + (car font-glyph) + ;; On a text terminal supporting glyph codes, CHAR is + ;; displayable if its glyph code is nonnegative. + (<= 0 font-glyph)) + ;; On a text terminal without glyph codes, CHAR is displayable + ;; if the coding system for the terminal can encode it. + (let ((coding (terminal-coding-system))) + (when coding + (let ((cs-list (coding-system-get coding :charset-list))) + (cond + ((listp cs-list) + (catch 'tag + (mapc #'(lambda (charset) + (if (encode-char char charset) + (throw 'tag charset))) + cs-list) + nil)) + ((eq cs-list 'iso-2022) + (catch 'tag2 + (mapc #'(lambda (charset) + (if (and (plist-get (charset-plist charset) + :iso-final-char) + (encode-char char charset)) + (throw 'tag2 charset))) + charset-list) + nil)) + ((eq cs-list 'emacs-mule) + (catch 'tag3 + (mapc #'(lambda (charset) + (if (and (plist-get (charset-plist charset) + :emacs-mule-id) + (encode-char char charset)) + (throw 'tag3 charset))) + charset-list) + nil))))))))))) (defun filepos-to-bufferpos--dos (byte f) (let ((eol-offset 0) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 946f793731b..af4c6e93e0b 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -665,8 +665,8 @@ without any conversions. VALUE is the EOL (end-of-line) format of the coding system. It must be one of `unix', `dos', `mac'. The symbol `unix' means Unix-like EOL -\(i.e. a single LF character), `dos' means DOS-like EOL \(i.e. a sequence -of CR followed by LF), and `mac' means Mac-like EOL \(i.e. a single CR). +\(i.e., a single LF character), `dos' means DOS-like EOL \(i.e., a sequence +of CR followed by LF), and `mac' means Mac-like EOL \(i.e., a single CR). If omitted, Emacs detects the EOL format automatically when decoding. `:charset-list' (required if `:coding-type' is `charset' or `shift-jis') diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 01cbe1e5222..18ebf91d505 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1997-1998, 2001-2015 Free Software Foundation, Inc. -;; Author: W{\l}odek Bzyl +;; Author: Włodek Bzyl ;; Ryszard Kubiak ;; Maintainer: Ryszard Kubiak <rysiek@ipipan.gda.pl> ;; Keywords: i18n diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 6a15bc41e50..f22b30e613b 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -86,7 +86,7 @@ '(("chinese-4corner" "$(0(?-F(B") ("chinese-array30" "$(0#R#O(B") ("chinese-ccdospy" "$AKuF4(B" - "Pinyin base input method for Chinese charset GB2312 \(`chinese-gb2312'). + "Pinyin base input method for Chinese charset GB2312 (`chinese-gb2312'). Pinyin is the standard Roman transliteration method for Chinese. For the detail of Pinyin system, see the documentation of the input diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 5f9196da645..4e8fa7b15cb 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -382,14 +382,6 @@ Defaults to the whole buffer. END can be out of bounds." (save-excursion (unless start (setq start (point-min))) (setq end (if end (min end (point-max)) (point-max))) - ;; This did bind `font-lock-beginning-of-syntax-function' to - ;; nil at some point, for an unknown reason. Don't do this; it - ;; can make highlighting slow due to expensive calls to - ;; `parse-partial-sexp' in function - ;; `font-lock-fontify-syntactically-region'. Example: paging - ;; from the end of a buffer to its start, can do repeated - ;; `parse-partial-sexp' starting from `point-min', which can - ;; take a long time in a large buffer. (let ((orig-start start) next) (save-match-data ;; Fontify chunks beginning at START. The end of a @@ -583,11 +575,13 @@ non-nil in a repeated invocation of this function." 'fontified nil)) (setq pos (next-single-property-change pos 'fontified))))))))) - (setq jit-lock-defer-buffers nil) ;; Force fontification of the visible parts. - (let ((jit-lock-defer-timer nil)) + (let ((buffers jit-lock-defer-buffers) + (jit-lock-defer-timer nil)) + (setq jit-lock-defer-buffers nil) ;; (message "Jit-Defer Now") - (sit-for 0) + (unless (redisplay) ;FIXME: Should we `force'? + (setq jit-lock-defer-buffers buffers)) ;; (message "Jit-Defer Done") ))) diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el index 2871ec8f974..bdd8853d4dc 100644 --- a/lisp/language/japan-util.el +++ b/lisp/language/japan-util.el @@ -102,7 +102,7 @@ HANKAKU-KATAKANA belongs to `japanese-jisx0201-kana'.") (?$B!-(B ?') (?$B!.(B ?`) (?$B!0(B ?^) (?$B!2(B ?_) (?$B!<(B ?- ?(I0(B) (?$B!=(B ?-) (?$B!>(B ?-) (?$B!?(B ?/) (?$B!@(B ?\\) (?$B!A(B ?~) (?$B!C(B ?|) (?$B!F(B ?`) (?$B!G(B ?') (?$B!H(B ?\") (?$B!I(B ?\") (?\$B!J(B ?\() (?\$B!K(B ?\)) (?\$B!N(B ?[) (?\$B!O(B ?]) (?\$B!P(B ?{) (?\$B!Q(B ?}) - (?$B!R(B ?<) (?$B!S(B ?>) (?\$B!V(B nil ?\(I"(B) (?\$B!W(B nil ?\(I#(B) + (?$B!R(B ?<) (?$B!S(B ?>) (?\$B!V(B nil ?\(I"(B) (?\$B!W(B nil ?\(I#(B) (?$B!\(B ?+) (?$B!](B ?-) (?$B!a(B ?=) (?$B!c(B ?<) (?$B!d(B ?>) (?$B!l(B ?') (?$B!m(B ?\") (?$B!o(B ?\\) (?$B!p(B ?$) (?$B!s(B ?%) (?$B!t(B ?#) (?$B!u(B ?&) (?$B!v(B ?*) (?$B!w(B ?@) @@ -175,9 +175,9 @@ belongs to `japanese-jisx0208', ASCII belongs to `ascii'.") The argument may be a character or string. The result has the same type. The argument object is not altered--the value is a copy. Optional argument HANKAKU t means to convert to `hankaku' Katakana - \(`japanese-jisx0201-kana'), in which case return value - may be a string even if OBJ is a character if two Katakanas are - necessary to represent OBJ." +\(`japanese-jisx0201-kana'), in which case return value +may be a string even if OBJ is a character if two Katakanas are +necessary to represent OBJ." (if (stringp obj) (japanese-string-conversion obj 'japanese-katakana-region hankaku) (or (get-char-code-property obj (if hankaku 'jisx0201 'katakana)) diff --git a/lisp/leim/quail/cyrillic.el b/lisp/leim/quail/cyrillic.el index 7c443857d44..5d11e45b3f6 100644 --- a/lisp/leim/quail/cyrillic.el +++ b/lisp/leim/quail/cyrillic.el @@ -1245,7 +1245,7 @@ This phonetic layout replaces all the Latin letters with Bulgarian \(Cyrillic) letters based on similarities in their pronunciation or look. Note that, since the letters `щ', `ь', `ю' and `я' are attached to the -`]', `\', `\\=`' and `[' keys respectively, Caps Lock does not affect them." +`]', `\\', `\\=`' and `[' keys respectively, Caps Lock does not affect them." nil t t t t nil nil nil nil nil t) ;; Ю 1! 2@ 3№ 4$ 5% 6€ 7§ 8* 9( 0) -– =+ ьѝ diff --git a/lisp/leim/quail/japanese.el b/lisp/leim/quail/japanese.el index 831725f8065..7741697286b 100644 --- a/lisp/leim/quail/japanese.el +++ b/lisp/leim/quail/japanese.el @@ -231,7 +231,7 @@ ("zk" "$B",(B") ("zl" "$B"*(B") ("z;" "$B!+(B") ("z:" "$B!,(B") - ("z\'" "$B!F(B") ("z\"" "$B!H(B") + ("z'" "$B!F(B") ("z\"" "$B!H(B") ("zx" [":-"]) ("zX" [":-)"]) ("zc" "$B!;(B") ("zC" "$B!n(B") diff --git a/lisp/leim/quail/latin-alt.el b/lisp/leim/quail/latin-alt.el index 935a471dce8..a0697c48f7d 100644 --- a/lisp/leim/quail/latin-alt.el +++ b/lisp/leim/quail/latin-alt.el @@ -1321,7 +1321,7 @@ Doubling the postfix separates the letter and postfix: e.g. a\\='\\=' -> a\\=' ("K" ?Ķ) ("l" ?ļ) ("L" ?Ļ) - ("\'" ?“) + ("'" ?“) ("\"" ?„) ("z" ?ž) ("Z" ?Ž) diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el index 3c84ba8348a..c63a758f198 100644 --- a/lisp/leim/quail/latin-ltx.el +++ b/lisp/leim/quail/latin-ltx.el @@ -664,7 +664,7 @@ system, including many technical ones. Examples: ;; Probably not useful enough: ;; ("\\Telefon" ?☎) ; there are other possibilities ;; ("\\Radioactivity" ?☢) - ;; ("\Biohazard" ?☣) + ;; ("\\Biohazard" ?☣) ;; ("\\Male" ?♂) ;; ("\\Female" ?♀) ;; ("\\Lightning" ?☇) diff --git a/lisp/leim/quail/thai.el b/lisp/leim/quail/thai.el index 7d0949ee529..02f8b78d76b 100644 --- a/lisp/leim/quail/thai.el +++ b/lisp/leim/quail/thai.el @@ -76,7 +76,7 @@ The difference from the ordinal Thai keyboard: "๑" "ฤ" "ฺ" "ฉ" "ฏ" "ฎ" "โ" "ฌ" ; @ .. G "็" "ณ" "๋" "ษ" "ศ" "?" "์" "ฯ" ; H .. O "ญ" "๐" "ฑ" "ฆ" "ธ" "๊" "ฮ" "\"" ; P .. W - "\)" "ํ" "\(" "บ" "ฃ" "ล" "ู" "๘" ; X .. _ + ")" "ํ" "(" "บ" "ฃ" "ล" "ู" "๘" ; X .. _ "_" "ฟ" "ิ" "แ" "ก" "ำ" "ด" "เ" ; ` .. g "้" "ร" "่" "า" "ส" "ท" "ื" "น" ; h .. o "ย" "ๆ" "พ" "ห" "ะ" "ี" "อ" "ไ" ; p .. w diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 52fd04736f6..4ea1bcb9f50 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -123,7 +123,6 @@ from a file." delete-frame-functions disabled-command-function fill-nobreak-predicate find-directory-functions find-file-not-found-functions - font-lock-beginning-of-syntax-function font-lock-fontify-buffer-function font-lock-fontify-region-function font-lock-mark-block-function diff --git a/lisp/lpr.el b/lisp/lpr.el index 24c325cb263..11cc8f86cfd 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -49,7 +49,7 @@ (defcustom printer-name (and (eq system-type 'ms-dos) "PRN") "The name of a local printer to which data is sent for printing. -\(Note that PostScript files are sent to `ps-printer-name', which see.\) +\(Note that PostScript files are sent to `ps-printer-name', which see.) On Unix-like systems, a string value should be a name understood by lpr's -P option; otherwise the value should be nil. diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 368e2ab8982..aec93db3fa6 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -438,7 +438,7 @@ shuttled robotically onward." If a positive number, it's a timeout before sending. If a negative number, it's a timeout before not sending. This will not work if your version of Emacs doesn't include the function `y-or-n-p-with-timeout' -\(e.g., some versions of XEmacs\)." +\(e.g., some versions of XEmacs)." :version "24.1" :group 'feedmail-misc :type '(choice (const nil) integer) @@ -449,7 +449,7 @@ version of Emacs doesn't include the function `y-or-n-p-with-timeout' "If non-nil remove Bcc: lines from the message headers. In any case, the Bcc: lines do participate in the composed address list. You may want to leave them in if you're using sendmail -\(see `feedmail-buffer-eating-function'\)." +\(see `feedmail-buffer-eating-function')." :group 'feedmail-headers :type 'boolean ) @@ -459,7 +459,7 @@ list. You may want to leave them in if you're using sendmail "If non-nil remove Resent-Bcc: lines from the message headers. In any case, the Resent-Bcc: lines do participate in the composed address list. You may want to leave them in if you're using sendmail -\(see `feedmail-buffer-eating-function'\)." +\(see `feedmail-buffer-eating-function')." :group 'feedmail-headers :type 'boolean ) @@ -645,7 +645,7 @@ is not an option for many users. As this is the default behavior of most sendmail installations, one can mostly only wish it were otherwise. If feedmail believes the sendmail program will sell you out this way, it won't use the \"-f\" option when calling sendmail. If it doesn't think sendmail will sell you out, -it will use the \"-f\" \(since it is a handy feature\). You control what +it will use the \"-f\" \(since it is a handy feature). You control what feedmail thinks with this variable. The default is nil, meaning that feedmail will believe that sendmail will sell you out." :version "24.1" @@ -861,7 +861,7 @@ as well." "User-supplied specification for a crude form of mailmerge capability. When spraying is enabled, feedmail composes a list of envelope addresses. In turn, `feedmail-spray-this-address' is temporarily set to each address -\(stripped of any comments and angle brackets\) and a function is called which +\(stripped of any comments and angle brackets) and a function is called which fiddles message headers according to this variable. See the documentation for `feedmail-fiddle-plex-blurb', for an overview of fiddle-plex data structures. @@ -1313,7 +1313,7 @@ of `buffer-file-name' to nil because that will defeat feedmail's file management features. Instead, arrange for this variable to be set to the value of `buffer-file-name' before setting that to nil. An easy way to do that would be with defadvice on `mail-send' \(undoing the -assignments in a later advice\). +assignments in a later advice). feedmail will pretend that `buffer-file-name', if nil, has the value assigned of `feedmail-queue-buffer-file-name' and carry out its normal @@ -1507,7 +1507,7 @@ The default action is an anonymous function which gets rid of the file from the queue directory. With a non-nil second argument, a brief message is give for each file deleted. You could replace this function, for example, to archive all of your sent messages someplace -\(though there are better ways to get that particular result\)." +\(though there are better ways to get that particular result)." :group 'feedmail-queue :type 'function ) @@ -1715,7 +1715,7 @@ for ACTION (default is `supplement'): VAL-LIKE is not used. Else, if VAL-LIKE is a function, it is called with two arguments: NAME and the aggregate like values. Else, if VAL-LIKE is a string, it is - used as a format string where a single \%s will be + used as a format string where a single %s will be replaced by the aggregate values of like fields. VAL-PRE, the results of using VAL-LIKE, and VAL-POST @@ -1745,7 +1745,8 @@ applied to a file after you've just read it from disk: for example, a feedmail FQM message file from a queue. You could use something like this: -\(setq auto-mode-alist \(cons \\='\(\"\\\\.fqm$\" . feedmail-vm-mail-mode\) auto-mode-alist\)\) +\(setq auto-mode-alist + (cons \\='(\"\\\\.fqm$\" . feedmail-vm-mail-mode) auto-mode-alist)) " (feedmail-say-debug ">in-> feedmail-vm-mail-mode") (let ((the-buf (current-buffer))) @@ -1894,26 +1895,26 @@ You're dispatching a message and feedmail queuing is enabled. Typing ? again will normally scroll this help buffer. Choices: - q QUEUE for later sending \(via feedmail-run-the-queue\) + q QUEUE for later sending (via feedmail-run-the-queue) Q QUEUE! like \"q\", but always make a new file - i IMMEDIATELY send this \(but not the other queued messages\) + i IMMEDIATELY send this (but not the other queued messages) I IMMEDIATELY! like \"i\", but skip following confirmation prompt d DRAFT queue in the draft directory D DRAFT! like \"d\", but always make a new file - e EDIT return to the message edit buffer \(don't send or queue\) - * SPRAY toggle spray mode \(individual message transmissions\) - > SCROLL UP scroll message up \(toward end of message\) - < SCROLL DOWN scroll message down \(toward beginning of message\) + e EDIT return to the message edit buffer (don't send or queue) + * SPRAY toggle spray mode (individual message transmissions) + > SCROLL UP scroll message up (toward end of message) + < SCROLL DOWN scroll message down (toward beginning of message) ? HELP show or scroll this help buffer Synonyms: - s SEND immediately \(same as \"i\"\) - S SEND! immediately \(same as \"I\"\) - r ROUGH draft \(same as \"d\"\) - R ROUGH! draft \(same as \"D\"\) - n NOPE didn't mean it \(same as \"e\"\) - y YUP do the default behavior \(same as \"C-m\"\) - SPC SCROLL UP \(same as \">\"\) + s SEND immediately (same as \"i\") + S SEND! immediately (same as \"I\") + r ROUGH draft (same as \"d\") + R ROUGH! draft (same as \"D\") + n NOPE didn't mean it (same as \"e\") + y YUP do the default behavior (same as \"C-m\") + SPC SCROLL UP (same as \">\") The user-configurable default is currently \"")) (princ d-string) diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 5164ea1bfed..a7057ca21c8 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -329,7 +329,7 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." ;; Matches an embedded or leading nickname that should be removed. ;; (defconst mail-extr-nickname-pattern ;; (purecopy -;; (format "\\([ .]\\|\\`\\)[\"'`\[\(]\\([ .%s]+\\)[\]\"'\)] " +;; (format "\\([ .]\\|\\`\\)[\"'`[(]\\([ .%s]+\\)[]\"')] " ;; mail-extr-all-letters))) ;; Matches the occurrence of a generational name suffix, and the last @@ -369,7 +369,7 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." ;; Matches a variety of trailing comments not including comma-delimited ;; comments. (defconst mail-extr-trailing-comment-start-pattern - (purecopy " [-{]\\|--\\|[+@#></\;]")) + (purecopy " [-{]\\|--\\|[+@#></;]")) ;; Matches a name (not an initial). ;; This doesn't force a word boundary at the end because sometimes a @@ -456,7 +456,7 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." ;; mode from GB back to ASCII. (Note that the escape-from-GB code '~}' ;; ($7E7D) is outside the defined GB range.) (defconst mail-extr-hz-embedded-gb-encoded-chinese-pattern - (purecopy "~{\\([^~].\\|~[^\}]\\)+~}")) + (purecopy "~{\\([^~].\\|~[^}]\\)+~}")) ;; The leading optional lowercase letters are for a bastardized version of ;; the encoding, as is the optional nature of the final slash. @@ -543,8 +543,8 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." (?\t " ") (?\r " ") (?\n " ") - (?\( "\(\)") - (?\) "\)\(") + (?\( "()") + (?\) ")(") (?\\ "\\")) (mail-extr-address-domain-literal-syntax-table (?\000 ?\377 "w") @@ -553,8 +553,8 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." (?\t " ") (?\r " ") (?\n " ") - (?\[ "\(\]") ;?????? - (?\] "\)\[") ;?????? + (?\[ "(]") ;?????? + (?\] ")[") ;?????? (?\\ "\\")) (mail-extr-address-text-comment-syntax-table (?\000 ?\377 "w") @@ -563,16 +563,16 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." (?\t " ") (?\r " ") (?\n " ") - (?\( "\(\)") - (?\) "\)\(") - (?\[ "\(\]") - (?\] "\)\[") - (?\{ "\(\}") - (?\} "\)\{") + (?\( "()") + (?\) ")(") + (?\[ "(]") + (?\] ")[") + (?\{ "(}") + (?\} "){") (?\\ "\\") (?\" "\"") - ;; (?\' "\)\`") - ;; (?\` "\(\'") + ;; (?\' ")`") + ;; (?\` "('") ) (mail-extr-address-text-syntax-table (?\000 ?\177 ".") diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el index 31da6ee2eb3..5bc1d3129ea 100644 --- a/lisp/mail/mailclient.el +++ b/lisp/mail/mailclient.el @@ -62,10 +62,9 @@ supported. Defaults to non-nil on Windows, nil otherwise." (mapcar (lambda (char) (cond - ((eq char ?\x20) "%20") ;; space ((eq char ?\n) "%0D%0A") ;; newline - ((string-match "[-a-zA-Z0-9_:/.@]" (char-to-string char)) - (char-to-string char)) ;; printable + ((string-match "[-a-zA-Z0-9._~]" (char-to-string char)) + (char-to-string char)) ;; unreserved as per RFC 6068 (t ;; everything else (format "%%%02x" char)))) ;; escape ;; Convert string to list of chars @@ -96,7 +95,7 @@ supported. Defaults to non-nil on Windows, nil otherwise." recp))) (setq first nil)) (split-string - (mail-strip-quoted-names field) "\, *")) + (mail-strip-quoted-names field) ", *")) result))))) (declare-function clipboard-kill-ring-save "menu-bar.el" @@ -125,6 +124,13 @@ The mail client is taken to be the handler of mailto URLs." (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t) + (mime-charset-pattern + (concat + "^content-type:[ \t]*text/plain;" + "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" + "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?")) + coding-system + character-coding ;; Use the external browser function to send the ;; message. (browse-url-mailto-function nil)) @@ -135,6 +141,15 @@ The mail client is taken to be the handler of mailto URLs." (concat (save-excursion (narrow-to-region (point-min) delimline) + (goto-char (point-min)) + (setq coding-system + (if (re-search-forward mime-charset-pattern nil t) + (coding-system-from-name (match-string 1)) + 'undecided)) + (setq character-coding + (mail-fetch-field "content-transfer-encoding")) + (when character-coding + (setq character-coding (downcase character-coding))) (concat "mailto:" ;; some of the headers according to RFC822 @@ -160,18 +175,31 @@ The mail client is taken to be the handler of mailto URLs." (mailclient-encode-string-as-url subj)) "")))) ;; body - (concat - (mailclient-url-delim) "body=" - (mailclient-encode-string-as-url - (if mailclient-place-body-on-clipboard-flag - (progn - (clipboard-kill-ring-save - (+ 1 delimline) (point-max)) - (concat - "*** E-Mail body has been placed on clipboard, " - "please paste it here! ***")) - ;; else - (buffer-substring (+ 1 delimline) (point-max)))))))))))) + (mailclient-url-delim) "body=" + (progn + (delete-region (point-min) delimline) + (unless (null character-coding) + ;; mailto: and clipboard need UTF-8 and cannot deal with + ;; Content-Transfer-Encoding or Content-Type. + ;; FIXME: There is code duplication here with rmail.el. + (set-buffer-multibyte nil) + (cond + ((string= character-coding "base64") + (base64-decode-region (point-min) (point-max))) + ((string= character-coding "quoted-printable") + (mail-unquote-printable-region (point-min) (point-max) + nil nil t)) + (t (error "unsupported Content-Transfer-Encoding: %s" + character-coding))) + (decode-coding-region (point-min) (point-max) coding-system)) + (mailclient-encode-string-as-url + (if mailclient-place-body-on-clipboard-flag + (progn + (clipboard-kill-ring-save (point-min) (point-max)) + (concat + "*** E-Mail body has been placed on clipboard, " + "please paste it here! ***")) + (buffer-string))))))))))) (provide 'mailclient) diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index ddd5414de76..f22222ad552 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -309,7 +309,7 @@ Buffer is not displayed if SHOW is non-nil." ;; to file name. ;(defun get-folder-from-spool-safe (name) ; "Return the folder name corresponding to the spool file NAME." -; (if (string-match "^\\(.*\\)\.spool$" name) +; (if (string-match "^\\(.*\\)\\.spool$" name) ; (substring name (match-beginning 1) (match-end 1)) ; (error "Could not extract folder name from spool name %s" name))) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 67b04b56968..8e38564b14a 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -316,7 +316,7 @@ Currently known variants are 'emacs and 'mailutils." If non-nil, this variable is used to identify the correspondent when receiving new mail. If it matches the address of the sender, the recipient is taken as correspondent of a mail. -If nil \(default value\), your `user-login-name' and `user-mail-address' +If nil \(default value), your `user-login-name' and `user-mail-address' are used to exclude yourself as correspondent. Usually you don't have to set this variable, except if you collect mails @@ -4778,7 +4778,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads nil "rmailmm" "rmailmm.el" "e5b89eed8afb278cc8881f2208382c7c") +;;;### (autoloads nil "rmailmm" "rmailmm.el" "36f518e036612a33eb436cb267fd39c7") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ @@ -4922,7 +4922,7 @@ SENDERS is a regular expression. ;;;*** -;;;### (autoloads nil "undigest" "undigest.el" "912d4d3bf762991df5d4d02f42358025") +;;;### (autoloads nil "undigest" "undigest.el" "c0ddfad4fe34ef9c1e790c2cc72b571d") ;;; Generated autoloads from undigest.el (autoload 'undigestify-rmail-message "undigest" "\ diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 3dd57b9bab7..16f62154fbc 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -172,7 +172,7 @@ The value is usually nil, and bound to non-nil while inserting MIME entities.") (defvar rmail-mime-searching nil - "Bound to T inside `rmail-search-mime-message' to suppress expensive + "Bound to T inside `rmail-search-mime-message' to suppress expensive operations such as HTML decoding") ;;; MIME-entity object @@ -190,7 +190,7 @@ A MIME-entity is a vector of 10 elements: TYPE and DISPOSITION correspond to MIME headers Content-Type and Content-Disposition respectively, and have this format: - \(VALUE (ATTRIBUTE . VALUE) (ATTRIBUTE . VALUE) ...) + (VALUE (ATTRIBUTE . VALUE) (ATTRIBUTE . VALUE) ...) Each VALUE is a string and each ATTRIBUTE is a string. @@ -202,7 +202,7 @@ Content-Type: multipart/mixed; The corresponding TYPE argument must be: \(\"multipart/mixed\" - \(\"boundary\" . \"----=_NextPart_000_0104_01C617E4.BDEC4C40\")) + (\"boundary\" . \"----=_NextPart_000_0104_01C617E4.BDEC4C40\")) TRANSFER-ENCODING corresponds to MIME header Content-Transfer-Encoding, and is a lower-case string. @@ -1119,11 +1119,11 @@ are the values of the respective parsed headers. The latter should be lower-case. The parsed headers for CONTENT-TYPE and CONTENT-DISPOSITION have the form - \(VALUE . ALIST) + (VALUE . ALIST) In other words: - \(VALUE (ATTRIBUTE . VALUE) (ATTRIBUTE . VALUE) ...) + (VALUE (ATTRIBUTE . VALUE) (ATTRIBUTE . VALUE) ...) VALUE is a string and ATTRIBUTE is a symbol. @@ -1135,7 +1135,7 @@ Content-Type: multipart/mixed; The parsed header value: \(\"multipart/mixed\" - \(\"boundary\" . \"----=_NextPart_000_0104_01C617E4.BDEC4C40\"))" + (\"boundary\" . \"----=_NextPart_000_0104_01C617E4.BDEC4C40\"))" ;; Handle the content transfer encodings we know. Unknown transfer ;; encodings will be passed on to the various handlers. (cond ((string= content-transfer-encoding "base64") diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el index 6dd26062285..9fbbd94b083 100644 --- a/lisp/mail/undigest.el +++ b/lisp/mail/undigest.el @@ -79,7 +79,7 @@ See rmail-digest-methods." (rmail-digest-rfc1153 "^-\\{70\\}\n\n" "^\n-\\{30\\}\n\n" - "^\n-\\{30\\}\n\nEnd of .* Digest.*\n\\*\\{15,\\}\n+\'")) + "^\n-\\{30\\}\n\nEnd of .* Digest.*\n\\*\\{15,\\}\n+\\'")) (defun rmail-digest-parse-rfc1153sloppy () "Parse using the method defined in RFC 1153, allowing for some sloppiness. diff --git a/lisp/man.el b/lisp/man.el index 23b2110a4ec..fbfa6f0c7f7 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -311,7 +311,7 @@ This regular expression should start with a `^' character.") "Regular expression describing a reference to another manpage.") (defvar Man-apropos-regexp - (concat "\\\[\\(" Man-name-regexp "\\)\\\][ \t]*(\\(" Man-section-regexp "\\))") + (concat "\\[\\(" Man-name-regexp "\\)\\][ \t]*(\\(" Man-section-regexp "\\))") "Regular expression describing a reference to manpages in \"man -k output\".") (defvar Man-synopsis-regexp "SYNOPSIS" diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index de0038a306a..04e9fef59eb 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -417,7 +417,7 @@ string is converted to lower case." (defun mh-alias-insert-file (&optional alias) "Return filename which should be used to add ALIAS. -The value of the option `mh-alias-insert-file' is used if non-nil\; +The value of the option `mh-alias-insert-file' is used if non-nil; otherwise the value of the \"Aliasfile:\" profile component is used. If the alias already exists, try to return the name of the file that contains it." diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 700d22c3862..129e6857a4c 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -269,7 +269,7 @@ RETURN-ACTION and any additional arguments are IGNORED." When you are all through editing a message, you send it with this command. You can give a prefix argument ARG to monitor the first stage -of the delivery\; this output can be found in a buffer called \"*MH-E +of the delivery; this output can be found in a buffer called \"*MH-E Mail Delivery*\". The hook `mh-before-send-letter-hook' is run at the beginning of @@ -1064,7 +1064,7 @@ The versions of MH-E, Emacs, and MH are shown." (string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?" emacs-version) (match-string 0 emacs-version)) - ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?" + ((string-match "[0-9.]*\\( +([ a-z]+[0-9]+)\\)?" emacs-version) (match-string 0 emacs-version)) (t (format "%s.%s" emacs-major-version diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 7cdf67cc150..96fe7d797c2 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -112,7 +112,7 @@ "\\(defgroup-mh\\)" "\\)\\>" ;; Any whitespace and defined object. - "[ \t'\(]*" + "[ \t'(]*" "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?") (1 font-lock-keyword-face) (7 (cond ((match-beginning 2) font-lock-function-name-face) @@ -1834,7 +1834,7 @@ message without line wrapping." "Default method to use in security tags. This option is used to select between a variety of mail security -mechanisms. The default is \"PGP (MIME)\" if it is supported\; +mechanisms. The default is \"PGP (MIME)\" if it is supported; otherwise, the default is \"None\". Other mechanisms include vanilla \"PGP\" and \"S/MIME\". diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index ae5e2bf1f3b..d21720ebe55 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -755,7 +755,7 @@ You can enter the message NUMBER either before or after typing In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means return nil instead of signaling an error if message does not -exist\; in this case, the cursor is positioned near where the message +exist; in this case, the cursor is positioned near where the message would have been. Non-nil third argument DONT-SHOW means not to show the message." (interactive "NGo to message: ") diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index 62e9b4a357d..7a56427027e 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -553,7 +553,7 @@ one space." (defun mh-letter-confirm-address () "Flash alias expansion. -Addresses are separated by a comma\; when you press the comma, +Addresses are separated by a comma; when you press the comma, this command flashes the alias expansion in the minibuffer if `mh-alias-flash-on-comma' is turned on." (interactive) @@ -932,7 +932,7 @@ Any match found replaces the text from BEGIN to END." (and (stringp file) (file-exists-p file) (or (and (not (mh-have-file-command)) - (not (null (string-match "\.vcf$" file)))) + (not (null (string-match "\\.vcf$" file)))) (string-equal "text/x-vcard" (mh-file-mime-type file)))))) ;;;###mh-autoload diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 60b796b1fdb..a1c0bebd289 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -1715,7 +1715,7 @@ buffer, while END defaults to the end of the buffer." (defun mh-minibuffer-read-type (filename &optional default) "Return the content type associated with the given FILENAME. If the \"file\" command exists and recognizes the given file, -then its value is returned\; otherwise, the user is prompted for +then its value is returned; otherwise, the user is prompted for a type (see `mailcap-mime-types'). Optional argument DEFAULT is returned if a type isn't entered." (mailcap-parse-mimetypes) @@ -1756,21 +1756,21 @@ Returns nil if file command not on system." (kill-buffer tmp-buffer))))))) (defvar mh-file-mime-type-substitutions - '(("application/msword" "\.xls" "application/ms-excel") - ("application/msword" "\.ppt" "application/ms-powerpoint") - ("text/plain" "\.vcf" "text/x-vcard") - ("text/rtf" "\.rtf" "application/rtf") - ("application/x-zip" "\.sxc" "application/vnd.sun.xml.calc") - ("application/x-zip" "\.sxd" "application/vnd.sun.xml.draw") - ("application/x-zip" "\.sxi" "application/vnd.sun.xml.impress") - ("application/x-zip" "\.sxw" "application/vnd.sun.xml.writer") - ("application/x-zip" "\.odg" "application/vnd.oasis.opendocument.graphics") - ("application/x-zip" "\.odi" "application/vnd.oasis.opendocument.image") - ("application/x-zip" "\.odp" + '(("application/msword" "\\.xls" "application/ms-excel") + ("application/msword" "\\.ppt" "application/ms-powerpoint") + ("text/plain" "\\.vcf" "text/x-vcard") + ("text/rtf" "\\.rtf" "application/rtf") + ("application/x-zip" "\\.sxc" "application/vnd.sun.xml.calc") + ("application/x-zip" "\\.sxd" "application/vnd.sun.xml.draw") + ("application/x-zip" "\\.sxi" "application/vnd.sun.xml.impress") + ("application/x-zip" "\\.sxw" "application/vnd.sun.xml.writer") + ("application/x-zip" "\\.odg" "application/vnd.oasis.opendocument.graphics") + ("application/x-zip" "\\.odi" "application/vnd.oasis.opendocument.image") + ("application/x-zip" "\\.odp" "application/vnd.oasis.opendocument.presentation") - ("application/x-zip" "\.ods" + ("application/x-zip" "\\.ods" "application/vnd.oasis.opendocument.spreadsheet") - ("application/x-zip" "\.odt" "application/vnd.oasis.opendocument.text")) + ("application/x-zip" "\\.odt" "application/vnd.oasis.opendocument.text")) "Substitutions to make for Content-Type returned from file command. The first element is the Content-Type returned by the file command. The second element is a regexp matching the file name, usually the diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 7d066b0b8dd..b6eef4ecfc6 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el @@ -1247,7 +1247,7 @@ is used to search." (prog1 (block nil (when (eobp) (return nil)) - (when (search-forward-regexp "^\+" (mh-line-end-position) t) + (when (search-forward-regexp "^\\+" (mh-line-end-position) t) (setq mh-index-pick-folder (buffer-substring-no-properties (mh-line-beginning-position) (mh-line-end-position))) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 643674a4523..37fd1651c5e 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -515,7 +515,7 @@ they will not be returned." ;; folder is specified, ensure it is nil to avoid adding the ;; folder to the folder-list and adding a slash to it. (when folder - (setq folder (mh-replace-regexp-in-string "^\+" "" folder)) + (setq folder (mh-replace-regexp-in-string "^\\+" "" folder)) (setq folder (mh-replace-regexp-in-string "/+$" "" folder)) (if (equal folder "") (setq folder nil))) diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el index b7b7febca26..d48a8b3d152 100644 --- a/lisp/mh-e/mh-xface.el +++ b/lisp/mh-e/mh-xface.el @@ -366,7 +366,7 @@ filenames. In addition, replaces * with %2a. See URL `http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/iitemnamelimits/GetValidCharacters.asp'." (format "%s/%s.png" mh-x-image-cache-directory (mh-replace-regexp-in-string - "\*" "%2a" + "\\*" "%2a" (mh-url-hexify-string (with-temp-buffer (insert url) diff --git a/lisp/mouse.el b/lisp/mouse.el index 6584733a860..d6ce31a7a53 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1111,12 +1111,12 @@ This does not delete the region; it acts like \\[kill-ring-save]." ;; Delete, but make the undo-list entry share with the kill ring. ;; First, delete just one char, so in case buffer is being modified ;; for the first time, the undo list records that fact. - (let (before-change-functions after-change-functions) + (let ((inhibit-modification-hooks t)) (delete-region beg (+ beg (if (> end beg) 1 -1)))) (let ((buffer-undo-list buffer-undo-list)) ;; Undo that deletion--but don't change the undo list! - (let (before-change-functions after-change-functions) + (let ((inhibit-modification-hooks t)) (primitive-undo 1 buffer-undo-list)) ;; Now delete the rest of the specified region, ;; but don't record it. diff --git a/lisp/mpc.el b/lisp/mpc.el index b7c19a967fa..bc7d4733ee8 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -268,7 +268,10 @@ defaults to 6600 and HOST defaults to localhost." (if (string-match "[^[:digit:]]" v) (string-to-number v) v))))) - (when (string-prefix-p "/" host) ;FIXME: Use file-name-absolute-p? + (when (file-name-absolute-p host) + ;; Expand file name because `file-name-absolute-p' + ;; considers paths beginning with "~" as absolute + (setq host (expand-file-name host)) (setq local t)) (mpc--debug "Connecting to %s:%s..." host port) @@ -909,8 +912,13 @@ If PLAYLIST is t or nil or missing, use the main playlist." (defun mpc-file-local-copy (file) ;; Try to set mpc-mpd-music-directory. (when (and (null mpc-mpd-music-directory) - (string-match "\\`localhost" mpc-host)) - (let ((files '("~/.mpdconf" "/etc/mpd.conf")) + (or (string-match "\\`localhost" mpc-host) + (file-name-absolute-p mpc-host))) + (let ((files `(,(let ((xdg (getenv "XDG_CONFIG_HOME"))) + (concat (if (and xdg (file-name-absolute-p xdg)) + xdg "~/.config") + "/mpd/mpd.conf")) + "~/.mpdconf" "~/.mpd/mpd.conf" "/etc/mpd.conf")) file) (while (and files (not file)) (if (file-exists-p (car files)) (setq file (car files))) diff --git a/lisp/msb.el b/lisp/msb.el index 0351bda0e42..fbc130174b8 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -659,7 +659,7 @@ If the argument is left out or nil, then the current buffer is considered." (defun msb--create-function-info (menu-cond-elt) "Create a vector from an element MENU-COND-ELT of `msb-menu-cond'. This takes the form: -\[BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER] +[BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER] See `msb-menu-cond' for a description of its elements." (let* ((list-symbol (make-symbol "-msb-buffer-list")) (tmp-ih (and (> (length menu-cond-elt) 3) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index bb8351437d7..4f7fa3b8f39 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -681,7 +681,7 @@ '("\\`/\\(\\([^/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4)) "Format of a fully expanded remote file name. -This is a list of the form \(REGEXP HOST USER NAME\), +This is a list of the form \(REGEXP HOST USER NAME), where REGEXP is a regular expression matching the full remote name, and HOST, USER, and NAME are the numbers of parenthesized expressions in REGEXP for the components (in that order)." @@ -1366,8 +1366,8 @@ only return the directory part of FILE." (goto-char end))) ;; Read in ~/.netrc, if one exists. If ~/.netrc file exists and has -;; the correct permissions then extract the \`machine\', \`login\', -;; \`password\' and \`account\' information from within. +;; the correct permissions then extract the machine, login, +;; password and account information from within. (defun ange-ftp-parse-netrc () ;; We set this before actually doing it to avoid the possibility @@ -2511,7 +2511,7 @@ Works by doing a pwd and examining the directory syntax." ;;;; Remote file and directory listing support. ;;;; ------------------------------------------------------------ -;; Returns whether HOST's FTP server doesn't like \'ls\' or \'dir\' commands +;; Returns whether HOST's FTP server doesn't like 'ls' or 'dir' commands ;; to take switch arguments. (defun ange-ftp-dumb-unix-host (host) (and host ange-ftp-dumb-unix-host-regexp diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index a7efaf81dbc..e8e6bc0cb6a 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -380,7 +380,7 @@ Example: \"org.freedesktop.Hal.Device\" \"GetPropertyString\" \\='message \"system.kernel.machine\") - => \(:serial :system 2) + => (:serial :system 2) -| i686" @@ -656,8 +656,8 @@ Example: :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" \\='my-signal-handler) - => \(\(:signal :system \"org.freedesktop.Hal.Manager\" \"DeviceAdded\") - \(\"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" my-signal-handler)) + => ((:signal :system \"org.freedesktop.Hal.Manager\" \"DeviceAdded\") + (\"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" my-signal-handler)) `dbus-register-signal' returns an object, which can be used in `dbus-unregister-object' for removing the registration." @@ -1143,7 +1143,7 @@ Note, that this autoloads SERVICE if it is not running yet. If it shall be checked whether SERVICE is already running, one shall apply - \(member service \(dbus-list-known-names bus))" + (member service \(dbus-list-known-names bus))" ;; "Ping" raises a D-Bus error if SERVICE does not exist. ;; Otherwise, it returns silently with nil. (condition-case nil @@ -1631,22 +1631,22 @@ name, and the cdr is the list of properties as returned by \(dbus-get-all-managed-objects :session \"org.gnome.SettingsDaemon\" \"/\") - => \(\(\"/org/gnome/SettingsDaemon/MediaKeys\" - \(\"org.gnome.SettingsDaemon.MediaKeys\") - \(\"org.freedesktop.DBus.Peer\") - \(\"org.freedesktop.DBus.Introspectable\") - \(\"org.freedesktop.DBus.Properties\") - \(\"org.freedesktop.DBus.ObjectManager\")) - \(\"/org/gnome/SettingsDaemon/Power\" - \(\"org.gnome.SettingsDaemon.Power.Keyboard\") - \(\"org.gnome.SettingsDaemon.Power.Screen\") - \(\"org.gnome.SettingsDaemon.Power\" - \(\"Icon\" . \". GThemedIcon battery-full-charged-symbolic \") - \(\"Tooltip\" . \"Laptop battery is charged\")) - \(\"org.freedesktop.DBus.Peer\") - \(\"org.freedesktop.DBus.Introspectable\") - \(\"org.freedesktop.DBus.Properties\") - \(\"org.freedesktop.DBus.ObjectManager\")) + => ((\"/org/gnome/SettingsDaemon/MediaKeys\" + (\"org.gnome.SettingsDaemon.MediaKeys\") + (\"org.freedesktop.DBus.Peer\") + (\"org.freedesktop.DBus.Introspectable\") + (\"org.freedesktop.DBus.Properties\") + (\"org.freedesktop.DBus.ObjectManager\")) + (\"/org/gnome/SettingsDaemon/Power\" + (\"org.gnome.SettingsDaemon.Power.Keyboard\") + (\"org.gnome.SettingsDaemon.Power.Screen\") + (\"org.gnome.SettingsDaemon.Power\" + (\"Icon\" . \". GThemedIcon battery-full-charged-symbolic \") + (\"Tooltip\" . \"Laptop battery is charged\")) + (\"org.freedesktop.DBus.Peer\") + (\"org.freedesktop.DBus.Introspectable\") + (\"org.freedesktop.DBus.Properties\") + (\"org.freedesktop.DBus.ObjectManager\")) ...) If possible, \"org.freedesktop.DBus.ObjectManager.GetManagedObjects\" diff --git a/lisp/net/eww.el b/lisp/net/eww.el index f2f5ecb8e88..d44890f1b09 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -263,7 +263,7 @@ word(s) will be searched for via `eww-search-prefix'." ;; en.wikipedia.org/wiki/Free software (string-match "\\`[A-Za-z_]+\\.[A-Za-z._]+/" url) (and (= (length (split-string url)) 1) - (or (and (not (string-match-p "\\`[\"\'].*[\"\']\\'" url)) + (or (and (not (string-match-p "\\`[\"'].*[\"']\\'" url)) (> (length (split-string url "[.:]")) 1)) (string-match eww-local-regex url)))) (progn diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 418796a89c9..479c9a579f3 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -111,9 +111,9 @@ specifying a port number to connect to. Usage example: - \(with-temp-buffer - \(open-gnutls-stream \"tls\" - \(current-buffer) + (with-temp-buffer + (open-gnutls-stream \"tls\" + (current-buffer) \"your server goes here\" \"imaps\")) diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index eaf1d7e22c4..c6d40b62415 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -204,7 +204,7 @@ This variable is only used if the variable :group 'net-utils :type '(repeat string)) -(defcustom smbclient-prompt-regexp "^smb: \>" +(defcustom smbclient-prompt-regexp "^smb: >" "Regexp which matches the smbclient program's prompt. This variable is only used if the variable diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index 6c80e627477..072fd015b60 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -343,8 +343,8 @@ pattern-list is checked: The new headline will be marked as AGE if REGEXP matches the headline's TITLE-OR-DESCRIPTION. If, for example, `newsticker-auto-mark-filter-list' looks like - \((slashdot (\\='old \\='title \"^Forget me!$\") (\\='immortal \\='title \"Read me\") - \(\\='immortal \\='all \"important\")))) + ((slashdot (\\='old \\='title \"^Forget me!$\") (\\='immortal \\='title \"Read me\") + (\\='immortal \\='all \"important\")))) then all articles from slashdot are marked as old if they have the title \"Forget me!\". All articles with a title containing @@ -562,7 +562,7 @@ If non-nil only the current headline is visible.") "Return guid of ITEM." (newsticker--guid-to-string (assoc 'guid (newsticker--extra item)))) (defsubst newsticker--enclosure (item) - "Return enclosure element of ITEM in the form \(...FIXME...\) or nil." + "Return enclosure element of ITEM in the form (...FIXME...) or nil." (let ((enclosure (assoc 'enclosure (newsticker--extra item)))) (if enclosure (xml-node-attributes enclosure)))) diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el index be4179e4b11..105b36e14a3 100644 --- a/lisp/net/newst-reader.el +++ b/lisp/net/newst-reader.el @@ -258,7 +258,7 @@ for formatting." (defun newsticker--image-read (feed-name-symbol disabled &optional max-height) "Read the cached image for FEED-NAME-SYMBOL from disk. If DISABLED is non-nil the image will be converted to a disabled look -\(unless `newsticker-enable-logo-manipulations' is not t\). +\(unless `newsticker-enable-logo-manipulations' is not t). Optional argument MAX-HEIGHT specifies the maximal image height. Return the image." (let ((image-name (concat (newsticker--images-dir) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index df0635066cc..d58f3ebd4ea 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2600,7 +2600,7 @@ If ARG is given, opens the URL in a new browser window." (cond ((rcirc-channel-p target) target) ;;; -ChanServ- [#gnu] Welcome... - ((string-match "\\[\\(#[^\] ]+\\)\\]" message) + ((string-match "\\[\\(#[^] ]+\\)\\]" message) (match-string 1 message)) (sender (if (string= sender (rcirc-server-name process)) diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index da46ec3f670..fead60eb8ab 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -145,7 +145,7 @@ other arguments for `rlogin'. Input is sent line-at-a-time to the remote connection. Communication with the remote host is recorded in a buffer `*rlogin-HOST*' -\(or `*rlogin-USER@HOST*' if the remote username differs\). +\(or `*rlogin-USER@HOST*' if the remote username differs). If a prefix argument is given and the buffer `*rlogin-HOST*' already exists, a new buffer with a different connection will be made. diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index c4102a18cef..5e0274029f1 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -598,7 +598,7 @@ If successful, return the object path of the collection." ATTRIBUTES are key-value pairs. The keys are keyword symbols, starting with a colon. Example: - \(secrets-search-items \"Tramp collection\" :user \"joe\") + (secrets-search-items \"Tramp collection\" :user \"joe\") The object labels of the found items are returned as list." (let ((collection-path (secrets-unlock-collection collection)) @@ -635,8 +635,8 @@ The object labels of the found items are returned as list." ATTRIBUTES are key-value pairs set for the created item. The keys are keyword symbols, starting with a colon. Example: - \(secrets-create-item \"Tramp collection\" \"item\" \"geheim\" - :method \"sudo\" :user \"joe\" :host \"remote-host\"\) + (secrets-create-item \"Tramp collection\" \"item\" \"geheim\" + :method \"sudo\" :user \"joe\" :host \"remote-host\") The object path of the created item is returned." (unless (member item (secrets-list-items collection)) diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el index 433254db929..482f829707d 100644 --- a/lisp/net/shr-color.el +++ b/lisp/net/shr-color.el @@ -242,7 +242,7 @@ Like rgb() or hsl()." "rgb(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*)" color) (string-match - "rgba(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*[0-9]*\.?[0-9]+\s*%?\s*)" + "rgba(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*[0-9]*\\.?[0-9]+\s*%?\s*)" color)) (format "#%02X%02X%02X" (shr-color-relative-to-absolute (match-string-no-properties 1 color)) @@ -253,7 +253,7 @@ Like rgb() or hsl()." "hsl(\s*\\([0-9]\\{1,3\\}\\)\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*)" color) (string-match - "hsla(\s*\\([0-9]\\{1,3\\}\\)\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*[0-9]*\.?[0-9]+\s*%?\s*)" + "hsla(\s*\\([0-9]\\{1,3\\}\\)\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*[0-9]*\\.?[0-9]+\s*%?\s*)" color)) (let ((h (/ (string-to-number (match-string-no-properties 1 color)) 360.0)) (s (/ (string-to-number (match-string-no-properties 2 color)) 100.0)) diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index ada2767a4d1..509c021c644 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -167,7 +167,7 @@ namespace of LOCAL-NAME." "Convert LOCAL-NAME into a fully qualified name. A fully qualified name is a cons of the namespace name and the name of the element itself. For example \"xsd:string\" is -converted to \(\"http://www.w3.org/2001/XMLSchema\" . \"string\"\). +converted to \(\"http://www.w3.org/2001/XMLSchema\" . \"string\"). The USE-TNS argument specifies what to do when LOCAL-NAME has no namespace tag. If USE-TNS is non-nil, the `soap-target-xmlns' diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index f818fcd61d6..595e0ef6722 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -59,7 +59,7 @@ It is used for TCP/IP devices." ;;;###tramp-autoload (defcustom tramp-adb-prompt - "^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]\e;\[]*@[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]" + "^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]\e;[]*@[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]" "Regexp used as prompt in almquist shell." :type 'string :version "24.4" @@ -132,6 +132,7 @@ It is used for TCP/IP devices." (file-newer-than-file-p . tramp-handle-file-newer-than-file-p) (file-notify-add-watch . tramp-handle-file-notify-add-watch) (file-notify-rm-watch . tramp-handle-file-notify-rm-watch) + (file-notify-valid-p . tramp-handle-file-notify-valid-p) (file-ownership-preserved-p . ignore) (file-readable-p . tramp-handle-file-exists-p) (file-regular-p . tramp-handle-file-regular-p) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 4dfdcd76e66..b7b0a1c016f 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -443,6 +443,7 @@ Every entry is a list (NAME ADDRESS).") (file-newer-than-file-p . tramp-handle-file-newer-than-file-p) (file-notify-add-watch . tramp-gvfs-handle-file-notify-add-watch) (file-notify-rm-watch . tramp-handle-file-notify-rm-watch) + (file-notify-valid-p . tramp-handle-file-notify-valid-p) (file-ownership-preserved-p . ignore) (file-readable-p . tramp-gvfs-handle-file-readable-p) (file-regular-p . tramp-handle-file-regular-p) @@ -1002,27 +1003,48 @@ file names." v (concat localname filename) "file-name-all-completions" result)))))))) -(defun tramp-gvfs-handle-file-notify-add-watch (file-name _flags _callback) +(defun tramp-gvfs-handle-file-notify-add-watch (file-name flags _callback) "Like `file-notify-add-watch' for Tramp files." (setq file-name (expand-file-name file-name)) (with-parsed-tramp-file-name file-name nil - (let ((p (start-process - "gvfs-monitor-file" (generate-new-buffer " *gvfs-monitor-file*") - "gvfs-monitor-file" (tramp-gvfs-url-file-name file-name)))) + ;; We cannot watch directories, because `gvfs-monitor-dir' is not + ;; supported for gvfs-mounted directories. + (when (file-directory-p file-name) + (tramp-error + v 'file-notify-error "Monitoring not supported for `%s'" file-name)) + (let* ((default-directory (file-name-directory file-name)) + (events + (cond + ((and (memq 'change flags) (memq 'attribute-change flags)) + '(created changed changes-done-hint moved deleted + attribute-changed)) + ((memq 'change flags) + '(created changed changes-done-hint moved deleted)) + ((memq 'attribute-change flags) '(attribute-changed)))) + (p (start-process + "gvfs-monitor-file" (generate-new-buffer " *gvfs-monitor-file*") + "gvfs-monitor-file" (tramp-gvfs-url-file-name file-name)))) (if (not (processp p)) (tramp-error - v 'file-notify-error "gvfs-monitor-file failed to start") + v 'file-notify-error "Monitoring not supported for `%s'" file-name) (tramp-message v 6 "Run `%s', %S" (mapconcat 'identity (process-command p) " ") p) (tramp-set-connection-property p "vector" v) + (tramp-compat-process-put p 'events events) + (tramp-compat-process-put p 'watch-name localname) (tramp-compat-set-process-query-on-exit-flag p nil) - (set-process-filter p 'tramp-gvfs-file-gvfs-monitor-file-process-filter) - (with-current-buffer (process-buffer p) - (setq default-directory (file-name-directory file-name))) + (set-process-filter p 'tramp-gvfs-monitor-file-process-filter) + ;; There might be an error if the monitor is not supported. + ;; Give the filter a chance to read the output. + (tramp-accept-process-output p 1) + (unless (memq (process-status p) '(run open)) + (tramp-error + v 'file-notify-error "Monitoring not supported for `%s'" file-name)) p)))) -(defun tramp-gvfs-file-gvfs-monitor-file-process-filter (proc string) - "Read output from \"gvfs-monitor-file\" and add corresponding file-notify events." +(defun tramp-gvfs-monitor-file-process-filter (proc string) + "Read output from \"gvfs-monitor-file\" and add corresponding \ +file-notify events." (let* ((rest-string (tramp-compat-process-get proc 'rest-string)) (dd (with-current-buffer (process-buffer proc) default-directory)) (ddu (regexp-quote (tramp-gvfs-url-file-name dd)))) @@ -1033,6 +1055,8 @@ file names." ;; Attribute change is returned in unused wording. string (tramp-compat-replace-regexp-in-string "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) + (when (string-match "Monitoring not supported" string) + (delete-process proc)) (while (string-match (concat "^[\n\r]*" @@ -1040,10 +1064,10 @@ file names." "File = \\([^\n\r]+\\)[\n\r]+" "Event = \\([^[:blank:]]+\\)[\n\r]+") string) - (let ((action (intern-soft + (let ((file (match-string 1 string)) + (action (intern-soft (tramp-compat-replace-regexp-in-string - "_" "-" (downcase (match-string 2 string))))) - (file (match-string 1 string))) + "_" "-" (downcase (match-string 2 string)))))) (setq string (replace-match "" nil nil string)) ;; File names are returned as URL paths. We must convert them. (when (string-match ddu file) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 79b024e8310..433b2ba09c7 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1008,6 +1008,7 @@ of command line.") (file-newer-than-file-p . tramp-sh-handle-file-newer-than-file-p) (file-notify-add-watch . tramp-sh-handle-file-notify-add-watch) (file-notify-rm-watch . tramp-handle-file-notify-rm-watch) + (file-notify-valid-p . tramp-handle-file-notify-valid-p) (file-ownership-preserved-p . tramp-sh-handle-file-ownership-preserved-p) (file-readable-p . tramp-sh-handle-file-readable-p) (file-regular-p . tramp-handle-file-regular-p) @@ -3721,22 +3722,33 @@ Fall back to normal file name handler if no Tramp handler exists." "Like `file-notify-add-watch' for Tramp files." (setq file-name (expand-file-name file-name)) (with-parsed-tramp-file-name file-name nil - (let* ((default-directory (file-name-directory file-name)) - command events filter p sequence) + (let ((default-directory (file-name-directory file-name)) + command events filter p sequence) (cond ;; gvfs-monitor-dir. ((setq command (tramp-get-remote-gvfs-monitor-dir v)) - (setq filter 'tramp-sh-file-gvfs-monitor-dir-process-filter + (setq filter 'tramp-sh-gvfs-monitor-dir-process-filter + events + (cond + ((and (memq 'change flags) (memq 'attribute-change flags)) + '(created changed changes-done-hint moved deleted + attribute-changed)) + ((memq 'change flags) + '(created changed changes-done-hint moved deleted)) + ((memq 'attribute-change flags) '(attribute-changed))) sequence `(,command ,localname))) ;; inotifywait. ((setq command (tramp-get-remote-inotifywait v)) - (setq filter 'tramp-sh-file-inotifywait-process-filter + (setq filter 'tramp-sh-inotifywait-process-filter events (cond ((and (memq 'change flags) (memq 'attribute-change flags)) - "create,modify,move,delete,attrib") - ((memq 'change flags) "create,modify,move,delete") - ((memq 'attribute-change flags) "attrib")) + (concat "create,modify,move,moved_from,moved_to,move_self," + "delete,delete_self,attrib,ignored")) + ((memq 'change flags) + (concat "create,modify,move,moved_from,moved_to,move_self," + "delete,delete_self,ignored")) + ((memq 'attribute-change flags) "attrib,ignored")) sequence `(,command "-mq" "-e" ,events ,localname))) ;; None. (t (tramp-error @@ -3758,12 +3770,22 @@ Fall back to normal file name handler if no Tramp handler exists." (mapconcat 'identity sequence " ")) (tramp-message v 6 "Run `%s', %S" (mapconcat 'identity sequence " ") p) (tramp-set-connection-property p "vector" v) + ;; Needed for `tramp-sh-gvfs-monitor-dir-process-filter'. + (tramp-compat-process-put p 'events events) + (tramp-compat-process-put p 'watch-name localname) (tramp-compat-set-process-query-on-exit-flag p nil) (set-process-filter p filter) + ;; There might be an error if the monitor is not supported. + ;; Give the filter a chance to read the output. + (tramp-accept-process-output p 1) + (unless (memq (process-status p) '(run open)) + (tramp-error + v 'file-notify-error "Monitoring not supported for `%s'" file-name)) p)))) -(defun tramp-sh-file-gvfs-monitor-dir-process-filter (proc string) - "Read output from \"gvfs-monitor-dir\" and add corresponding file-notify events." +(defun tramp-sh-gvfs-monitor-dir-process-filter (proc string) + "Read output from \"gvfs-monitor-dir\" and add corresponding \ +file-notify events." (let ((remote-prefix (with-current-buffer (process-buffer proc) (file-remote-p default-directory))) @@ -3775,6 +3797,8 @@ Fall back to normal file name handler if no Tramp handler exists." ;; Attribute change is returned in unused wording. string (tramp-compat-replace-regexp-in-string "ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string)) + (when (string-match "Monitoring not supported" string) + (delete-process proc)) (while (string-match (concat "^[\n\r]*" @@ -3783,29 +3807,36 @@ Fall back to normal file name handler if no Tramp handler exists." "\\(Other = \\([^\n\r]+\\)[\n\r]+\\)?" "Event = \\([^[:blank:]]+\\)[\n\r]+") string) - (let ((object - (list - proc - (intern-soft - (tramp-compat-replace-regexp-in-string - "_" "-" (downcase (match-string 4 string)))) - ;; File names are returned as absolute paths. We must - ;; add the remote prefix. - (concat remote-prefix (match-string 1 string)) - (when (match-string 3 string) - (concat remote-prefix (match-string 3 string)))))) + (let* ((file (match-string 1 string)) + (file1 (match-string 3 string)) + (object + (list + proc + (intern-soft + (tramp-compat-replace-regexp-in-string + "_" "-" (downcase (match-string 4 string)))) + ;; File names are returned as absolute paths. We must + ;; add the remote prefix. + (concat remote-prefix file) + (when file1 (concat remote-prefix file1))))) (setq string (replace-match "" nil nil string)) + ;; Remove watch when file or directory to be watched is deleted. + (when (and (member (cadr object) '(moved deleted)) + (string-equal + file (tramp-compat-process-get proc 'watch-name))) + (delete-process proc)) ;; Usually, we would add an Emacs event now. Unfortunately, ;; `unread-command-events' does not accept several events at ;; once. Therefore, we apply the callback directly. - (tramp-compat-funcall 'file-notify-callback object))) + (when (member (cadr object) (tramp-compat-process-get proc 'events)) + (tramp-compat-funcall 'file-notify-callback object)))) ;; Save rest of the string. (when (zerop (length string)) (setq string nil)) (when string (tramp-message proc 10 "Rest string:\n%s" string)) (tramp-compat-process-put proc 'rest-string string))) -(defun tramp-sh-file-inotifywait-process-filter (proc string) +(defun tramp-sh-inotifywait-process-filter (proc string) "Read output from \"inotifywait\" and add corresponding file-notify events." (tramp-message proc 6 "%S\n%s" proc string) (dolist (line (split-string string "[\n\r]+" 'omit-nulls)) @@ -3827,6 +3858,9 @@ Fall back to normal file name handler if no Tramp handler exists." (tramp-compat-replace-regexp-in-string "_" "-" (downcase x)))) (split-string (match-string 1 line) "," 'omit-nulls)) (match-string 3 line)))) + ;; Remove watch when file or directory to be watched is deleted. + (when (equal (cadr object) 'ignored) + (delete-process proc)) ;; Usually, we would add an Emacs event now. Unfortunately, ;; `unread-command-events' does not accept several events at ;; once. Therefore, we apply the callback directly. @@ -4297,7 +4331,7 @@ process to set up. VEC specifies the connection." "List of local coding commands for inline transfer. Each item is a list that looks like this: -\(FORMAT ENCODING DECODING\) +\(FORMAT ENCODING DECODING) FORMAT is symbol describing the encoding/decoding format. It can be `b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing. @@ -4335,7 +4369,7 @@ with the encoded or decoded results, respectively.") "List of remote coding commands for inline transfer. Each item is a list that looks like this: -\(FORMAT ENCODING DECODING [TEST]\) +\(FORMAT ENCODING DECODING [TEST]) FORMAT is a symbol describing the encoding/decoding format. It can be `b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing. @@ -4508,7 +4542,7 @@ means discard it)." "List of compress and decompress commands for inline transfer. Each item is a list that looks like this: -\(COMPRESS DECOMPRESS\) +\(COMPRESS DECOMPRESS) COMPRESS or DECOMPRESS are strings with the respective commands.") @@ -5519,7 +5553,7 @@ Return ATTR." (tramp-get-remote-id vec) (if (equal id-format 'integer) "" "n") (if (equal id-format 'integer) - "" "| sed -e s/^/\\\"/ -e s/\$/\\\"/")))) + "" "| sed -e s/^/\\\"/ -e s/\\$/\\\"/")))) (defun tramp-get-remote-uid-with-perl (vec id-format) (tramp-send-command-and-read @@ -5570,7 +5604,7 @@ Return ATTR." (tramp-get-remote-id vec) (if (equal id-format 'integer) "" "n") (if (equal id-format 'integer) - "" "| sed -e s/^/\\\"/ -e s/\$/\\\"/")))) + "" "| sed -e s/^/\\\"/ -e s/\\$/\\\"/")))) (defun tramp-get-remote-gid-with-perl (vec id-format) (tramp-send-command-and-read diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index c4f0f1f500a..5910d1fd3a4 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -247,6 +247,7 @@ See `tramp-actions-before-shell' for more info.") (file-newer-than-file-p . tramp-handle-file-newer-than-file-p) (file-notify-add-watch . tramp-handle-file-notify-add-watch) (file-notify-rm-watch . tramp-handle-file-notify-rm-watch) + (file-notify-valid-p . tramp-handle-file-notify-valid-p) (file-ownership-preserved-p . ignore) (file-readable-p . tramp-handle-file-exists-p) (file-regular-p . tramp-handle-file-regular-p) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 0969048c433..fbb8c8a349e 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -110,9 +110,9 @@ Any level x includes messages for all levels 1 .. x-1. The levels are Each element looks like (REGEXP . DIRECTORY), with the same meaning like in `backup-directory-alist'. If a Tramp file is backed up, and DIRECTORY is a local file name, the backup directory is prepended with Tramp file -name prefix \(method, user, host\) of file. +name prefix \(method, user, host) of file. -\(setq tramp-backup-directory-alist backup-directory-alist\) +\(setq tramp-backup-directory-alist backup-directory-alist) gives the same backup policy for Tramp files on their hosts like the policy for local files." @@ -129,9 +129,9 @@ policy for local files." It has the same meaning like `bkup-backup-directory-info' from package `backup-dir'. If a Tramp file is backed up, and BACKUP-DIR is a local file name, the backup directory is prepended with Tramp file name prefix -\(method, user, host\) of file. +\(method, user, host) of file. -\(setq tramp-bkup-backup-directory-info bkup-backup-directory-info\) +\(setq tramp-bkup-backup-directory-info bkup-backup-directory-info) gives the same backup policy for Tramp files on their hosts like the policy for local files." @@ -464,15 +464,15 @@ host runs a registered shell, it shall be added to this list, too." (concat "\\`" (regexp-opt - (list "localhost" "localhost6" (system-name) "127\.0\.0\.1" "::1") t) + (list "localhost" "localhost6" (system-name) "127.0.0.1" "::1") t) "\\'") "Host names which are regarded as local host.") (defvar tramp-completion-function-alist nil "Alist of methods for remote files. -This is a list of entries of the form \(NAME PAIR1 PAIR2 ...\). +This is a list of entries of the form \(NAME PAIR1 PAIR2 ...). Each NAME stands for a remote access method. Each PAIR is of the form -\(FUNCTION FILE\). FUNCTION is responsible to extract user names and host +\(FUNCTION FILE). FUNCTION is responsible to extract user names and host names from FILE for completion. The following predefined FUNCTIONs exists: * `tramp-parse-rhosts' for \"~/.rhosts\" like files, @@ -908,7 +908,7 @@ and is a bit too general, then some files might be considered Tramp files which are not really Tramp files. Please note that the entry in `file-name-handler-alist' is made when -this file \(tramp.el\) is loaded. This means that this variable must be set +this file \(tramp.el) is loaded. This means that this variable must be set before loading tramp.el. Alternatively, `file-name-handler-alist' can be updated after changing this variable. @@ -940,7 +940,7 @@ See `tramp-file-name-structure' for more explanations.") This regexp should match partial Tramp file names only. Please note that the entry in `file-name-handler-alist' is made when -this file \(tramp.el\) is loaded. This means that this variable must be set +this file \(tramp.el) is loaded. This means that this variable must be set before loading tramp.el. Alternatively, `file-name-handler-alist' can be updated after changing this variable. @@ -993,18 +993,18 @@ checked via the following code: In the Emacs normally running Tramp, evaluate the above code \(replace \"xxx\" and \"yyy\" by the remote user and host name, -respectively\). You can do this, for example, by pasting it into +respectively). You can do this, for example, by pasting it into the `*scratch*' buffer and then hitting C-j with the cursor after the last closing parenthesis. Note that it works only if you have configured -\"ssh\" to run without password query, see ssh-agent\(1\). +\"ssh\" to run without password query, see ssh-agent(1). You will see the number of bytes sent successfully to the remote host. If that number exceeds 1000, you can stop the execution by hitting C-g, because your Emacs is likely clean. When it is necessary to set `tramp-chunksize', you might consider to -use an out-of-the-band method \(like \"scp\"\) instead of an internal one -\(like \"ssh\"\), because setting `tramp-chunksize' to non-nil decreases +use an out-of-the-band method \(like \"scp\") instead of an internal one +\(like \"ssh\"), because setting `tramp-chunksize' to non-nil decreases performance. If your Emacs is buggy, the code stops and gives you an indication @@ -2070,7 +2070,7 @@ ARGS are the arguments OPERATION has been called with." 'dired-print-file 'dired-shell-call-process)) default-directory) ;; PROC. - ((eq operation 'file-notify-rm-watch) + ((member operation (list 'file-notify-rm-watch 'file-notify-valid-p)) (when (processp (nth 0 args)) (with-current-buffer (process-buffer (nth 0 args)) default-directory))) @@ -3407,7 +3407,7 @@ of." (defun tramp-handle-file-notify-add-watch (filename _flags _callback) "Like `file-notify-add-watch' for Tramp files." ;; This is the default handler. tramp-gvfs.el and tramp-sh.el have - ;; its own one. + ;; their own one. (setq filename (expand-file-name filename)) (with-parsed-tramp-file-name filename nil (tramp-error @@ -3419,7 +3419,17 @@ of." (unless (processp proc) (tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc)) (tramp-message proc 6 "Kill %S" proc) - (kill-process proc)) + (delete-process proc)) + +(defun tramp-handle-file-notify-valid-p (proc) + "Like `file-notify-valid-p' for Tramp files." + (and proc (processp proc) (memq (process-status proc) '(run open)) + ;; Sometimes, the process is still in status `run' when the + ;; file or directory to be watched is deleted already. + (with-current-buffer (process-buffer proc) + (file-exists-p + (concat (file-remote-p default-directory) + (tramp-compat-process-get proc 'watch-name)))))) ;;; Functions for establishing connection: @@ -3615,7 +3625,7 @@ This is needed in order to hide `last-coding-system-used', which is set for process communication also." (with-current-buffer (process-buffer proc) ;; FIXME: If there is a gateway process, we need communication - ;; between several processes. Too complicated to implement, so we + ;; between several processes. Too complicate to implement, so we ;; read output from all processes. (let ((p (if (tramp-get-connection-property proc "gateway" nil) nil proc)) buffer-read-only last-coding-system-used) diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el index 7fae9e6acc6..794a4676a5e 100644 --- a/lisp/net/zeroconf.el +++ b/lisp/net/zeroconf.el @@ -197,7 +197,7 @@ The key of an entry is the concatenation of the service name and service type of a discovered service. The value is the service itself. The format of a service is - \(INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS\) + \(INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS) The INTERFACE is a number, which represents the network interface the service is located at. The corresponding network interface @@ -233,7 +233,7 @@ The key of an entry is the concatenation of the service name and service type of a resolved service. The value is the service itself. The format of a service is - \(INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS\) + (INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS) INTERFACE, PROTOCOL, NAME, TYPE, DOMAIN and FLAGS have the same meaning as in `zeroconf-services-hash'. @@ -275,7 +275,7 @@ supported keys depend on the service type.") "Returns all discovered Avahi services for a given service type TYPE. The service type is one of the returned values of `zeroconf-list-service-types'. The return value is a list -\(SERVICE1 SERVICE2 ...\). See `zeroconf-services-hash' for the +\(SERVICE1 SERVICE2 ...). See `zeroconf-services-hash' for the format of SERVICE." (let (result) (maphash @@ -385,7 +385,7 @@ type used when registering FUNCTION." NAME must be a string. The service must be of service type TYPE. The resulting list has the format - \(INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS\)." + (INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS)." ;; Due to the service browser, all known services are kept in ;; `zeroconf-services-hash'. (gethash (concat name "/" type) zeroconf-services-hash nil)) @@ -395,7 +395,7 @@ TYPE. The resulting list has the format NAME must be a string. The service must be of service type TYPE. The resulting list has the format - \(INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS\)." + (INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS)." (let* ((name (zeroconf-service-name service)) (type (zeroconf-service-type service)) (key (concat name "/" type))) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 60f35c834b3..0c49211869e 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -179,6 +179,11 @@ comments always start in column zero.") "Non-nil if nested comments should be quoted. This should be locally set by each major mode if needed.") +(defvar comment-quote-nested-function #'comment-quote-nested-default + "Function to quote nested comments in a region. +It takes the same arguments as `comment-quote-nested-default', +and is called with the buffer narrowed to a single comment.") + (defvar comment-continue nil "Continuation string to insert for multiline comments. This string will be added at the beginning of each line except the very @@ -382,7 +387,7 @@ function should first call this function explicitly." (concat (unless (eq comment-use-syntax t) ;; `syntax-ppss' will detect escaping. "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)") - "\\(\\s<+\\|" + "\\(?:\\s<+\\|" (regexp-quote (comment-string-strip comment-start t t)) ;; Let's not allow any \s- but only [ \t] since \n ;; might be both a comment-end marker and \s-. @@ -412,28 +417,44 @@ function should first call this function explicitly." If UNP is non-nil, unquote nested comment markers." (setq cs (comment-string-strip cs t t)) (setq ce (comment-string-strip ce t t)) - (when (and comment-quote-nested (> (length ce) 0)) - (let ((re (concat (comment-quote-re ce unp) - "\\|" (comment-quote-re cs unp)))) - (goto-char (point-min)) - (while (re-search-forward re nil t) - (goto-char (match-beginning 0)) - (forward-char 1) - (if unp (delete-char 1) (insert "\\")) - (when (= (length ce) 1) - ;; If the comment-end is a single char, adding a \ after that - ;; "first" char won't deactivate it, so we turn such a CE - ;; into !CS. I.e. for pascal, we turn } into !{ - (if (not unp) - (when (string= (match-string 0) ce) - (replace-match (concat "!" cs) t t)) - (when (and (< (point-min) (match-beginning 0)) - (string= (buffer-substring (1- (match-beginning 0)) - (1- (match-end 0))) - (concat "!" cs))) - (backward-char 2) - (delete-char (- (match-end 0) (match-beginning 0))) - (insert ce)))))))) + (when (and comment-quote-nested + (> (length ce) 0)) + (funcall comment-quote-nested-function cs ce unp))) + +(defun comment-quote-nested-default (cs ce unp) + "Quote comment delimiters in the buffer. +It expects to be called with the buffer narrowed to a single comment. +It is used as a default for `comment-quote-nested-function'. + +The arguments CS and CE are strings matching comment starting and +ending delimiters respectively. + +If UNP is non-nil, comments are unquoted instead. + +To quote the delimiters, a \\ is inserted after the first +character of CS or CE. If CE is a single character it will +change CE into !CS." + (let ((re (concat (comment-quote-re ce unp) + "\\|" (comment-quote-re cs unp)))) + (goto-char (point-min)) + (while (re-search-forward re nil t) + (goto-char (match-beginning 0)) + (forward-char 1) + (if unp (delete-char 1) (insert "\\")) + (when (= (length ce) 1) + ;; If the comment-end is a single char, adding a \ after that + ;; "first" char won't deactivate it, so we turn such a CE + ;; into !CS. I.e. for pascal, we turn } into !{ + (if (not unp) + (when (string= (match-string 0) ce) + (replace-match (concat "!" cs) t t)) + (when (and (< (point-min) (match-beginning 0)) + (string= (buffer-substring (1- (match-beginning 0)) + (1- (match-end 0))) + (concat "!" cs))) + (backward-char 2) + (delete-char (- (match-end 0) (match-beginning 0))) + (insert ce))))))) ;;;; ;;;; Navigation diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index 6c5c85b2fcc..0e2fca349a5 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -546,6 +546,7 @@ Many aspects this mode can be customized using (setq comment-end-skip "[ \t\r\n]*-->") (make-local-variable 'comment-line-break-function) (setq comment-line-break-function 'nxml-newline-and-indent) + (setq-local comment-quote-nested-function 'nxml-comment-quote-nested) (use-local-map nxml-mode-map) (save-excursion (save-restriction @@ -1350,6 +1351,18 @@ of the inserted start-tag or nil if none was inserted." start-tag-indent))))) inserted-start-tag-pos)) +(defun nxml-comment-quote-nested (_cs _ce unp) + "Quote nested comments in buffer. +See `comment-quote-nested-function' for more information." + (goto-char (point-min)) + (save-match-data + (while (re-search-forward "-[\\]*-" nil t) + (goto-char (match-beginning 0)) + (forward-char 1) + (if unp + (delete-char 1) + (insert "\\"))))) + ;;; Indentation (defun nxml-indent-line () diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 7e3dd66a56a..3985d511eac 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -200,7 +200,7 @@ `(let* (,@(append varlist '((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-point-motion-hooks t) - before-change-functions after-change-functions + (inhibit-modification-hooks t) deactivate-mark buffer-file-name buffer-file-truename))) ,@body (when (and (not modified) (buffer-modified-p)) diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el index 79afd80813f..d05a7d86dbc 100644 --- a/lisp/obsolete/lazy-lock.el +++ b/lisp/obsolete/lazy-lock.el @@ -892,8 +892,7 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'." (save-excursion (save-match-data (save-buffer-state - ;; Ensure syntactic fontification is always correct. - (font-lock-beginning-of-syntax-function next) + (next) ;; Find successive unfontified regions between BEG and END. (condition-case data (do-while beg diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el index 01939daa709..7cb13ce600f 100644 --- a/lisp/obsolete/longlines.el +++ b/lisp/obsolete/longlines.el @@ -143,7 +143,7 @@ newlines are indicated with a symbol." 'longlines-window-change-function nil t)) (let ((buffer-undo-list t) (inhibit-read-only t) - (after-change-functions nil) + (inhibit-modification-hooks t) (mod (buffer-modified-p)) buffer-file-name buffer-file-truename) ;; Turning off undo is OK since (spaces + newlines) is @@ -184,7 +184,7 @@ newlines are indicated with a symbol." (if longlines-showing (longlines-unshow-hard-newlines)) (let ((buffer-undo-list t) - (after-change-functions nil) + (inhibit-modification-hooks t) (inhibit-read-only t) buffer-file-name buffer-file-truename) (if longlines-decoded diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index 799e58b6af2..11cd2530dd7 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -502,7 +502,7 @@ be saved in the second match data.") (defvar org-babel-result-w-name-regexp (concat org-babel-result-regexp - "\\([^ ()\f\t\n\r\v]+\\)\\(\(\\(.*\\)\)\\|\\)")) + "\\([^ ()\f\t\n\r\v]+\\)\\((\\(.*\\))\\|\\)")) (defvar org-babel-min-lines-for-block-output 10 "The minimum number of lines for block output. @@ -2456,7 +2456,7 @@ block but are passed literally to the \"example-block\"." (setq index (point)) (while (and (re-search-forward (org-babel-noweb-wrap) nil t)) (save-match-data (setf source-name (match-string 1))) - (save-match-data (setq evaluate (string-match "\(.*\)" source-name))) + (save-match-data (setq evaluate (string-match "(.*)" source-name))) (save-match-data (setq prefix (buffer-substring (match-beginning 0) diff --git a/lisp/org/ob-dot.el b/lisp/org/ob-dot.el index 21a40b34f49..f4953a39eac 100644 --- a/lisp/org/ob-dot.el +++ b/lisp/org/ob-dot.el @@ -53,7 +53,7 @@ (value (cdr pair))) (setq body (replace-regexp-in-string - (concat "\$" (regexp-quote name)) + (concat "$" (regexp-quote name)) (if (stringp value) value (format "%S" value)) body)))) vars) diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index d0a413f1172..811c9ef92c6 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el @@ -183,7 +183,7 @@ This function is called by `org-babel-execute-src-block'." "Generate a file from a pdf file using imagemagick." (let ((cmd (concat "convert " im-in-options " " pdffile " " im-out-options " " out-file))) - (message (concat "Converting pdffile file " cmd "...")) + (message "Converting pdffile file %s..." cmd) (shell-command cmd))) (defun org-babel-latex-tex-to-pdf (file) diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el index 5391edff5fc..04eab7c31dd 100644 --- a/lisp/org/ob-lilypond.el +++ b/lisp/org/ob-lilypond.el @@ -111,7 +111,7 @@ blocks") (value (cdr pair))) (setq body (replace-regexp-in-string - (concat "\$" (regexp-quote name)) + (concat "$" (regexp-quote name)) (if (stringp value) value (format "%S" value)) body)))) vars) diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index b083011bbf2..c25470666c8 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el @@ -64,14 +64,14 @@ To add files to this list use the `org-babel-lob-ingest' command." (defconst org-babel-block-lob-one-liner-regexp (concat - "^\\([ \t]*?\\)#\\+call:[ \t]+\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" - "\(\\([^\n]*?\\)\)\\(\\[.+\\]\\|\\)[ \t]*\\(\\([^\n]*\\)\\)?") + "^\\([ \t]*?\\)#\\+call:[ \t]+\\([^()\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" + "(\\([^\n]*?\\))\\(\\[.+\\]\\|\\)[ \t]*\\(\\([^\n]*\\)\\)?") "Regexp to match non-inline calls to predefined source block functions.") (defconst org-babel-inline-lob-one-liner-regexp (concat - "\\([^\n]*?\\)call_\\([^\(\)\n]+?\\)\\(\\[\\(.*?\\)\\]\\|\\(\\)\\)" - "\(\\([^\n]*?\\)\)\\(\\[\\(.*?\\)\\]\\)?") + "\\([^\n]*?\\)call_\\([^()\n]+?\\)\\(\\[\\(.*?\\)\\]\\|\\(\\)\\)" + "(\\([^\n]*?\\))\\(\\[\\(.*?\\)\\]\\)?") "Regexp to match inline calls to predefined source block functions.") (defconst org-babel-lob-one-liner-regexp diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index e0775dba3bd..7ad474dfb4d 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el @@ -61,7 +61,7 @@ if ischar(ans), fid = fopen('%s', 'w'); fprintf(fid, '%%s\\n', ans); fclose(fid) else, dlmwrite('%s', ans, '\\t') end") -(defvar org-babel-octave-eoe-indicator "\'org_babel_eoe\'") +(defvar org-babel-octave-eoe-indicator "'org_babel_eoe'") (defvar org-babel-octave-eoe-output "ans = org_babel_eoe") @@ -127,7 +127,7 @@ specifying a variable of the same value." (if (listp (car var)) "; " ",")) "]") (cond ((stringp var) - (format "\'%s\'" var)) + (format "'%s'" var)) (t (format "%s" var))))) diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 3e79592f5a0..5c1e13142da 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -138,7 +138,7 @@ the variable." (setq ref (substring ref 0 (match-beginning 0)))) ;; assign any arguments to pass to source block (when (string-match - "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)\(\\(.*\\)\)$" ref) + "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) @@ -224,7 +224,7 @@ returned, or an empty string or \"*\" both of which are interpreted to mean the entire range and as such are equivalent to \"0:-1\"." (if (and (> (length index) 0) (string-match "^\\([^,]*\\),?" index)) - (let* ((ind-re "\\(\\([-[:digit:]]+\\):\\([-[:digit:]]+\\)\\|\*\\)") + (let* ((ind-re "\\(\\([-[:digit:]]+\\):\\([-[:digit:]]+\\)\\|\\*\\)") (lgth (length lis)) (portion (match-string 1 index)) (remainder (substring index (match-end 0))) diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 7ed61b153e7..6dff9adca86 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -106,7 +106,7 @@ This function is called by `org-babel-execute-src-block'." ('dbi (format "dbish --batch %s < %s | sed '%s' > %s" (or cmdline "") (org-babel-process-file-name in-file) - "/^+/d;s/^\|//;s/(NULL)/ /g;$d" + "/^+/d;s/^|//;s/(NULL)/ /g;$d" (org-babel-process-file-name out-file))) ('monetdb (format "mclient -f tab %s < %s > %s" (or cmdline "") @@ -186,7 +186,7 @@ This function is called by `org-babel-execute-src-block'." (lambda (pair) (setq body (replace-regexp-in-string - (format "\$%s" (car pair)) ;FIXME: "\$" == "$"! + (format "$%s" (car pair)) (let ((val (cdr pair))) (if (listp val) (let ((data-file (org-babel-temp-file "sql-data-"))) diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index 33c8d9b59fc..18d7fc8fd6a 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el @@ -119,7 +119,7 @@ This function is called by `org-babel-execute-src-block'." (lambda (pair) (setq body (replace-regexp-in-string - (format "\$%s" (car pair)) ;FIXME: "\$" == "$"! + (format "$%s" (car pair)) (let ((val (cdr pair))) (if (listp val) (let ((data-file (org-babel-temp-file "sqlite-data-"))) diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index c0846f9cd82..732522c3773 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -302,7 +302,7 @@ Insert the source-code specified by SPEC into the current source code file. This function uses `comment-region' which assumes that the appropriate major-mode is set. SPEC has the form: - \(start-line file link source-name params body comment)" + (start-line file link source-name params body comment)" (let* ((start-line (nth 0 spec)) (file (nth 1 spec)) (link (nth 2 spec)) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index ae5a252d8af..0b3be562489 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -4603,7 +4603,8 @@ in `org-agenda-text-search-extra-files'." (goto-char (1- end)) (throw :skip t))) (if todo-only - (cons (concat "^\*+[ \t]+" org-not-done-regexp) + (cons (concat "^\\*+[ \t]+" + org-not-done-regexp) regexps+) regexps+)) (goto-char beg) diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index 06adc078c5d..7227803e6be 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el @@ -195,7 +195,7 @@ (:howpublished . "How something strange has been published. The first word should be capitalized.") (:institution . "The sponsoring institution of a technical report.") (:journal . "A journal name.") - (:key . "Used for alphabetizing, cross-referencing, and creating a label when the author information is missing. This field should not be confused with the key that appears in the \cite command and at the beginning of the database entry.") + (:key . "Used for alphabetizing, cross-referencing, and creating a label when the author information is missing. This field should not be confused with the key that appears in the \\cite command and at the beginning of the database entry.") (:month . "The month in which the work was published or, for an unpublished work, in which it was written. You should use the standard three-letter abbreviation,") (:note . "Any additional information that can help the reader. The first word should be capitalized.") (:number . "Any additional information that can help the reader. The first word should be capitalized.") diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 9489edf98bf..b386eb11652 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1235,7 +1235,7 @@ make this the default behavior.)" (looking-at (concat "^[ \t]*" org-clock-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" - " *\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$"))) + " *\\sw+.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$"))) (message "Matched %s" (match-string 1)) (setq ts (concat "[" (match-string 1) "]")) (goto-char (match-end 1)) diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index e938ab4ae4b..396aa3711d3 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -354,7 +354,7 @@ CPHR is the complex heading regexp to use for parsing ITEM." (let (fixitem) (if (not cphr) item - (unless (string-match "^\*+ " item) + (unless (string-match "^\\*+ " item) (setq item (concat "* " item) fixitem t)) (if (string-match cphr item) (setq item @@ -369,7 +369,7 @@ CPHR is the complex heading regexp to use for parsing ITEM." 0 (1+ (match-end 1)) (list 'org-whitespace (* 2 (1- (org-reduced-level (- (match-end 1) (match-beginning 1)))))) item)) - (if fixitem (replace-regexp-in-string "^\*+ " "" item) item)))) + (if fixitem (replace-regexp-in-string "^\\*+ " "" item) item)))) (defun org-columns-compact-links (s) "Replace [[link][desc]] with [desc] or [link]." diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index f527673cbd4..2b3445e47cd 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el @@ -133,9 +133,10 @@ See `org-crypt-disable-auto-save'." (and (eq org-crypt-disable-auto-save 'ask) (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? "))) - (message (concat "org-decrypt: Disabling auto-save-mode for " (or (buffer-file-name) (current-buffer)))) - ; The argument to auto-save-mode has to be "-1", since - ; giving a "nil" argument toggles instead of disabling. + (message "org-decrypt: Disabling auto-save-mode for %s" + (or (buffer-file-name) (current-buffer))) + ;; The argument to auto-save-mode has to be "-1", since + ;; giving a "nil" argument toggles instead of disabling. (auto-save-mode -1)) ((eq org-crypt-disable-auto-save nil) (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index 07224d38bd1..5c0e3e92328 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el @@ -61,7 +61,7 @@ (setq path (org-link-escape (expand-file-name path))) (cond ((eq format 'html) (format "<a href=\"%s\">%s</a>" path desc)) - ((eq format 'latex) (format "\href{%s}{%s}" path desc)) + ((eq format 'latex) (format "\\href{%s}{%s}" path desc)) ((eq format 'ascii) (format "%s (%s)" desc path)) (t path))))) diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 573d7eeca2d..9f4cfa3ec66 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -4141,30 +4141,30 @@ Assuming TREE is a variable containing an Org buffer parse tree, the following example will return a flat list of all `src-block' and `example-block' elements in it: - \(org-element-map tree \\='(example-block src-block) \\='identity) + (org-element-map tree \\='(example-block src-block) \\='identity) The following snippet will find the first headline with a level of 1 and a \"phone\" tag, and will return its beginning position: - \(org-element-map tree \\='headline - \(lambda (hl) - \(and (= (org-element-property :level hl) 1) - \(member \"phone\" (org-element-property :tags hl)) - \(org-element-property :begin hl))) + (org-element-map tree \\='headline + (lambda (hl) + (and (= (org-element-property :level hl) 1) + (member \"phone\" (org-element-property :tags hl)) + (org-element-property :begin hl))) nil t) The next example will return a flat list of all `plain-list' type elements in TREE that are not a sub-list themselves: - \(org-element-map tree \\='plain-list \\='identity nil nil \\='plain-list) + (org-element-map tree \\='plain-list \\='identity nil nil \\='plain-list) Eventually, this example will return a flat list of all `bold' type objects containing a `latex-snippet' type object, even looking into captions: - \(org-element-map tree \\='bold - \(lambda (b) - \(and (org-element-map b \\='latex-snippet \\='identity nil t) b)) + (org-element-map tree \\='bold + (lambda (b) + (and (org-element-map b \\='latex-snippet \\='identity nil t) b)) nil nil nil t)" ;; Ensure TYPES and NO-RECURSION are a list, even of one element. (unless (listp types) (setq types (list types))) diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index f8f218f6f55..89d6b951588 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el @@ -359,8 +359,8 @@ packages to be loaded, add these packages to `org-latex-packages-alist'." ("lessgtr" "\\lessgtr" t "≶" "[less than or greater than]" "[less than or greater than]" "≶") ("lesseqgtr" "\\lesseqgtr" t "⋚" "[less than or equal or greater than or equal]" "[less than or equal or greater than or equal]" "⋚") ("ll" "\\ll" t "≪" "<<" "<<" "≪") - ("Ll" "\lll" t "⋘" "<<<" "<<<" "⋘") - ("lll" "\lll" t "⋘" "<<<" "<<<" "⋘") + ("Ll" "\\lll" t "⋘" "<<<" "<<<" "⋘") + ("lll" "\\lll" t "⋘" "<<<" "<<<" "⋘") ("gg" "\\gg" t "≫" ">>" ">>" "≫") ("Gg" "\\ggg" t "⋙" ">>>" ">>>" "⋙") ("ggg" "\\ggg" t "⋙" ">>>" ">>>" "⋙") diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 0f086975aa7..5d853e62bc1 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -243,7 +243,7 @@ positions, and the definition, when inlined." This matches only pure definitions like [1] or [fn:name] at the beginning of a line. It does not match references like -\[fn:name:definition], where the footnote text is included and +[fn:name:definition], where the footnote text is included and defined locally. The return value will be nil if not at a footnote definition, and diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 28bed8dcc59..c8266500fe3 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -230,7 +230,7 @@ This variable needs to be set before org.el is loaded. If you need to make a change while Emacs is running, use the customize interface or run the following code after updating it: - \(when (featurep \\='org-element) (load \"org-element\" t t))" + (when (featurep \\='org-element) (load \"org-element\" t t))" :group 'org-plain-lists :version "24.1" :type 'boolean @@ -620,11 +620,11 @@ point-at-bol: will get the following structure: -\(\(1 0 \"- \" nil \"[X]\" nil 97\) - \(18 2 \"1. \" nil nil nil 34\) - \(34 2 \"5. \" \"5\" nil nil 55\) - \(97 0 \"- \" nil nil nil 131\) - \(109 2 \"+ \" nil nil \"tag\" 131\) + ((1 0 \"- \" nil \"[X]\" nil 97) + (18 2 \"1. \" nil nil nil 34) + (34 2 \"5. \" \"5\" nil nil 55) + (97 0 \"- \" nil nil nil 131) + (109 2 \"+ \" nil nil \"tag\" 131)) Assume point is at an item." (save-excursion @@ -2015,7 +2015,7 @@ previous item, plus ARGS extra arguments. FUNCTION is applied on items in reverse order. -As an example, \(org-apply-on-list \(lambda \(result\) \(1+ result\)\) 0\) +As an example, \(org-apply-on-list \(lambda \(result) \(1+ result)) 0) will return the number of items in the current list. Sublists of the list are skipped. Cursor is always at the @@ -2931,13 +2931,13 @@ For example, the following list: will be parsed as: -\(ordered - \(nil \"first item\" - \(unordered - \(nil \"sub-item one\"\) - \(nil \"[CBON] sub-item two\"\)\) - \"more text in first item\"\) - \(3 \"last item\"\)\) + (ordered + (nil \"first item\" + (unordered + (nil \"sub-item one\") + (nil \"[CBON] sub-item two\")) + \"more text in first item\") + (3 \"last item\")) Point is left at list end." (defvar parse-item) ;FIXME: Or use `cl-labels' or `letrec'. diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 478ad933ae2..174e36ed632 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -440,8 +440,8 @@ available parameters." "Check if the table has a marking column. If yes remove the column and the special lines." (let ((special (if maybe-quoted - "^[ \t]*| *\\\\?[\#!$*_^/ ] *|" - "^[ \t]*| *[\#!$*_^/ ] *|")) + "^[ \t]*| *\\\\?[#!$*_^/ ] *|" + "^[ \t]*| *[#!$*_^/ ] *|")) (ignore (if maybe-quoted "^[ \t]*| *\\\\?[!$_^/] *|" "^[ \t]*| *[!$_^/] *|"))) @@ -3248,7 +3248,7 @@ formulas that use a range of rows or columns, it may often be better to anchor the formula with \"I\" row markers, or to offset from the borders of the table using the @< @> $< $> makers." (let (n nmax len char (start 0)) - (while (string-match "\\([@$]\\)\\(<+\\|>+\\)\\|\\(remote([^\)]+)\\)" + (while (string-match "\\([@$]\\)\\(<+\\|>+\\)\\|\\(remote([^)]+)\\)" s start) (if (match-end 3) (setq start (match-end 3)) diff --git a/lisp/org/org.el b/lisp/org/org.el index c7b64cccb19..7a6d6cc1b3f 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -381,7 +381,7 @@ core modules, nor modules from the CONTRIB directory). Just add symbols to the end of the list. If the package is called org-xyz.el, then you need to add the symbol `xyz', and the package must have a call to: - \(provide \\='org-xyz) + (provide \\='org-xyz) For export specific modules, see also `org-export-backends'." :group 'org @@ -465,26 +465,26 @@ need to make a change while Emacs is running, use the customize interface or run the following code, where VAL stands for the new value of the variable, after updating it: - \(progn - \(setq org-export--registered-backends - \(org-remove-if-not - \(lambda (backend) - \(let ((name (org-export-backend-name backend))) - \(or (memq name val) - \(catch \\='parentp - \(dolist (b val) - \(and (org-export-derived-backend-p b name) - \(throw \\='parentp t))))))) + (progn + (setq org-export--registered-backends + (org-remove-if-not + (lambda (backend) + (let ((name (org-export-backend-name backend))) + (or (memq name val) + (catch \\='parentp + (dolist (b val) + (and (org-export-derived-backend-p b name) + (throw \\='parentp t))))))) org-export--registered-backends)) - \(let ((new-list (mapcar \\='org-export-backend-name + (let ((new-list (mapcar \\='org-export-backend-name org-export--registered-backends))) - \(dolist (backend val) - \(cond - \((not (load (format \"ox-%s\" backend) t t)) - \(message \"Problems while trying to load export back-end \\=`%s\\='\" + (dolist (backend val) + (cond + ((not (load (format \"ox-%s\" backend) t t)) + (message \"Problems while trying to load export back-end \\=`%s\\='\" backend)) - \((not (memq backend new-list)) (push backend new-list)))) - \(set-default \\='org-export-backends new-list))) + ((not (memq backend new-list)) (push backend new-list)))) + (set-default \\='org-export-backends new-list))) Adding a back-end to this list will also pull the back-end it depends on, if any." @@ -2957,7 +2957,7 @@ its value is 0. For example, - \(:days \"%dd\" :hours \"%d\" :require-hours t :minutes \":%02d\" + (:days \"%dd\" :hours \"%d\" :require-hours t :minutes \":%02d\" :require-minutes t) means durations longer than a day will be expressed in days, @@ -2967,7 +2967,7 @@ hour). The value - \(:days \"%dd\" :minutes \"%dm\") + (:days \"%dd\" :minutes \"%dm\") means durations longer than a day will be expressed in days and minutes, and durations less than a day will be expressed entirely @@ -3802,8 +3802,8 @@ images at the same place." (defcustom org-format-latex-header "\\documentclass{article} \\usepackage[usenames]{color} -\[PACKAGES] -\[DEFAULT-PACKAGES] +[PACKAGES] +[DEFAULT-PACKAGES] \\pagestyle{empty} % do not remove % The settings below are copied from fullpage.sty \\setlength{\\textwidth}{\\paperwidth} @@ -3889,7 +3889,7 @@ a string. A cell is of the format: - \( \"options\" \"package\" SNIPPET-FLAG). + ( \"options\" \"package\" SNIPPET-FLAG). If SNIPPET-FLAG is non-nil, the package also needs to be included when compiling LaTeX snippets into images for inclusion into @@ -3917,7 +3917,7 @@ Each element is either a cell or a string. A cell is of the format: - \(\"options\" \"package\" SNIPPET-FLAG) + (\"options\" \"package\" SNIPPET-FLAG) SNIPPET-FLAG, when non-nil, indicates that this package is also needed when turning LaTeX snippets into images for inclusion into @@ -7302,7 +7302,7 @@ Optional arguments START and END can be used to limit the range." (defconst org-goto-help "Browse buffer copy, to find location or copy text.%s RET=jump to location C-g=quit and return to previous location -\[Up]/[Down]=next/prev headline TAB=cycle visibility [/] org-occur") +[Up]/[Down]=next/prev headline TAB=cycle visibility [/] org-occur") (defvar org-goto-start-pos) ; dynamically scoped parameter @@ -7682,7 +7682,7 @@ command." (re-search-forward org-outline-regexp-bol) (beginning-of-line 0)) (skip-chars-backward " \r\n") - (and (not (looking-back "^\*+" (line-beginning-position))) + (and (not (looking-back "^\\*+" (line-beginning-position))) (looking-at "[ \t]+") (replace-match "")) (unless (eobp) (forward-char 1)) (when (looking-at "^\\*") @@ -11389,7 +11389,7 @@ on the system \"/user@host:\"." (setq level (org-reduced-level (- (match-end 1) (match-beginning 1))) txt (org-link-display-format (match-string 4)) - txt (replace-regexp-in-string "\\( *\[[0-9]+/?[0-9]*%?\]\\)+$" "" txt) + txt (replace-regexp-in-string "\\( *[[0-9]+/?[0-9]*%?]\\)+$" "" txt) re (format org-complex-heading-regexp-format (regexp-quote (match-string 4)))) (when org-refile-use-outline-path @@ -16355,7 +16355,7 @@ While prompting, a calendar is popped up - you can also select the date with the mouse (button 1). The calendar shows a period of three months. To scroll it to other months, use the keys `>' and `<'. If you don't like the calendar, turn it off with - \(setq org-read-date-popup-calendar nil) + (setq org-read-date-popup-calendar nil) With optional argument TO-TIME, the date will immediately be converted to an internal time. @@ -17912,7 +17912,7 @@ If EXCLUDE-TMP is non-nil, ignore temporary buffers." ((eq predicate 'files) (lambda (b) (with-current-buffer b (derived-mode-p 'org-mode)))) ((eq predicate 'export) - (lambda (b) (string-match "\*Org .*Export" (buffer-name b)))) + (lambda (b) (string-match "\\*Org .*Export" (buffer-name b)))) ((eq predicate 'agenda) (lambda (b) (with-current-buffer b @@ -17921,7 +17921,7 @@ If EXCLUDE-TMP is non-nil, ignore temporary buffers." (member (file-truename bfn) agenda-files))))) (t (lambda (b) (with-current-buffer b (or (derived-mode-p 'org-mode) - (string-match "\*Org .*Export" + (string-match "\\*Org .*Export" (buffer-name b))))))))) (delq nil (mapcar @@ -23005,7 +23005,7 @@ no special treatment. In particular, a simple \\[universal-argument] prefix \ will just plainly yank the text as it is. -\[1] The test checks if the first non-white line is a heading +[1] The test checks if the first non-white line is a heading and if there are no other headings with fewer stars." (interactive "P") (org-yank-generic 'yank arg)) diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index fc4f574a4c4..2b2d92ee2fc 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -2598,7 +2598,7 @@ Bind `org-html-standalone-image-predicate' to constrain paragraph further. For example, to check for only captioned standalone images, set it to: - \(lambda (paragraph) (org-element-property :caption paragraph))" + (lambda (paragraph) (org-element-property :caption paragraph))" (let ((paragraph (case (org-element-type element) (paragraph element) (link (org-export-get-parent element))))) diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el index a77eaedb9a0..3da52243d30 100644 --- a/lisp/org/ox-icalendar.el +++ b/lisp/org/ox-icalendar.el @@ -447,7 +447,7 @@ or subject for the event." ;; characters with literal \n. (replace-regexp-in-string "[ \t]*\n" "\\n" - (replace-regexp-in-string "[\\,;]" "\\\&" s) + (replace-regexp-in-string "[\\,;]" "\\\\\\&" s) nil t))) (defun org-icalendar-fold-string (s) diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index cea02ff4548..51f7b17a8bf 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el @@ -212,9 +212,9 @@ If #+LATEX_CLASS is set in the buffer, use its value and the associated information. Here is the structure of each cell: - \(class-name + (class-name header-string - \(numbered-section . unnumbered-section) + (numbered-section . unnumbered-section) ...) The header string @@ -281,11 +281,11 @@ section string and will be replaced by the title of the section. Instead of a cons cell (numbered . unnumbered), you can also provide a list of 2 or 4 elements, - \(numbered-open numbered-close) + (numbered-open numbered-close) or - \(numbered-open numbered-close unnumbered-open unnumbered-close) + (numbered-open numbered-close unnumbered-open unnumbered-close) providing opening and closing strings for a LaTeX environment that should represent the document section. The opening clause @@ -591,18 +591,18 @@ The function should return the string to be exported. For example, the variable could be set to the following function in order to mimic default behavior: -\(defun org-latex-format-inlinetask \(todo type priority name tags contents\) +\(defun org-latex-format-inlinetask (todo type priority name tags contents) \"Format an inline task element for LaTeX export.\" - \(let ((full-title - \(concat - \(when todo - \(format \"\\\\textbf{\\\\textsf{\\\\textsc{%s}}} \" todo)) - \(when priority (format \"\\\\framebox{\\\\#%c} \" priority)) + (let ((full-title + (concat + (when todo + (format \"\\\\textbf{\\\\textsf{\\\\textsc{%s}}} \" todo)) + (when priority (format \"\\\\framebox{\\\\#%c} \" priority)) title - \(when tags - \(format \"\\\\hfill{}\\\\textsc{:%s:}\" - \(mapconcat \\='identity tags \":\"))))) - \(format (concat \"\\\\begin{center}\\n\" + (when tags + (format \"\\\\hfill{}\\\\textsc{:%s:}\" + (mapconcat \\='identity tags \":\"))))) + (format (concat \"\\\\begin{center}\\n\" \"\\\\fbox{\\n\" \"\\\\begin{minipage}[c]{.6\\\\textwidth}\\n\" \"%s\\n\\n\" @@ -626,21 +626,21 @@ listings package, and if you want to have color, the color package. Just add these to `org-latex-packages-alist', for example using customize, or with something like: - \(require \\='ox-latex) - \(add-to-list \\='org-latex-packages-alist \\='(\"\" \"listings\")) - \(add-to-list \\='org-latex-packages-alist \\='(\"\" \"color\")) + (require \\='ox-latex) + (add-to-list \\='org-latex-packages-alist \\='(\"\" \"listings\")) + (add-to-list \\='org-latex-packages-alist \\='(\"\" \"color\")) Alternatively, - \(setq org-latex-listings \\='minted) + (setq org-latex-listings \\='minted) causes source code to be exported using the minted package as opposed to listings. If you want to use minted, you need to add the minted package to `org-latex-packages-alist', for example using customize, or with - \(require \\='ox-latex) - \(add-to-list \\='org-latex-packages-alist \\='(\"\" \"minted\")) + (require \\='ox-latex) + (add-to-list \\='org-latex-packages-alist \\='(\"\" \"minted\")) In addition, it is necessary to install pygments \(http://pygments.org), and to configure the variable @@ -689,9 +689,9 @@ These options are supplied as a comma-separated list to the a list containing two strings: the name of the option, and the value. For example, - \(setq org-latex-listings-options + (setq org-latex-listings-options '((\"basicstyle\" \"\\\\small\") - \(\"keywordstyle\" \"\\\\color{black}\\\\bfseries\\\\underbar\"))) + (\"keywordstyle\" \"\\\\color{black}\\\\bfseries\\\\underbar\"))) will typeset the code in a small size font with underlined, bold black keywords. @@ -736,8 +736,8 @@ These options are supplied within square brackets in be a list containing two strings: the name of the option, and the value. For example, - \(setq org-latex-minted-options - '\((\"bgcolor\" \"bg\") \(\"frame\" \"lines\"))) + (setq org-latex-minted-options + '((\"bgcolor\" \"bg\") (\"frame\" \"lines\"))) will result in src blocks being exported with @@ -757,8 +757,8 @@ options will be applied to blocks of all languages." It is used during export of src blocks by the listings and minted latex packages. For example, - \(setq org-latex-custom-lang-environments - '\(\(python \"pythoncode\"\)\)\) + (setq org-latex-custom-lang-environments + '((python \"pythoncode\"))) would have the effect that if org encounters begin_src python during latex export it will output @@ -2876,8 +2876,8 @@ Return PDF file name or an error if it couldn't be produced." ;; Check for process failure. Provide collected errors if ;; possible. (if (not (file-exists-p pdffile)) - (error (concat (format "PDF file %s wasn't produced" pdffile) - (when errors (concat ": " errors)))) + (error "PDF file %s wasn't produced%s" pdffile + (if errors (concat ": " errors) "")) ;; Else remove log files, when specified, and signal end of ;; process to user, along with any error encountered. (when (and (not snippet) org-latex-remove-logfiles) diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el index 8b4ddc7e651..09ad1866c0e 100644 --- a/lisp/org/ox-man.el +++ b/lisp/org/ox-man.el @@ -206,8 +206,8 @@ in this list - but it does not hurt if it is present." It is used during export of src blocks by the listings and man packages. For example, - \(setq org-man-custom-lang-environments - '\(\(python \"pythoncode\"\)\)\) + (setq org-man-custom-lang-environments + '((python \"pythoncode\"))) would have the effect that if org encounters begin_src python during man export." @@ -1219,8 +1219,8 @@ Return PDF file name or an error if it couldn't be produced." ;; Check for process failure. Provide collected errors if ;; possible. (if (not (file-exists-p pdffile)) - (error (concat (format "PDF file %s wasn't produced" pdffile) - (when errors (concat ": " errors)))) + (error "PDF file %s wasn't produced%s" pdffile + (if errors (concat ": " errors) "")) ;; Else remove log files, when specified, and signal end of ;; process to user, along with any error encountered. (when org-man-remove-logfiles diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index a0281420317..9abda33f59d 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -231,13 +231,13 @@ standard Emacs.") (defvar org-odt-automatic-styles '() "Registry of automatic styles for various OBJECT-TYPEs. The variable has the following form: -\(\(OBJECT-TYPE-A - \(\(OBJECT-NAME-A.1 OBJECT-PROPS-A.1\) - \(OBJECT-NAME-A.2 OBJECT-PROPS-A.2\) ...\)\) - \(OBJECT-TYPE-B - \(\(OBJECT-NAME-B.1 OBJECT-PROPS-B.1\) - \(OBJECT-NAME-B.2 OBJECT-PROPS-B.2\) ...\)\) - ...\). + ((OBJECT-TYPE-A + ((OBJECT-NAME-A.1 OBJECT-PROPS-A.1) + (OBJECT-NAME-A.2 OBJECT-PROPS-A.2) ...)) + (OBJECT-TYPE-B + ((OBJECT-NAME-B.1 OBJECT-PROPS-B.1) + (OBJECT-NAME-B.2 OBJECT-PROPS-B.2) ...)) + ...). OBJECT-TYPEs could be \"Section\", \"Table\", \"Figure\" etc. OBJECT-PROPS is (typically) a plist created by passing @@ -292,7 +292,7 @@ according to the default face identified by the `htmlfontify'.") This is an alist where each element is of the form: - \(STYLE-NAME ATTACH-FMT REF-MODE REF-FMT) + (STYLE-NAME ATTACH-FMT REF-MODE REF-FMT) ATTACH-FMT controls how labels and captions are attached to an entity. It may contain following specifiers - %e and %c. %e is @@ -319,7 +319,7 @@ See also `org-odt-format-label'.") This is a list where each entry is of the form: - \(CATEGORY-HANDLE OD-VARIABLE LABEL-STYLE CATEGORY-NAME ENUMERATOR-PREDICATE) + (CATEGORY-HANDLE OD-VARIABLE LABEL-STYLE CATEGORY-NAME ENUMERATOR-PREDICATE) CATEGORY_HANDLE identifies the captionable entity in question. @@ -670,11 +670,11 @@ The default value simply returns the value of CONTENTS." "Function to format headline text. This function will be called with 5 arguments: -TODO the todo keyword \(string or nil\). -TODO-TYPE the type of todo \(symbol: `todo', `done', nil\) -PRIORITY the priority of the headline \(integer or nil\) -TEXT the main headline text \(string\). -TAGS the tags string, separated with colons \(string or nil\). +TODO the todo keyword (string or nil). +TODO-TYPE the type of todo (symbol: `todo', `done', nil) +PRIORITY the priority of the headline (integer or nil) +TEXT the main headline text (string). +TAGS the tags string, separated with colons (string or nil). The function result will be used as headline text." :group 'org-export-odt @@ -852,11 +852,11 @@ ON-OR-OFF := t | nil For example, with the following configuration \(setq org-odt-table-styles - '\(\(\"TableWithHeaderRowsAndColumns\" \"Custom\" - \(\(use-first-row-styles . t\) - \(use-first-column-styles . t\)\)\) - \(\"TableWithHeaderColumns\" \"Custom\" - \(\(use-first-column-styles . t\)\)\)\)\) + '((\"TableWithHeaderRowsAndColumns\" \"Custom\" + ((use-first-row-styles . t) + (use-first-column-styles . t))) + (\"TableWithHeaderColumns\" \"Custom\" + ((use-first-column-styles . t))))) 1. A table associated with \"TableWithHeaderRowsAndColumns\" style will use the following table-cell styles - @@ -4089,8 +4089,8 @@ contextual information." nil standard-output nil (cdr cmd))))) (or (zerop exitcode) (error (concat "Unable to create OpenDocument file." - (format " Zip failed with error (%s)" - err-string))))) + " Zip failed with error (%s)") + err-string))) cmds))) ;; Move the zip file from temporary work directory to ;; user-mandated location. diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index 08762fbbfdd..52d925adbf9 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el @@ -69,12 +69,12 @@ CDR of each element is in one of the following forms: alternating keys and values, specifying parameters for the publishing process. - \(:property value :property value ... ) + (:property value :property value ... ) 2. A meta-project definition, specifying of a list of sub-projects: - \(:components (\"project-1\" \"project-2\" ...)) + (:components (\"project-1\" \"project-2\" ...)) When the CDR of an element of org-publish-project-alist is in this second form, the elements of the list after `:components' diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index d5e650afb79..67daf6f979e 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el @@ -137,9 +137,9 @@ If nil it will default to `buffer-file-coding-system'." If #+TEXINFO_CLASS is set in the buffer, use its value and the associated information. Here is the structure of each cell: - \(class-name + (class-name header-string - \(numbered-section . unnumbered-section) + (numbered-section . unnumbered-section) ...) @@ -210,14 +210,14 @@ order to reproduce the default set-up: \(defun org-texinfo-format-headline (todo todo-type priority text tags) \"Default format function for a headline.\" - \(concat (when todo - \(format \"\\\\textbf{\\\\textsc{\\\\textsf{%s}}} \" todo)) - \(when priority - \(format \"\\\\framebox{\\\\#%c} \" priority)) + (concat (when todo + (format \"\\\\textbf{\\\\textsc{\\\\textsf{%s}}} \" todo)) + (when priority + (format \"\\\\framebox{\\\\#%c} \" priority)) text - \(when tags - \(format \"\\\\hfill{}\\\\textsc{%s}\" - \(mapconcat \\='identity tags \":\"))))" + (when tags + (format \"\\\\hfill{}\\\\textsc{%s}\" + (mapconcat \\='identity tags \":\"))))" :group 'org-export-texinfo :type 'function) @@ -337,18 +337,18 @@ The function should return the string to be exported. For example, the variable could be set to the following function in order to mimic default behavior: -\(defun org-texinfo-format-inlinetask \(todo type priority name tags contents\) +\(defun org-texinfo-format-inlinetask (todo type priority name tags contents) \"Format an inline task element for Texinfo export.\" - \(let ((full-title - \(concat - \(when todo - \(format \"@strong{%s} \" todo)) - \(when priority (format \"#%c \" priority)) + (let ((full-title + (concat + (when todo + (format \"@strong{%s} \" todo)) + (when priority (format \"#%c \" priority)) title - \(when tags - \(format \":%s:\" - \(mapconcat \\='identity tags \":\"))))) - \(format (concat \"@center %s\n\n\" + (when tags + (format \":%s:\" + (mapconcat \\='identity tags \":\"))))) + (format (concat \"@center %s\n\n\" \"%s\" \"\n\")) full-title contents))" @@ -1534,8 +1534,8 @@ Return INFO file name or an error if it couldn't be produced." ;; Check for process failure. Provide collected errors if ;; possible. (if (not (file-exists-p infofile)) - (error (concat (format "INFO file %s wasn't produced" infofile) - (when errors (concat ": " errors)))) + (error "INFO file %s wasn't produced%s" infofile + (if errors (concat ": " errors) "")) ;; Else remove log files, when specified, and signal end of ;; process to user, along with any error encountered. (when org-texinfo-remove-logfiles @@ -1578,7 +1578,7 @@ none." (re-search-forward "requires a sectioning" nil t)) (setq errors (concat errors " [invalid section command]"))) (when (save-excursion - (re-search-forward "\\[unexpected\]" nil t)) + (re-search-forward "\\[unexpected\ ]" nil t)) (setq errors (concat errors " [unexpected error]"))) (when (save-excursion (re-search-forward "misplaced " nil t)) diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 4e3e0ef9376..2fa03866281 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -777,7 +777,7 @@ is nil. You can also allow them through local buffer variables." This variable allows to provide shortcuts for export snippets. -For example, with a value of '\(\(\"h\" . \"html\"\)\), the +For example, with a value of \((\"h\" . \"html\")), the HTML back-end will recognize the contents of \"@@h:<b>@@\" as HTML code while every other back-end will ignore it." :group 'org-export-general @@ -849,7 +849,7 @@ output is restricted to body only, \"s\" when it is restricted to the current subtree, \"v\" when only visible elements are considered for export, \"f\" when publishing functions should be passed the FORCE argument and \"a\" when the export should be -asynchronous). Also, \[?] allows to switch back to standard +asynchronous). Also, [?] allows to switch back to standard mode." :group 'org-export-general :version "24.4" @@ -1095,19 +1095,19 @@ keywords are understood: or (?l \"Export to LaTeX\" - \(?p \"As PDF file\" org-latex-export-to-pdf) - \(?o \"As PDF file and open\" - \(lambda (a s v b) - \(if a (org-latex-export-to-pdf t s v b) - \(org-open-file - \(org-latex-export-to-pdf nil s v b))))))) + (?p \"As PDF file\" org-latex-export-to-pdf) + (?o \"As PDF file and open\" + (lambda (a s v b) + (if a (org-latex-export-to-pdf t s v b) + (org-open-file + (org-latex-export-to-pdf nil s v b))))))) or the following, which will be added to the previous sub-menu, (?l 1 - \((?B \"As TEX buffer (Beamer)\" org-beamer-export-as-latex) - \(?P \"As PDF file (Beamer)\" org-beamer-export-to-pdf))) + ((?B \"As TEX buffer (Beamer)\" org-beamer-export-as-latex) + (?P \"As PDF file (Beamer)\" org-beamer-export-to-pdf))) :options-alist @@ -1180,12 +1180,12 @@ keywords are understood: As an example, here is how one could define \"my-latex\" back-end as a variant of `latex' back-end with a custom template function: - \(org-export-define-derived-backend \\='my-latex \\='latex + (org-export-define-derived-backend \\='my-latex \\='latex :translate-alist \\='((template . my-latex-template-fun))) The back-end could then be called with, for example: - \(org-export-to-buffer \\='my-latex \"*Test my-latex*\")" + (org-export-to-buffer \\='my-latex \"*Test my-latex*\")" (declare (indent 2)) (let (blocks filters menu-entry options transcoders contents) (while (keywordp (car body)) @@ -1962,7 +1962,7 @@ DATA is the parse tree. OPTIONS is the plist holding export options. Return an alist whose key is a headline and value is its -associated numbering \(in the shape of a list of numbers\) or nil +associated numbering \(in the shape of a list of numbers) or nil for a footnotes section." (let ((numbering (make-vector org-export-max-depth 0))) (org-element-map data 'headline @@ -3314,7 +3314,7 @@ lines, include only those lines. Optional argument IND, when non-nil, is an integer specifying the global indentation of returned contents. Since its purpose is to allow an included file to stay in the same environment it was -created \(i.e. a list item), it doesn't apply past the first +created \(i.e., a list item), it doesn't apply past the first headline encountered. Optional argument MINLEVEL, when non-nil, is an integer @@ -3893,7 +3893,7 @@ PATH is the link path. DESC is its description." Optional argument is a set of RULES defining inline images. It is an alist where associations have the following shape: - \(TYPE . REGEXP) + (TYPE . REGEXP) Applying a rule means apply REGEXP against LINK's path when its type is TYPE. The function will return a non-nil value if any of @@ -3952,7 +3952,7 @@ Return value can be an object, an element, or nil: - If LINK path matches a target object (i.e. <<path>>) return it. - If LINK path exactly matches the name affiliated keyword - \(i.e. #+NAME: path) of an element, return that element. + (i.e. #+NAME: path) of an element, return that element. - If LINK path exactly matches any headline name, return that element. If more than one headline share that name, priority @@ -5586,10 +5586,10 @@ no argument. It is always called within the current process, from BUFFER, with point at its beginning. Export back-ends can use it to set a major mode there, e.g, - \(defun org-latex-export-as-latex - \(&optional async subtreep visible-only body-only ext-plist) - \(interactive) - \(org-export-to-buffer \\='latex \"*Org LATEX Export*\" + (defun org-latex-export-as-latex + (&optional async subtreep visible-only body-only ext-plist) + (interactive) + (org-export-to-buffer \\='latex \"*Org LATEX Export*\" async subtreep visible-only body-only ext-plist (lambda () (LaTeX-mode)))) This function returns BUFFER." @@ -5646,13 +5646,13 @@ argument and happens asynchronously when ASYNC is non-nil. It has to return a file name, or nil. Export back-ends can use this to send the output file through additional processing, e.g, - \(defun org-latex-export-to-latex - \(&optional async subtreep visible-only body-only ext-plist) - \(interactive) - \(let ((outfile (org-export-output-file-name \".tex\" subtreep))) - \(org-export-to-file \\='latex outfile + (defun org-latex-export-to-latex + (&optional async subtreep visible-only body-only ext-plist) + (interactive) + (let ((outfile (org-export-output-file-name \".tex\" subtreep))) + (org-export-to-file \\='latex outfile async subtreep visible-only body-only ext-plist - \(lambda (file) (org-latex-compile file))) + (lambda (file) (org-latex-compile file))) The function returns either a file name returned by POST-PROCESS, or FILE." @@ -5985,7 +5985,7 @@ is nil when this menu hasn't been selected yet. EXPERTP, when non-nil, triggers expert UI. In that case, no help buffer is provided, but indications about currently active -options are given in the prompt. Moreover, \[?] allows to switch +options are given in the prompt. Moreover, [?] allows to switch back to standard interface." (let* ((fontify-key (lambda (key &optional access-key) @@ -6037,8 +6037,8 @@ back to standard interface." (concat ;; Options are hard-coded. (format "[%s] Body only: %s [%s] Visible only: %s -\[%s] Export scope: %s [%s] Force publishing: %s -\[%s] Async export: %s\n\n" +[%s] Export scope: %s [%s] Force publishing: %s +[%s] Async export: %s\n\n" (funcall fontify-key "C-b" t) (funcall fontify-value (if (memq 'body options) "On " "Off")) diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 3da7267ca8e..3c9d87fa81e 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -989,7 +989,7 @@ Otherwise call the Doctor to parse preceding sentence." Put dialogue in buffer." (let (a (prompt (concat (doctor-make-string x) - " what \? ")) + " what ? ")) retval) (while (not retval) (while (not a) diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el index 2c68c40d893..a07a24d5195 100644 --- a/lisp/play/gametree.el +++ b/lisp/play/gametree.el @@ -324,7 +324,7 @@ This value is simply the outline heading level of the current line." (defun gametree-hack-file-layout () (save-excursion (goto-char (point-min)) - (if (looking-at "[^\n]*-\*-[^\n]*gametree-local-layout: \\([^;\n]*\\);") + (if (looking-at "[^\n]*-*-[^\n]*gametree-local-layout: \\([^;\n]*\\);") (progn (goto-char (match-beginning 1)) (delete-region (point) (match-end 1)) diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index 586d1d5d462..0f3b7586153 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el @@ -265,7 +265,7 @@ each one of its four blocks.") (define-key map [left] 'tetris-move-left) (define-key map [right] 'tetris-move-right) (define-key map [up] 'tetris-rotate-prev) - (define-key map [down] 'tetris-rotate-next) + (define-key map [down] 'tetris-move-down) map)) (defvar tetris-null-map @@ -524,6 +524,16 @@ Drops the shape one square, testing for collision." (setq tetris-pos-x (1- tetris-pos-x))) (tetris-draw-shape))) +(defun tetris-move-down () + "Move the shape one square to the bottom." + (interactive) + (unless tetris-paused + (tetris-erase-shape) + (setq tetris-pos-y (1+ tetris-pos-y)) + (if (tetris-test-shape) + (setq tetris-pos-y (1- tetris-pos-y))) + (tetris-draw-shape))) + (defun tetris-rotate-prev () "Rotate the shape clockwise." (interactive) diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 452f3b99742..529b691ee79 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -2682,7 +2682,7 @@ if INITIAL-POS is non-nil, moves point to INITIAL-POS before calculation." ;; "then" has to be included in the case of "select...then abort" ;; statements, since (goto-stmt-start) at the beginning of ;; the current function would leave the cursor on that position - ((looking-at "\\(\\(els\\)?if\\>\\)\\|then abort\\\>") + ((looking-at "\\(\\(els\\)?if\\>\\)\\|then abort\\>") (ada-get-indent-if orgpoint)) ;; ((looking-at "case\\>") @@ -5290,7 +5290,7 @@ for `ada-procedure-start-regexp'." (setq functype (buffer-substring (point) (progn (skip-chars-forward - "a-zA-Z0-9_\.") + "a-zA-Z0-9_.") (point)))))) ;; look for next non WS (cond diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index 816de12cbdb..0ea33c16878 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -420,7 +420,7 @@ As a special case, ${current} is replaced with the name of the current file, minus extension but with directory, and ${full_current} is replaced by the name including the extension." - (while (string-match "\\(-[^-\$IO]*[IO]\\)?\${\\([^}]+\\)}" cmd-string) + (while (string-match "\\(-[^-$IO]*[IO]\\)?${\\([^}]+\\)}" cmd-string) (let (value (name (match-string 2 cmd-string))) (cond @@ -1724,7 +1724,7 @@ Information is extracted from the ali file." (concat "^" (ada-line-of identlist) "." (ada-column-of identlist) "[ *]" (ada-name-of identlist) - "[{\[\(<= ]?\\(.*\\)$") bound t)) + "[{[(<= ]?\\(.*\\)$") bound t)) (if declaration-found (ada-set-on-declaration identlist t)) )) @@ -1756,7 +1756,7 @@ Information is extracted from the ali file." (concat "^[0-9]+.[0-9]+[ *]" (ada-name-of identlist) - "[ <{=\(\[]\\(.\\|\n\\.\\)*\\<" + "[ <{=([]\\(.\\|\n\\.\\)*\\<" (ada-line-of identlist) "[^0-9]" (ada-column-of identlist) "\\>") @@ -1779,7 +1779,7 @@ Information is extracted from the ali file." (forward-line -1) (beginning-of-line)) (unless (looking-at (concat "[0-9]+.[0-9]+[ *]" - (ada-name-of identlist) "[ <{=\(\[]")) + (ada-name-of identlist) "[ <{=([]")) (setq declaration-found nil)))) ;; Still no success ! The ali file must be too old, and we need to diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index d59948e6447..9cac400c27b 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -171,7 +171,7 @@ (let ((buffer-undo-list t) (inhibit-read-only t) ,@(unless (featurep 'xemacs) '((inhibit-point-motion-hooks t) deactivate-mark)) - before-change-functions after-change-functions + (inhibit-modification-hooks t) buffer-file-name buffer-file-truename) ,@body) (and (not ,modified) (buffer-modified-p) @@ -225,7 +225,7 @@ variable list\" near the end of the file, see (c++-mode "C++" "\"Cpp\"" "Cpp")) "List of ANTLR's supported languages. Each element in this list looks like - \(MAJOR-MODE MODELINE-STRING OPTION-VALUE...) + (MAJOR-MODE MODELINE-STRING OPTION-VALUE...) MAJOR-MODE, the major mode of the code in the grammar's actions, is the value of `antlr-language' if the first group in the string matched by @@ -243,7 +243,7 @@ also displayed in the mode line next to \"Antlr\"." (defcustom antlr-language-limit-n-regexp '(8192 . "language[ \t]*=[ \t]*\\(\"?[A-Z][A-Za-z_]*\"?\\)") "Used to set a reasonable value for `antlr-language'. -Looks like \(LIMIT \. REGEXP). Search for REGEXP from the beginning of +Looks like \(LIMIT . REGEXP). Search for REGEXP from the beginning of the buffer to LIMIT and use the first group in the matched string to set the language according to `antlr-language-alist'." :group 'antlr @@ -620,7 +620,7 @@ COUNT starts with 1. GEN-SEP is used to separate long variable values." (c++-mode ("%sTokenTypes.hpp") ("%s.cpp" "%s.hpp"))) "Language dependent formats which specify generated files. Each element in this list looks looks like - \(MAJOR-MODE (VOCAB-FILE-FORMAT...) (CLASS-FILE-FORMAT...)). + (MAJOR-MODE (VOCAB-FILE-FORMAT...) (CLASS-FILE-FORMAT...)). The element whose MAJOR-MODE is equal to `antlr-language' is used to specify the generated files which are language dependent. See variable @@ -779,7 +779,7 @@ fontification, see `antlr-font-lock-keywords-alist'. While calculating the decoration level for actions, `major-mode' is bound to `antlr-language'. For example, with value - \((java-mode \. 2) (c++-mode \. 0)) + ((java-mode . 2) (c++-mode . 0)) Java actions are fontified with level 2 and C++ actions are not fontified at all." :group 'antlr @@ -817,7 +817,7 @@ Do not change the value of this constant.") c++-font-lock-keywords-3)) "List of font-lock keywords for actions in the grammar. Each element in this list looks like - \(MAJOR-MODE KEYWORD...) + (MAJOR-MODE KEYWORD...) If `antlr-language' is equal to MAJOR-MODE, the KEYWORDs are the font-lock keywords according to `font-lock-defaults' used for the code @@ -1570,8 +1570,8 @@ Inserting an option with this command works as follows: 4. Ask user for confirmation if the given OPTION does not seem to be a valid option to insert into the current file. 5. Find a correct position to insert the option. - 6. Depending on the option, insert it the following way \(inserting an - option also means inserting the option section if necessary\): + 6. Depending on the option, insert it the following way (inserting an + option also means inserting the option section if necessary): - Insert the option and let user insert the value at point. - Read a value (with completion) from the minibuffer, using a previous value as initial contents, and insert option with value. @@ -1687,9 +1687,9 @@ Return \(LEVEL OPTION LOCATION)." (defun antlr-option-kind (requested) "Return level and location for option to insert near point. Call function `antlr-option-level' with argument REQUESTED. If the -result is nil, return \(REQUESTED \. error). If the result has the -non-nil value LEVEL, return \(LEVEL \. LOCATION) where LOCATION looks -like \(AREA \. PLACE), see `antlr-option-location'." +result is nil, return \(REQUESTED . error). If the result has the +non-nil value LEVEL, return \(LEVEL . LOCATION) where LOCATION looks +like \(AREA . PLACE), see `antlr-option-location'." (save-excursion (save-restriction (let ((min0 (point-min)) ; before `widen'! @@ -1845,7 +1845,7 @@ WARNING: this may alter `match-data'." (defun antlr-insert-option-do (level option old area pos) "Insert option into buffer at position POS. Insert option of level LEVEL and name OPTION. If OLD is non-nil, an -options area is already exists. If OLD looks like \(BEG \. END), the +options area is already exists. If OLD looks like \(BEG . END), the option already exists. Then, BEG is the start position of the option value, the position of the `=' or nil, and END is the end position of the option value or nil. @@ -2104,7 +2104,7 @@ Called in PHASE `before-input', see `antlr-options-alists'." (defun antlr-file-dependencies () "Return dependencies for grammar in current buffer. -The result looks like \(FILE \(CLASSES \. SUPERS) VOCABS \. LANGUAGE) +The result looks like \(FILE \(CLASSES . SUPERS) VOCABS . LANGUAGE) where CLASSES = ((CLASS . CLASS-EVOCAB) ...), SUPERS = ((SUPER . USE-EVOCAB-P) ...), and VOCABS = ((EVOCAB ...) . (IVOCAB ...)) @@ -2168,8 +2168,8 @@ its export vocabulary is used as an import vocabulary." (defun antlr-directory-dependencies (dirname) "Return dependencies for all grammar files in directory DIRNAME. -The result looks like \((CLASS-SPEC ...) \. \(FILE-DEP ...)) - where CLASS-SPEC = (CLASS (FILE \. EVOCAB) ...). +The result looks like \((CLASS-SPEC ...) . \(FILE-DEP ...)) + where CLASS-SPEC = (CLASS (FILE . EVOCAB) ...). FILE-DEP are the dependencies for each grammar file in DIRNAME, see `antlr-file-dependencies'. For each grammar class CLASS, FILE is a @@ -2220,7 +2220,7 @@ The result looks like \(OPTION WITH-UNKNOWN GLIB ...). OPTION is the complete \"-glib\" option. WITH-UNKNOWN is t if there is none or more than one grammar file for at least one super grammar. -Each GLIB looks like \(GRAMMAR-FILE \. EVOCAB). GRAMMAR-FILE is a file +Each GLIB looks like \(GRAMMAR-FILE . EVOCAB). GRAMMAR-FILE is a file in which a super-grammar is defined. EVOCAB is the value of the export vocabulary of the super-grammar or nil if it is not needed." ;; If the superclass is defined in the same file, that file will be included diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el index b0c4a6425bf..1e3cb8e16f9 100644 --- a/lisp/progmodes/cc-align.el +++ b/lisp/progmodes/cc-align.el @@ -1075,7 +1075,7 @@ Works with: brace-list-entry, brace-entry-open, statement, arglist-cont." (save-excursion (goto-char (c-langelem-pos langelem)) - (when (looking-at "\\s\(") + (when (looking-at "\\s(") (if (c-go-up-list-backward) (let ((pos (point))) (back-to-indentation) @@ -1093,24 +1093,24 @@ v beg of preceding constr v beg of preceding constr const char msg[] = if (!running) \"Some text.\"; error(\"Not running!\"); -#define X(A, B) \ #define X(A, B) \ -do { \ <-> do { \ <- c-lineup-cpp-define - printf (A, B); \ printf (A, B); \ +#define X(A, B) \\ #define X(A, B) \\ +do { \\ <-> do { \\ <- c-lineup-cpp-define + printf (A, B); \\ printf (A, B); \\ } while (0) } while (0) If `c-syntactic-indentation-in-macros' is non-nil, the function returns the relative indentation to the macro start line to allow accumulation with other offsets. E.g. in the following cases, cpp-define-intro is combined with the statement-block-intro that comes -from the \"do {\" that hangs on the \"#define\" line: +from the `do {' that hangs on the `#define' line: int dribble() { const char msg[] = if (!running) \"Some text.\"; error(\"Not running!\"); -#define X(A, B) do { \ #define X(A, B) do { \ - printf (A, B); \ <-> printf (A, B); \ <- c-lineup-cpp-define - this->refs++; \ this->refs++; \ +#define X(A, B) do { \\ #define X(A, B) do { \\ + printf (A, B); \\ <-> printf (A, B); \\ <- c-lineup-cpp-define + this->refs++; \\ this->refs++; \\ } while (0) <-> } while (0) <- c-lineup-cpp-define The relative indentation returned by `c-lineup-cpp-define' is zero and diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 337fdc800b1..077a18cc597 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -215,7 +215,7 @@ (defconst c-awk-neutrals*-re (concat "\\(" c-awk-neutral-re "\\)*")) ;; A (possibly empty) string of neutral characters (or character pairs). -(defconst c-awk-var-num-ket-re "[]\)0-9a-zA-Z_$.\x80-\xff]+") +(defconst c-awk-var-num-ket-re "[])0-9a-zA-Z_$.\x80-\xff]+") ;; Matches a char which is a constituent of a variable or number, or a ket ;; (i.e. closing bracKET), round or square. Assume that all characters \x80 to ;; \xff are "letters". @@ -227,7 +227,7 @@ ;; will only work when there won't be a preceding " or / before the sought / ;; to foul things up. (defconst c-awk-non-arith-op-bra-re - "[[\({&=:!><,?;'~|]") + "[[({&=:!><,?;'~|]") ;; Matches an opening BRAcket (of any sort), or any operator character ;; apart from +,-,/,*,%. For the purpose at hand (detecting a / which is a ;; regexp bracket) these arith ops are unnecessary and a pain, because of "++" @@ -266,7 +266,7 @@ ;; Matches optional whitespace followed by a "/" with string syntax (a matched ;; regexp delimiter). (defconst c-awk-space*-unclosed-regexp-/-re - (concat c-awk-escaped-nls*-with-space* "\\s\|")) + (concat c-awk-escaped-nls*-with-space* "\\s|")) ;; Matches optional whitespace followed by a "/" with string fence syntax (an ;; unmatched regexp delimiter). diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 0e249bd4212..32ce8c6a249 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -428,7 +428,7 @@ the function `delete-forward-p' is defined and returns non-nil, it deletes forward. Otherwise it deletes backward. Note: This is the way in XEmacs to choose the correct action for the -\[delete] key, whichever key that means. Other flavors don't use this +[delete] key, whichever key that means. Other flavors don't use this function to control that." (interactive "*P") (if (and (fboundp 'delete-forward-p) @@ -445,7 +445,7 @@ forward using `c-hungry-delete-forward'. Otherwise it deletes backward using `c-hungry-backspace'. Note: This is the way in XEmacs to choose the correct action for the -\[delete] key, whichever key that means. Other flavors don't use this +[delete] key, whichever key that means. Other flavors don't use this function to control that." (interactive) (if (and (fboundp 'delete-forward-p) @@ -1143,9 +1143,9 @@ numeric argument is supplied, or the point is inside a literal." (eq (char-before) ?<)) (progn (backward-char) - (looking-at "\\s\(")))) + (looking-at "\\s(")))) (and (eq (char-after) ?<) - (not (looking-at "\\s\(")) + (not (looking-at "\\s(")) (progn (c-backward-syntactic-ws) (c-simple-skip-symbol-backward)) (or (looking-at c-opt-<>-sexp-key) @@ -1380,13 +1380,13 @@ No indentation or other \"electric\" behavior is performed." ;; be the return type of a function, or the like. Exclude ;; this case. (c-syntactic-re-search-forward - (concat "[;=\(\[{]\\|\\(" + (concat "[;=([{]\\|\\(" c-opt-block-decls-with-vars-key "\\)") eo-block t t t) (match-beginning 1) ; Is there a "struct" etc., somewhere? (not (eq (char-before) ?_)) - (c-syntactic-re-search-forward "[;=\(\[{]" eo-block t t t) + (c-syntactic-re-search-forward "[;=([{]" eo-block t t t) (eq (char-before) ?\{) bod))))) @@ -4455,7 +4455,7 @@ is in situations like the following: char description[] = \"\\ A very long description of something that you want to fill to make -nicely formatted output.\"\; +nicely formatted output.\"; If point is in any other situation, i.e. in normal code, do nothing. diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 0422ca0b028..6bd58159fce 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -500,10 +500,10 @@ even if the user undoes the command which set them. This macro should ALWAYS be placed around \"temporary\" internal buffer changes \(like adding a newline to calculate a text-property then -deleting it again\), so that the user never sees them on his +deleting it again), so that the user never sees them on his `buffer-undo-list'. See also `c-tentative-buffer-changes'. -However, any user-visible changes to the buffer \(like auto-newlines\) +However, any user-visible changes to the buffer \(like auto-newlines) must not be within a `c-save-buffer-state', since the user then wouldn't be able to undo them. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 82f0d722d03..6382b145211 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1060,7 +1060,7 @@ comment at the start of cc-engine.el for more info." (save-excursion (c-forward-sexp) (point))) ;; Just gone back over some paren block? - ((looking-at "\\s\(") + ((looking-at "\\s(") (save-excursion (goto-char (1+ (c-down-list-backward before-sws-pos))) @@ -1233,7 +1233,7 @@ The variable `c-maybe-labelp' is set to the position of the first `:' that might start a label (i.e. not part of `::' and not preceded by `?'). If a single `?' is found, then `c-maybe-labelp' is cleared. -For AWK, a statement which is terminated by an EOL (not a \; or a }) is +For AWK, a statement which is terminated by an EOL (not a ; or a }) is regarded as having a \"virtual semicolon\" immediately after the last token on the line. If this virtual semicolon is _at_ from, the function recognizes it. @@ -3792,8 +3792,8 @@ comment at the start of cc-engine.el for more info." (defconst c-jump-syntax-balanced (if (memq 'gen-string-delim c-emacs-features) - "\\w\\|\\s_\\|\\s\(\\|\\s\)\\|\\s\"\\|\\s|" - "\\w\\|\\s_\\|\\s\(\\|\\s\)\\|\\s\"")) + "\\w\\|\\s_\\|\\s(\\|\\s)\\|\\s\"\\|\\s|" + "\\w\\|\\s_\\|\\s(\\|\\s)\\|\\s\"")) (defconst c-jump-syntax-unbalanced (if (memq 'gen-string-delim c-emacs-features) @@ -3960,7 +3960,7 @@ See `c-forward-token-2' for details." tokens like \"==\" as single tokens, i.e. all sequences of symbol characters are jumped over character by character. This function is for compatibility only; it's only a wrapper over `c-forward-token-2'." - (let ((c-nonsymbol-token-regexp "\\s.\\|\\s\(\\|\\s\)")) + (let ((c-nonsymbol-token-regexp "\\s.")) (c-forward-token-2 count balanced limit))) (defun c-backward-token-1 (&optional count balanced limit) @@ -3968,7 +3968,7 @@ for compatibility only; it's only a wrapper over `c-forward-token-2'." tokens like \"==\" as single tokens, i.e. all sequences of symbol characters are jumped over character by character. This function is for compatibility only; it's only a wrapper over `c-backward-token-2'." - (let ((c-nonsymbol-token-regexp "\\s.\\|\\s\(\\|\\s\)")) + (let ((c-nonsymbol-token-regexp "\\s.")) (c-backward-token-2 count balanced limit))) @@ -7124,7 +7124,7 @@ comment at the start of cc-engine.el for more info." (setq paren-depth (1- paren-depth)) (forward-char) t) - (when (if (save-match-data (looking-at "\\s\(")) + (when (if (save-match-data (looking-at "\\s(")) (c-safe (c-forward-sexp 1) t) (goto-char (match-end 1)) t) @@ -7198,7 +7198,7 @@ comment at the start of cc-engine.el for more info." (setq at-decl-end (looking-at (cond ((eq context '<>) "[,>]") - (context "[,\)]") + (context "[,)]") (t "[,;]")))) ;; Now we've collected info about various characteristics of @@ -7522,7 +7522,7 @@ comment at the start of cc-engine.el for more info." ;; The closing paren should follow. (progn (c-forward-syntactic-ws) - (looking-at "\\s\)")) + (looking-at "\\s)")) ;; There should be a primary expression after it. (let (pos) @@ -7919,7 +7919,7 @@ comment at the start of cc-engine.el for more info." (catch 'break ;; Look for ": superclass-name" or "( category-name )". - (when (looking-at "[:\(]") + (when (looking-at "[:(]") (setq start-char (char-after)) (forward-char) (c-forward-syntactic-ws) @@ -8434,7 +8434,7 @@ comment at the start of cc-engine.el for more info." ;; Check for `c-opt-block-decls-with-vars-key' ;; before the first paren. (c-syntactic-re-search-forward - (concat "[;=\(\[{]\\|\\(" + (concat "[;=([{]\\|\\(" c-opt-block-decls-with-vars-key "\\)") lim t t t) @@ -8442,7 +8442,7 @@ comment at the start of cc-engine.el for more info." (not (eq (char-before) ?_)) ;; Check that the first following paren is ;; the block. - (c-syntactic-re-search-forward "[;=\(\[{]" + (c-syntactic-re-search-forward "[;=([{]" lim t t t) (eq (char-before) ?{))))))) ;; The declaration doesn't have any of the @@ -8961,7 +8961,7 @@ comment at the start of cc-engine.el for more info." (> (point) closest-lim)) (not (bobp)) (progn (backward-char) - (looking-at "[\]\).]\\|\\w\\|\\s_")) + (looking-at "[]).]\\|\\w\\|\\s_")) (c-safe (forward-char) (goto-char (scan-sexps (point) -1)))) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index f05d6a06595..ad112d720d8 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -575,10 +575,10 @@ stuff. Used on level 1 and higher." c-symbol-key) "\\)" (concat "\\(" ; 2 + ncle + nsws + c-sym-key ;; Macro with arguments - a "function". - "\\(\(\\)" ; 3 + ncle + nsws + c-sym-key + "\\((\\)" ; 3 + ncle + nsws + c-sym-key "\\|" ;; Macro without arguments - a "variable". - "\\([^\(]\\|$\\)" + "\\([^(]\\|$\\)" "\\)")) `((if (match-beginning ,(+ 3 ncle-depth nsws-depth @@ -1082,7 +1082,7 @@ casts and declarations are fontified. Used on level 2 and higher." ;; Search syntactically to the end of the declarator (";", ;; ",", a closing paren, eob etc) or to the beginning of an - ;; initializer or function prototype ("=" or "\\s\("). + ;; initializer or function prototype ("=" or "\\s("). ;; Note that square brackets are now not also treated as ;; initializers, since this broke when there were also ;; initializing brace lists. @@ -1867,7 +1867,7 @@ higher." "\\)\\>" ;; Disallow various common punctuation chars that can't come ;; before the '{' of the enum list, to avoid searching too far. - "[^\]\[{}();/#=]*" + "[^][{}();/#=]*" "{") '((c-font-lock-declarators limit t nil) (save-match-data @@ -2112,7 +2112,7 @@ need for `c-font-lock-extra-types'.") (unless (looking-at (cc-eval-when-compile (concat (c-lang-const c-symbol-start c++) - "\\|[*:\)\[]"))) + "\\|[*:)[]"))) ;; There's something after the would-be type that ;; can't be there, so this is a placement arglist. (setq expr1-res nil))) @@ -2122,7 +2122,7 @@ need for `c-font-lock-extra-types'.") (unless (looking-at (cc-eval-when-compile (concat (c-lang-const c-symbol-start c++) - "\\|[*:\)\[]"))) + "\\|[*:)[]"))) ;; There's something after the would-be type that can't ;; be there, so this is an initialization expression. (setq expr2-res nil)) @@ -2675,7 +2675,7 @@ need for `pike-font-lock-extra-types'.") nil) (defconst autodoc-font-lock-doc-comments - `(("@\\(\\w+{\\|\\[\\([^\]@\n\r]\\|@@\\)*\\]\\|[@}]\\|$\\)" + `(("@\\(\\w+{\\|\\[\\([^]@\n\r]\\|@@\\)*\\]\\|[@}]\\|$\\)" ;; In-text markup. 0 ,c-doc-markup-face-name prepend nil) (autodoc-font-lock-line-markup) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index a1e26b9fcc4..7cda5ceaf1d 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -870,7 +870,7 @@ definition, or nil if the language doesn't have any." t (if (c-lang-const c-opt-cpp-macro-define) (concat (c-lang-const c-opt-cpp-prefix) (c-lang-const c-opt-cpp-macro-define) - "[ \t]+\\(\\(\\sw\\|_\\)+\\)\\(\([^\)]*\)\\)?" + "[ \t]+\\(\\(\\sw\\|_\\)+\\)\\(([^)]*)\\)?" ;; ^ ^ #defined name "\\([ \t]\\|\\\\\n\\)*"))) (c-lang-defvar c-opt-cpp-macro-define-start @@ -1190,7 +1190,7 @@ operators." t (c-make-keywords-re nil (c-filter-ops (c-lang-const c-all-op-syntax-tokens) t - "\\`\\(\\s.\\|\\s\(\\|\\s\)\\)+\\'"))) + "\\`\\(\\s.\\)+\\'"))) (c-lang-defvar c-nonsymbol-token-regexp (c-lang-const c-nonsymbol-token-regexp)) @@ -1694,7 +1694,7 @@ be a subset of `c-primitive-type-kwds'." "strong")) (c-lang-defconst c-typedef-kwds - "Prefix keyword\(s\) like \"typedef\" which make a type declaration out + "Prefix keyword(s) like \"typedef\" which make a type declaration out of a variable declaration." t '("typedef") (awk idl java) nil) @@ -2202,7 +2202,7 @@ regexp if `c-colon-type-list-kwds' isn't nil." ;; before the ":" that starts the inherit list after "class" ;; or "struct" in C++. (Also used as default for other ;; languages.) - "[^\]\[{}();,/#=:]*:")) + "[^][{}();,/#=:]*:")) (c-lang-defvar c-colon-type-list-re (c-lang-const c-colon-type-list-re)) (c-lang-defconst c-paren-nontype-kwds @@ -2366,7 +2366,7 @@ nevertheless contains a list separated with `;' and not `,'." (c-lang-defvar c-opt-asm-stmt-key (c-lang-const c-opt-asm-stmt-key)) (c-lang-defconst c-case-kwds - "The keyword\(s) which introduce a \"case\" like construct. + "The keyword(s) which introduce a \"case\" like construct. This construct is \"<keyword> <expression> :\"." t '("case") awk nil) @@ -2729,25 +2729,25 @@ more info." ;; more quickly. We match ")" in C for K&R region declarations, and ;; in all languages except Java for when a cpp macro definition ;; begins with a declaration. - t "\\([\{\}\(\);,]+\\)" - java "\\([\{\}\(;,<]+\\)" + t "\\([{}();,]+\\)" + java "\\([{}(;,<]+\\)" ;; Match "<" in C++ to get the first argument in a template arglist. ;; In that case there's an additional check in `c-find-decl-spots' ;; that it got open paren syntax. Match ":" to aid in picking up ;; "public:", etc. This involves additional checks in ;; `c-find-decl-prefix-search' to prevent a match of identifiers ;; or labels. - c++ "\\([\{\}\(\);:,<]+\\)" + c++ "\\([{}();:,<]+\\)" ;; Additionally match the protection directives in Objective-C. ;; Note that this doesn't cope with the longer directives, which we ;; would have to match from start to end since they don't end with ;; any easily recognized characters. - objc (concat "\\([\{\}\(\);,]+\\|" + objc (concat "\\([{}();,]+\\|" (c-make-keywords-re nil (c-lang-const c-protection-kwds)) "\\)") ;; Pike is like C but we also match "[" for multiple value ;; assignments and type casts. - pike "\\([\{\}\(\)\[;,]+\\)") + pike "\\([{}()[;,]+\\)") (c-lang-defvar c-decl-prefix-re (c-lang-const c-decl-prefix-re) 'dont-doc) @@ -2792,7 +2792,7 @@ constructs." ;; languages without casts. t (c-filter-ops (c-lang-const c-operators) '(prefix) - "\\`\\s\(\\'" + "\\`\\s(\\'" (lambda (op) (elt op 0)))) (c-lang-defvar c-cast-parens (c-lang-const c-cast-parens)) @@ -2875,13 +2875,13 @@ Identifier syntax is in effect when this is matched \(see ;; Check that there's no "=" afterwards to avoid matching tokens ;; like "*=". (c objc) (concat "\\(" - "[*\(]" + "[*(]" "\\|" (c-lang-const c-type-decl-prefix-key) "\\)" "\\([^=]\\|$\\)") c++ (concat "\\(" - "[*\(&]" + "[*(&]" "\\|" (c-lang-const c-type-decl-prefix-key) "\\|" @@ -2909,13 +2909,13 @@ is in effect when this is matched (see `c-identifier-syntax-table')." ;; Default to a regexp that matches `c-type-modifier-kwds' and a ;; function argument list parenthesis. t (if (c-lang-const c-type-modifier-kwds) - (concat "\\(\(\\|" + (concat "\\((\\|" (regexp-opt (c-lang-const c-type-modifier-kwds) t) "\\>" "\\)") - "\\(\(\\)") + "\\((\\)") (c c++ objc) (concat "\\(" - "[\)\[\(]" + "[)[(]" (if (c-lang-const c-type-modifier-kwds) (concat "\\|" @@ -2926,8 +2926,8 @@ is in effect when this is matched (see `c-identifier-syntax-table')." "\\>") "") "\\)") - java "\\([\[\(\)]\\)" - idl "\\([\[\(]\\)") + java "\\([[()]\\)" + idl "\\([[(]\\)") (c-lang-defvar c-type-decl-suffix-key (c-lang-const c-type-decl-suffix-key) 'dont-doc) @@ -3111,7 +3111,7 @@ i.e. compound statements surrounded by parentheses inside expressions." t (if (c-lang-const c-opt-<>-arglist-start) (concat "\\(" (c-lang-const c-opt-<>-arglist-start) - "\\)\\|\\s\)"))) + "\\)\\|\\s)"))) (c-lang-defvar c-opt-<>-arglist-start-in-paren (c-lang-const c-opt-<>-arglist-start-in-paren)) @@ -3168,7 +3168,7 @@ i.e. before \":\". Only used if `c-recognize-colon-labels' is set." ;; Also check for open parens in C++, to catch member init lists in ;; constructors. We normally allow it so that macros with arguments ;; work in labels. - c++ (concat "\\s\(\\|\"\\|" (c-lang-const c-nonlabel-token-key))) + c++ (concat "\\s(\\|\"\\|" (c-lang-const c-nonlabel-token-key))) (c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key)) (c-lang-defconst c-nonlabel-token-2-key @@ -3216,7 +3216,7 @@ way." "\\([+-]\\)" (c-lang-const c-simple-ws) "*" (concat "\\(" ; Return type. - "([^\)]*)" + "([^)]*)" (c-lang-const c-simple-ws) "*" "\\)?") "\\(" (c-lang-const c-symbol-key) "\\)")) @@ -3304,10 +3304,9 @@ accomplish that conveniently." (setq source-eval t) (let ((init ',(append (cdr c-emacs-variable-inits) (cdr c-lang-variable-inits)))) - (while init - (setq current-var (caar init)) - (set (caar init) (eval (cadar init))) - (setq init (cdr init))))) + (dolist (var-init init) + (setq current-var (car var-init)) + (set (car var-init) (eval (cadr var-init)))))) (error (if current-var @@ -3333,10 +3332,9 @@ accomplish that conveniently." (c-make-emacs-variables-local) (condition-case err - (while init - (setq current-var (caar init)) - (set (caar init) (eval (cadar init))) - (setq init (cdr init))) + (dolist (var-init init) + (setq current-var (car var-init)) + (set (car var-init) (eval (cadr var-init)))) (error (if current-var diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 97491e4d1d7..5c68de4b057 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1265,7 +1265,7 @@ Note that the style variables are always made local to the buffer." ;; ;; ;; void myfunc(T* p) {} - ;; + ;; ;; Type a space in the first blank line, and the fontification of the next ;; line was fouled up by context fontification. (let (new-beg new-end new-region case-fold-search @@ -1455,7 +1455,8 @@ This function is called from `c-common-init', once per mode initialization." ;;;###autoload (define-derived-mode c-mode prog-mode "C" - "Major mode for editing K&R and ANSI C code. + "Major mode for editing C code. + To submit a problem report, enter `\\[c-submit-bug-report]' from a c-mode buffer. This automatically sets up a mail buffer with version information already added. You just need to add a description of the diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index da36647f2cd..9afece9e30b 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -277,7 +277,7 @@ nil." If t, hitting TAB always just indents the current line. If nil, hitting TAB indents the current line if point is at the left margin or in the line's indentation, otherwise it inserts a `real' tab character \(see -note\). If some other value (not nil or t), then tab is inserted only +note). If some other value \(not nil or t), then tab is inserted only within literals \(comments and strings), but the line is always reindented. diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 96bb8d3a112..78c8d94576b 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -1005,12 +1005,12 @@ Intended as the value of `indent-line-function'." (point)))) (let ((paragraph-start ;; Include start of parenthesized block. - "\f\\|[ \t]*$\\|.*\(") + "\f\\|[ \t]*$\\|.*(") (paragraph-separate ;; Include action and class lines, start and end of ;; bracketed blocks and end of parenthesized blocks to ;; avoid including these in fill. This isn't ideal. - "[ \t\f]*$\\|.*#\\|.*[\){}]\\|\\s-*[[:alpha:]_().|!]+:") + "[ \t\f]*$\\|.*#\\|.*[){}]\\|\\s-*[[:alpha:]_().|!]+:") fill-paragraph-function) (fill-paragraph justify)) t)) diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 005e71a825e..0f5b1bb8c6a 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el @@ -390,7 +390,7 @@ Optional arg DISPLAY non-nil means show messages in the echo area." ;; the way of font-lock, highlighting etc. (insert (format - "/* Preprocessor terminated with status %s\n\n Messages from '%s\':\n\n" + "/* Preprocessor terminated with status %s\n\n Messages from '%s':\n\n" exit-status cppcommand)) (goto-char (+ (point) (nth 1 (insert-file-contents tempname)))) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a6e9ed8889a..9cb367aa633 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -167,7 +167,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (cucumber "\\(?:^cucumber\\(?: -p [^[:space:]]+\\)?\\|#\\)\ -\\(?: \\)\\([^\(].*\\):\\([1-9][0-9]*\\)" 1 2) +\\(?: \\)\\([^(].*\\):\\([1-9][0-9]*\\)" 1 2) (msft ;; Must be before edg-1, so that MSVC's longer messages are @@ -230,7 +230,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) 1 2 3 (4 . 5)) (ruby-Test::Unit - "^[\t ]*\\[\\([^\(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2) + "^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2) (gnu ;; The first line matches the program name for @@ -377,7 +377,7 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" 3 4 5 (1 . 2)) (sun-ada - "^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., \(-]" 1 2 3) + "^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., (-]" 1 2 3) (watcom "^[ \t]*\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)): ?\ @@ -477,7 +477,29 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" ;; "^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) " 1 2 3) - (guile-file "^In \\(.+\\):\n" 1) + + ;; Guile compilation yields file-headers in the following format: + ;; + ;; In sourcefile.scm: + ;; + ;; We need to catch those, but we also need to be aware that Emacs + ;; byte-compilation yields compiler headers in similar form of + ;; those: + ;; + ;; In toplevel form: + ;; In end of data: + ;; + ;; We want to catch the Guile file-headers but not the Emacs + ;; byte-compilation headers, because that will cause next-error + ;; and prev-error to break, because the files "toplevel form" and + ;; "end of data" does not exist. + ;; + ;; To differentiate between these two cases, we require that the + ;; file-match must always contain an extension. + ;; + ;; We should also only treat this as "info", not "error", because + ;; we do not know what lines will follow. + (guile-file "^In \\(.+\\..+\\):\n" 1 nil nil 0) (guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2) ) "Alist of values for `compilation-error-regexp-alist'.") diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index b8ba170a246..ab3aa7f993a 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -395,12 +395,12 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space', :type 'boolean :group 'cperl-indentation-details) -(defcustom cperl-vc-sccs-header '("($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;") +(defcustom cperl-vc-sccs-header '("($sccs) = ('%W\ %' =~ /(\\d+(\\.\\d+)+)/) ;") "*Special version of `vc-sccs-header' that is used in CPerl mode buffers." :type '(repeat string) :group 'cperl) -(defcustom cperl-vc-rcs-header '("($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/);") +(defcustom cperl-vc-rcs-header '("($rcs) = (' $Id\ $ ' =~ /(\\d+(\\.\\d+)+)/);") "*Special version of `vc-rcs-header' that is used in CPerl mode buffers." :type '(repeat string) :group 'cperl) @@ -793,7 +793,7 @@ corrected problems are: POD sections, here-documents, regexps. The operations are: highlighting, indentation, electric keywords, electric braces. -This may be confusing, since the regexp s#//#/#\; may be highlighted +This may be confusing, since the regexp s#//#/#; may be highlighted as a comment, but it will be recognized as a regexp by the indentation code. Or the opposite case, when a POD section is highlighted, but may break the indentation of the following code (though indentation @@ -3672,7 +3672,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', is-REx is-x-REx REx-subgr-start REx-subgr-end was-subgr i2 hairy-RE (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t) (modified (buffer-modified-p)) overshoot is-o-REx name - (after-change-functions nil) + (inhibit-modification-hooks t) (cperl-font-locking t) (use-syntax-state (and cperl-syntax-state (>= min (car cperl-syntax-state)))) @@ -4585,13 +4585,13 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', ((eq (char-after b) ?\: ) "\\\\*\\[\\\\:\\^?\\sw+\\\\:]") ((eq (char-after b) ?^ ) - "\\\\*\\[:\\(\\\\\\^\\)?\\sw+:\]") + "\\\\*\\[:\\(\\\\\\^\\)?\\sw+:]") ((eq (char-syntax (char-after b)) ?w) (concat "\\\\*\\[:\\(\\\\\\^\\)?\\(\\\\" (char-to-string (char-after b)) - "\\|\\sw\\)+:\]")) + "\\|\\sw\\)+:]")) (t "\\\\*\\[:\\^?\\sw*:]"))) (goto-char REx-subgr-end) (cperl-highlight-charclass @@ -5043,7 +5043,7 @@ conditional/loop constructs." (goto-char top)) (if (looking-at ; Try Plan C: continuation block (concat cperl-maybe-white-and-comment-rex - "\\<\\(else\\|elsif\|continue\\)\\>")) + "\\<\\(else\\|elsif\\|continue\\)\\>")) (progn (goto-char (match-end 0)) (setq tmp-end (point-at-eol))) @@ -5706,7 +5706,7 @@ indentation and initial hashes. Behaves usually outside of comment." "redo" "return" "local" "exec" "sub" "do" "dump" "use" "our" "require" "package" "eval" "my" "BEGIN" "END" "CHECK" "INIT") "\\|") ; Flow control - "\\)\\>") 2) ; was "\\)[ \n\t;():,\|&]" + "\\)\\>") 2) ; was "\\)[ \n\t;():,|&]" ; In what follows we use `type' style ; for overwritable builtins (list @@ -5850,7 +5850,7 @@ indentation and initial hashes. Behaves usually outside of comment." (1 font-lock-string-face t)))) (t '("\\([]}\\\\%@>*&]\\|\\$[a-zA-Z0-9_:]*\\)[ \t]*{[ \t]*\\(-?[a-zA-Z0-9_:]+\\)[ \t]*}" 2 font-lock-string-face t))) - '("[\[ \t{,(]\\(-?[a-zA-Z0-9_:]+\\)[ \t]*=>" 1 + '("[[ \t{,(]\\(-?[a-zA-Z0-9_:]+\\)[ \t]*=>" 1 font-lock-string-face t) '("^[ \t]*\\([a-zA-Z0-9_]+[ \t]*:\\)[ \t]*\\($\\|{\\|\\<\\(until\\|while\\|for\\(each\\)?\\|do\\)\\>\\)" 1 font-lock-constant-face) ; labels @@ -5935,7 +5935,7 @@ indentation and initial hashes. Behaves usually outside of comment." (and (string< "21.1.10" emacs-version) (string< emacs-version "21.1.2"))) '( - ("\\(\\([@%]\\|\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1 + ("\\(\\([@%]\\|\\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1 (if (eq (char-after (match-beginning 2)) ?%) 'cperl-hash-face 'cperl-array-face) @@ -8882,7 +8882,7 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." (defun cperl-font-lock-unfontify-region-function (beg end) (let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-point-motion-hooks t) - before-change-functions after-change-functions + (inhibit-modification-hooks t) deactivate-mark buffer-file-name buffer-file-truename) (remove-text-properties beg end '(face nil)) (if (and (not modified) (buffer-modified-p)) diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 4c997bdd4d0..8c8bef06ecc 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -259,12 +259,12 @@ never indented." :group 'dcl) (defcustom dcl-imenu-generic-expression - `((nil "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):[ \t]+SUBROUTINE\\b" 1) + `((nil "^\\$[ \t]*\\([A-Za-z0-9_$]+\\):[ \t]+SUBROUTINE\\b" 1) (,dcl-imenu-label-labels - "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):\\([ \t]\\|$\\)" 1) - (,dcl-imenu-label-goto "\\s-GOTO[ \t]+\\([A-Za-z0-9_\$]+\\)" 1) - (,dcl-imenu-label-gosub "\\s-GOSUB[ \t]+\\([A-Za-z0-9_\$]+\\)" 1) - (,dcl-imenu-label-call "\\s-CALL[ \t]+\\([A-Za-z0-9_\$]+\\)" 1)) + "^\\$[ \t]*\\([A-Za-z0-9_$]+\\):\\([ \t]\\|$\\)" 1) + (,dcl-imenu-label-goto "\\s-GOTO[ \t]+\\([A-Za-z0-9_$]+\\)" 1) + (,dcl-imenu-label-gosub "\\s-GOSUB[ \t]+\\([A-Za-z0-9_$]+\\)" 1) + (,dcl-imenu-label-call "\\s-CALL[ \t]+\\([A-Za-z0-9_$]+\\)" 1)) "Default imenu generic expression for DCL. The default includes SUBROUTINE labels in the main listing and @@ -369,7 +369,7 @@ followed by space or tab." (defcustom dcl-label-r - "[a-zA-Z0-9_\$]*:\\([ \t!]\\|$\\)" + "[a-zA-Z0-9_$]*:\\([ \t!]\\|$\\)" "Regular expression describing a label. A label is a name followed by a colon followed by white-space or end-of-line." :type 'regexp @@ -453,12 +453,12 @@ Preloaded with all known option names from dcl-option-alist") ;; above. This version won't find GOTOs in comments or text strings. ;(defvar dcl-imenu-generic-expression ; (` -; ((nil "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):[ \t]+SUBROUTINE\\b" 1) -; ("Labels" "^\\$[ \t]*\\([A-Za-z0-9_\$]+\\):\\([ \t]\\|$\\)" 1) -; ("GOTO" (, (concat dcl-cmd-r "GOTO[ \t]+\\([A-Za-z0-9_\$]+\\)")) 5) +; ((nil "^\\$[ \t]*\\([A-Za-z0-9_$]+\\):[ \t]+SUBROUTINE\\b" 1) +; ("Labels" "^\\$[ \t]*\\([A-Za-z0-9_$]+\\):\\([ \t]\\|$\\)" 1) +; ("GOTO" (, (concat dcl-cmd-r "GOTO[ \t]+\\([A-Za-z0-9_$]+\\)")) 5) ; ("GOSUB" (, (concat dcl-cmd-r -; "GOSUB[ \t]+\\([A-Za-z0-9_\$]+\\)")) 5) -; ("CALL" (, (concat dcl-cmd-r "CALL[ \t]+\\([A-Za-z0-9_\$]+\\)")) 5))) +; "GOSUB[ \t]+\\([A-Za-z0-9_$]+\\)")) 5) +; ("CALL" (, (concat dcl-cmd-r "CALL[ \t]+\\([A-Za-z0-9_$]+\\)")) 5))) ; "*Default imenu generic expression for DCL. ;The default includes SUBROUTINE labels in the main listing and diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index c694bbd5832..6d8e90c2d6a 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -1899,7 +1899,7 @@ It's only used when `ebnf-syntax' is `iso-ebnf'." :group 'ebnf-syntactic) -(defcustom ebnf-file-suffix-regexp "\.[Bb][Nn][Ff]$" +(defcustom ebnf-file-suffix-regexp "\\.[Bb][Nn][Ff]$" "Specify file name suffix that contains EBNF. See `ebnf-eps-directory' command." @@ -2731,7 +2731,7 @@ See also `ebnf-syntax-buffer'." (ebnf-syntax . 'ebnf) (ebnf-iso-alternative-p . nil) (ebnf-iso-normalize-p . nil) - (ebnf-file-suffix-regexp . "\.[Bb][Nn][Ff]$") + (ebnf-file-suffix-regexp . "\\.[Bb][Nn][Ff]$") (ebnf-eps-prefix . "ebnf--") (ebnf-eps-header-font . '(11 Helvetica "Black" "White" bold)) (ebnf-eps-header . nil) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 1ea9f174775..bdc304e0aa5 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -632,16 +632,16 @@ otherwise build the summary from TYPE and SYMBOL." (xref-make-elisp-location symbol type file))) (defvar elisp-xref-find-def-functions nil - "List of functions to be run from ‘elisp--xref-find-definitions’ to add additional xrefs. + "List of functions to be run from `elisp--xref-find-definitions' to add additional xrefs. Called with one arg; the symbol whose definition is desired. Each function should return a list of xrefs, or nil; the first non-nil result supercedes the xrefs produced by -‘elisp--xref-find-definitions’.") +`elisp--xref-find-definitions'.") ;; FIXME: name should be singular; match xref-find-definition (defun elisp--xref-find-definitions (symbol) ;; The file name is not known when `symbol' is defined via interactive eval. - (let (xrefs temp) + (let (xrefs) (let ((temp elisp-xref-find-def-functions)) (while (and (null xrefs) @@ -720,10 +720,15 @@ non-nil result supercedes the xrefs produced by (dolist (method (cl--generic-method-table generic)) (let* ((info (cl--generic-method-info method));; qual-string combined-args doconly (specializers (cl--generic-method-specializers method)) + (non-default nil) (met-name (cons symbol specializers)) (file (find-lisp-object-file-name met-name 'cl-defmethod))) + (dolist (item specializers) + ;; default method has all 't' in specializers + (setq non-default (or non-default (not (equal t item))))) + (when (and file - (or specializers ;; default method has null specializers + (or non-default (nth 2 info))) ;; assuming only co-located default has null doc string (if specializers (let ((summary (format elisp--xref-format-extra 'cl-defmethod symbol (nth 1 info)))) @@ -800,6 +805,7 @@ non-nil result supercedes the xrefs produced by (declare-function project-current "project") (defun elisp--xref-find-references (symbol) + "Find all references to SYMBOL (a string) in the current project." (cl-mapcan (lambda (dir) (xref-collect-references symbol dir)) @@ -928,6 +934,7 @@ Semicolons start comments. (goto-char end))))))) (defun elisp-byte-code-syntax-propertize (start end) + (goto-char start) (elisp--byte-code-comment end (point)) (funcall (syntax-propertize-rules @@ -1240,7 +1247,7 @@ If the current defun is actually a call to `defvar', then reset the variable using the initial value expression even if the variable already has some other value. \(Normally `defvar' does not change the variable's value -if it already has a value.\) +if it already has a value.) Return the result of evaluation." ;; FIXME: the print-length/level bindings should only be applied while diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index e8a1ae455ee..0ac59e1a1ea 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -240,7 +240,7 @@ :group 'f90-indent) (defcustom f90-beginning-ampersand t - "Non-nil gives automatic insertion of \& at start of continuation line." + "Non-nil gives automatic insertion of `&' at start of continuation line." :type 'boolean :safe 'booleanp :group 'f90) @@ -649,7 +649,7 @@ forall\\|block\\|critical\\)\\)\\_>" \\|enumerator\\|procedure\\|\ logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t]*" (1 font-lock-keyword-face) (2 font-lock-type-face)) - '("\\_<\\(namelist\\|common\\)[ \t]*\/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/" + '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) "\\_<else\\([ \t]*if\\|where\\)?\\_>" '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face)) @@ -954,8 +954,8 @@ Used in the F90 entry in `hs-special-modes-alist'.") ;; and also variables of derived type "type (foo)". ;; "type, foo" must be a block (?). "type[ \t,]\\(" - "[^i(!\n\"\& \t]\\|" ; not-i( - "i[^s!\n\"\& \t]\\|" ; i not-s + "[^i(!\n\"& \t]\\|" ; not-i( + "i[^s!\n\"& \t]\\|" ; i not-s "is\\(?:\\sw\\|\\s_\\)\\)\\|" ;; "abstract interface" is F2003; "submodule" is F2008. "program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|" @@ -992,9 +992,9 @@ Set subexpression 1 in the match-data to the name of the type." found)) (defvar f90-imenu-generic-expression - (let ((good-char "[^!\"\&\n \t]") (not-e "[^e!\n\"\& \t]") - (not-n "[^n!\n\"\& \t]") (not-d "[^d!\n\"\& \t]") - ;; (not-ib "[^i(!\n\"\& \t]") (not-s "[^s!\n\"\& \t]") + (let ((good-char "[^!\"&\n \t]") (not-e "[^e!\n\"& \t]") + (not-n "[^n!\n\"& \t]") (not-d "[^d!\n\"& \t]") + ;; (not-ib "[^i(!\n\"& \t]") (not-s "[^s!\n\"& \t]") ) `((nil "^[ \t0-9]*program[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)" 1) ("Submodules" "^[ \t0-9]*submodule[ \t]*([^)\n]+)[ \t]*\ @@ -1015,7 +1015,7 @@ Set subexpression 1 in the match-data to the name of the type." "\\(" ;; At least three non-space characters before function/subroutine. ;; Check that the last three non-space characters do not spell E N D. - "[^!\"\&\n]*\\(" + "[^!\"&\n]*\\(" not-e good-char good-char "\\|" good-char not-n good-char "\\|" good-char good-char not-d "\\)" @@ -1154,7 +1154,7 @@ Variables controlling indentation style and extra features: Non-nil causes `f90-do-auto-fill' to break lines before delimiters (default t). `f90-beginning-ampersand' - Automatic insertion of \& at beginning of continuation lines (default t). + Automatic insertion of `&' at beginning of continuation lines (default t). `f90-smart-end' From an END statement, check and fill the end using matching block start. Allowed values are `blink', `no-blink', and nil, which determine @@ -1378,7 +1378,7 @@ write\\)[ \t]*([^)\n]*)") ((looking-at "\\(submodule\\)[ \t]*([^)\n]+)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>") (list (match-string 1) (match-string 2))) ((and (not (looking-at "end[ \t]*\\(function\\|subroutine\\)")) - (looking-at "[^!'\"\&\n]*\\(function\\|subroutine\\)[ \t]+\ + (looking-at "[^!'\"&\n]*\\(function\\|subroutine\\)[ \t]+\ \\(\\(?:\\sw\\|\\s_\\)+\\)")) (list (match-string 1) (match-string 2))))) ;; Following will match an un-named main program block; however @@ -2110,7 +2110,7 @@ Like `join-line', but handles F90 syntax." (if arg (forward-line 1)) (when (eq (preceding-char) ?\n) (skip-chars-forward " \t") - (if (looking-at "\&") (delete-char 1)) + (if (looking-at "&") (delete-char 1)) (beginning-of-line) (delete-region (point) (1- (point))) (skip-chars-backward " \t") diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index a9d47431e51..3adadd1386e 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -826,16 +826,16 @@ Convert it to flymake internal format." (append '( ;; MS Visual C++ 6.0 - ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \: \\(\\(error\\|warning\\|fatal error\\) \\(C[0-9]+\\):[ \t\n]*\\(.+\\)\\)" + ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) : \\(\\(error\\|warning\\|fatal error\\) \\(C[0-9]+\\):[ \t\n]*\\(.+\\)\\)" 1 3 nil 4) ;; jikes - ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[0-9]+\:[0-9]+\:[0-9]+\: \\(\\(Error\\|Warning\\|Caution\\|Semantic Error\\):[ \t\n]*\\(.+\\)\\)" + ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:[0-9]+: \\(\\(Error\\|Warning\\|Caution\\|Semantic Error\\):[ \t\n]*\\(.+\\)\\)" 1 3 nil 4) ;; MS midl ("midl[ ]*:[ ]*\\(command line error .*\\)" nil nil nil 1) ;; MS C# - ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\),[0-9]+)\: \\(\\(error\\|warning\\|fatal error\\) \\(CS[0-9]+\\):[ \t\n]*\\(.+\\)\\)" + ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\),[0-9]+): \\(\\(error\\|warning\\|fatal error\\) \\(CS[0-9]+\\):[ \t\n]*\\(.+\\)\\)" 1 3 nil 4) ;; perl ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1) @@ -843,7 +843,7 @@ Convert it to flymake internal format." ("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1) ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1) ;; ant/javac. Note this also matches gcc warnings! - (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\\(?:\:[0-9]+\\)?\:[ \t\n]*\\(.+\\)" + (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\)\\(?::[0-9]+\\)?:[ \t\n]*\\(.+\\)" 2 4 nil 5)) ;; compilation-error-regexp-alist) (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index ee4733f6e4e..ef470055065 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -244,8 +244,8 @@ line in region." (defcustom fortran-column-ruler-fixed "0 4 6 10 20 30 40 5\ 0 60 70\n\ -\[ ]|{ | | | | | | | | \ -\| | | | |}\n" +[ ]|{ | | | | | | | | \ +| | | | |}\n" "String displayed above current line by \\[fortran-column-ruler]. This variable is used in fixed format mode. See the variable `fortran-column-ruler-tab' for TAB format mode." @@ -257,8 +257,8 @@ See the variable `fortran-column-ruler-tab' for TAB format mode." (defcustom fortran-column-ruler-tab "0 810 20 30 40 5\ 0 60 70\n\ -\[ ]| { | | | | | | | | \ -\| | | | |}\n" +[ ]| { | | | | | | | | \ +| | | | |}\n" "String displayed above current line by \\[fortran-column-ruler]. This variable is used in TAB format mode. See the variable `fortran-column-ruler-fixed' for fixed format mode." diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 1eff62c5acf..3860c81065d 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -4038,6 +4038,8 @@ member." (let ((name (bindat-get-field local 'name)) (value (bindat-get-field local 'value)) (type (bindat-get-field local 'type))) + (when (not value) + (setq value "<complex data type>")) (if (or (not value) (string-match "\\0x" value)) (add-text-properties 0 (length name) diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index 257c3d2a80f..6ee32b0b3ee 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -252,7 +252,7 @@ CATEGORY is the overlay category. If it is nil, use the `glasses' category." ;; Parentheses (when glasses-separate-parentheses-p (goto-char beg) - (while (re-search-forward "[a-zA-Z]_*\\(\(\\)" end t) + (while (re-search-forward "[a-zA-Z]_*\\((\\)" end t) (unless (glasses-parenthesis-exception-p (point-at-bol) (match-end 1)) (glasses-make-overlay (match-beginning 1) (match-end 1) 'glasses-parenthesis)))))))) @@ -291,7 +291,7 @@ recognized according to the current value of the variable `glasses-separator'." (goto-char (match-beginning 1))))) (when glasses-separate-parentheses-p (goto-char (point-min)) - (while (re-search-forward "[a-zA-Z]_*\\( \\)\(" nil t) + (while (re-search-forward "[a-zA-Z]_*\\( \\)(" nil t) (unless (glasses-parenthesis-exception-p (point-at-bol) (1+ (match-end 1))) (replace-match "" t nil nil 1))))))) ;; nil must be returned to allow use in write file hooks diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 9ab0667b5ba..1284ef2857a 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2855,6 +2855,10 @@ Obeying it means displaying in another window the specified file and line." (defun gud-format-command (str arg) (let ((insource (not (eq (current-buffer) gud-comint-buffer))) (frame (or gud-last-frame gud-last-last-frame)) + (buffer-file-name-localized + (and (buffer-file-name) + (or (file-remote-p (buffer-file-name) 'localname) + (buffer-file-name)))) result) (while (and str (let ((case-fold-search nil)) @@ -2864,15 +2868,15 @@ Obeying it means displaying in another window the specified file and line." (cond ((eq key ?f) (setq subst (file-name-nondirectory (if insource - (buffer-file-name) + buffer-file-name-localized (car frame))))) ((eq key ?F) (setq subst (file-name-base (if insource - (buffer-file-name) + buffer-file-name-localized (car frame))))) ((eq key ?d) (setq subst (file-name-directory (if insource - (buffer-file-name) + buffer-file-name-localized (car frame))))) ((eq key ?l) (setq subst (int-to-string diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index c4111398f54..4473409e344 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -434,7 +434,7 @@ It collects and prints the diagnostics messages." ;; A system variable -- only system help ((string-match - "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?" + "\\`!\\([a-zA-Z0-9_]+\\)\\(\\.\\([A-Za-z0-9_]+\\)\\)?" this-word) (let* ((word (match-string-no-properties 1 this-word)) (entry (assq (idlwave-sintern-sysvar word) @@ -1312,7 +1312,7 @@ IDL assistant.") (let ((help-loc (idlwave-html-help-location)) topic anchor file just-started exists full-link) - (if (string-match "\.html" link) + (if (string-match "\\.html" link) (setq topic (substring link 0 (match-beginning 0)) anchor (substring link (match-end 0))) (error "Malformed help link")) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 50ebadf733b..5aeb4ea1a07 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -732,7 +732,7 @@ it contains an error message, even if hide-output is non-nil.") (defvar idlwave-shell-pending-commands nil "List of commands to be sent to IDL. -Each element of the list is list of \(CMD PCMD HIDE\), where CMD is a +Each element of the list is list of \(CMD PCMD HIDE), where CMD is a string to be sent to IDL and PCMD is a post-command to be placed on `idlwave-shell-post-command-hook'. If HIDE is non-nil, hide the output from command CMD. PCMD and HIDE are optional.") @@ -1240,7 +1240,7 @@ Return either nil or 'hide." show-if-error) "Send a command to IDL process. -\(CMD PCMD HIDE\) are placed at the end of `idlwave-shell-pending-commands'. +\(CMD PCMD HIDE) are placed at the end of `idlwave-shell-pending-commands'. If IDL is ready the first command in `idlwave-shell-pending-commands', CMD, is sent to the IDL process. @@ -1256,7 +1256,7 @@ stepping through code with output. If optional fourth argument PREEMPT is non-nil CMD is put at front of `idlwave-shell-pending-commands'. If PREEMPT is 'wait, wait for all output to complete and the next prompt to arrive before returning -\(useful if you need an answer now\). IDL is considered ready if the +\(useful if you need an answer now). IDL is considered ready if the prompt is present and if `idlwave-shell-ready' is non-nil. If SHOW-IF-ERROR is non-nil, show the output if it contains an error @@ -3122,7 +3122,7 @@ versions of IDL." (string-match "\\.\\'" pre))) ;; structure member ;; Skip over strings - ((and (string-match "\\([\"\']\\)[^\1]*$" pre) + ((and (string-match "\\([\"']\\)[^\1]*$" pre) (string-match (concat "^[^" (match-string 1 pre) "]*" (match-string 1 pre)) post)) (setq start (+ start (match-end 0)))) @@ -3212,7 +3212,7 @@ size(___,/DIMENSIONS)" (defvar idlwave-shell-bp-alist nil "Alist of breakpoints. -A breakpoint is a cons cell \(\(file line\) . \(\(index module\) data\)\) +A breakpoint is a cons cell \((file line) . \((index module) data)) The car is the `frame' for the breakpoint: file - full path file name. @@ -3921,7 +3921,7 @@ Query as a function if TYPE set to something beside `pro'." "Get module source, and update `idlwave-shell-sources-alist'." (let ((old (assoc (upcase module) idlwave-shell-sources-alist)) filename) - (when (string-match "\.PATH *[\n\r]\\([^%][^\r\n]+\\)[\n\r]" + (when (string-match ".PATH *[\n\r]\\([^%][^\r\n]+\\)[\n\r]" idlwave-shell-command-output) (setq filename (substring idlwave-shell-command-output (match-beginning 1) (match-end 1))) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index b524b761b75..ac2259df6a4 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -742,7 +742,7 @@ The actions that can be performed are listed in `idlwave-indent-action-table'." (defcustom idlwave-abbrev-start-char "\\" "A single character string used to start abbreviations in abbrev mode. -Possible characters to choose from: ~\\=`\% +Possible characters to choose from: ~\\=`% or even `?'. `.' is not a good choice because it can make structure field names act like abbrevs in certain circumstances. @@ -1559,7 +1559,7 @@ KEY in `idlwave-mode-map' by defining an anonymous function calling `self-insert-command' followed by CMD. If KEY contains more than one character a binding will only be set if SELECT is 'both. -\(KEY . CMD\) is also placed in the `idlwave-indent-expand-table', +\(KEY . CMD) is also placed in the `idlwave-indent-expand-table', replacing any previous value for KEY. If a binding is not set then it will instead be placed in `idlwave-indent-action-table'. diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 17aaab9e2c3..290ebeea290 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -510,7 +510,7 @@ Used by these commands to determine defaults." (file-name-nondirectory file-name))) (comint-send-string (inferior-lisp-proc) (concat "(compile-file \"" file-name - "\"\)\n")) + "\")\n")) (switch-to-lisp t)) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 98a22dd8441..ab994f38252 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -126,7 +126,7 @@ An example of this is \"Class.prototype = { method1: ...}\".") (defconst js--prototype-objextend-class-decl-re-2 (concat "^\\s-*\\(?:var\\s-+\\)?" "\\(" js--dotted-name-re "\\)" - "\\s-*=\\s-*Object\\.extend\\s-*\(")) + "\\s-*=\\s-*Object\\.extend\\s-*(")) ;; var NewClass = Class.create({ (defconst js--prototype-class-decl-re @@ -639,7 +639,7 @@ enabled frameworks." (js--maybe-join "\\(?:var[ \t]+\\)?[a-zA-Z_$0-9.]+[ \t]*=[ \t]*\\(?:" "\\|" - "\\)[ \t]*\(" + "\\)[ \t]*(" (when (memq 'prototype js-enabled-frameworks) "Class\\.create") @@ -651,10 +651,10 @@ enabled frameworks." "[a-zA-Z_$0-9]+\\.extend\\(?:Final\\)?")) (when (memq 'dojo js-enabled-frameworks) - "dojo\\.declare[ \t]*\(") + "dojo\\.declare[ \t]*(") (when (memq 'mochikit js-enabled-frameworks) - "MochiKit\\.Base\\.update[ \t]*\(") + "MochiKit\\.Base\\.update[ \t]*(") ;; mumble.prototypeTHING (js--maybe-join @@ -662,7 +662,7 @@ enabled frameworks." (when (memq 'javascript js-enabled-frameworks) '( ;; foo.prototype.bar = function( - "\\.[a-zA-Z_$0-9]+[ \t]*=[ \t]*function[ \t]*\(" + "\\.[a-zA-Z_$0-9]+[ \t]*=[ \t]*function[ \t]*(" ;; mumble.prototype = { "[ \t]*=[ \t]*{"))))) @@ -1370,17 +1370,6 @@ LIMIT defaults to point." (looking-at "\"\\s-*,\\s-*\\[") (eq (match-end 0) (1+ list-begin))))))) -(defun js--syntax-begin-function () - (when (< js--cache-end (point)) - (goto-char (max (point-min) js--cache-end))) - - (let ((pitem)) - (while (and (setq pitem (car (js--backward-pstate))) - (not (eq 0 (js--pitem-paren-depth pitem))))) - - (when pitem - (goto-char (js--pitem-h-begin pitem ))))) - ;;; Font Lock (defun js--make-framework-matcher (framework &rest regexps) "Helper function for building `js--font-lock-keywords'. @@ -1735,6 +1724,12 @@ This performs fontification according to `js--class-styles'." (js-syntax-propertize-regexp end)))))) (point) end)) +(defconst js--prettify-symbols-alist + '(("=>" . ?⇒) + (">=" . ?≥) + ("<=" . ?≤)) + "Alist of symbol prettifications for JavaScript.") + ;;; Indentation (defconst js--possibly-braceless-keyword-re @@ -3506,6 +3501,7 @@ If one hasn't been set, or if it's stale, prompt for a new one." (setq-local open-paren-in-column-0-is-defun-start nil) (setq-local font-lock-defaults (list js--font-lock-keywords)) (setq-local syntax-propertize-function #'js-syntax-propertize) + (setq-local prettify-symbols-alist js--prettify-symbols-alist) (setq-local parse-sexp-ignore-comments t) (setq-local parse-sexp-lookup-properties t) @@ -3550,8 +3546,6 @@ If one hasn't been set, or if it's stale, prompt for a new one." (make-local-variable 'adaptive-fill-regexp) (c-setup-paragraph-variables)) - (setq-local syntax-begin-function #'js--syntax-begin-function) - ;; Important to fontify the whole buffer syntactically! If we don't, ;; then we might have regular expression literals that aren't marked ;; as strings, which will screw up parse-partial-sexp, scan-lists, @@ -3577,4 +3571,8 @@ If one hasn't been set, or if it's stale, prompt for a new one." (provide 'js) +;; Local Variables: +;; coding: utf-8 +;; End: + ;; js.el ends here diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index 511b25486a2..80a93a477b4 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el @@ -2,8 +2,7 @@ ;; Copyright (C) 1996-1997, 2001-2015 Free Software Foundation, Inc. -;; Author: Andrew Csillag <drew_csillag@geocities.com> -;; Maintainer: Andrew Csillag <drew_csillag@geocities.com> +;; Author: Andrew Csillag <drew@thecsillags.com> ;; Keywords: languages, faces ;; This file is part of GNU Emacs. @@ -67,10 +66,9 @@ If m4 is not in your PATH, set this to an absolute file name." `( ("\\(\\_<\\(m4_\\)?dnl\\_>\\).*$" . font-lock-comment-face) ("\\$[*#@0-9]" . font-lock-variable-name-face) - ("\\\$\\\@" . font-lock-variable-name-face) - ("\\\$\\\*" . font-lock-variable-name-face) - ("\\b\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|gnu\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(exit\\|wrap\\)\\|aketemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|un\\(d\\(efine\\|ivert\\)\\|ix\\)\\)\\b" . font-lock-keyword-face) - ("\\b\\(m4_\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(_undefine\\|exit\\|wrap\\)\\|aketemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|undivert\\)\\)\\b" . font-lock-keyword-face)) + ("\\$\\@" . font-lock-variable-name-face) + ("\\$\\*" . font-lock-variable-name-face) + ("\\_<\\(m4_\\)?\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|gnu\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(exit\\|wrap\\)\\|aketemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|un\\(d\\(efine\\|ivert\\)\\|ix\\)\\)\\_>" . font-lock-keyword-face)) "Default `font-lock-keywords' for M4 mode.") (defcustom m4-mode-hook nil diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 4f46cbe6357..9736f0f207c 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1502,7 +1502,7 @@ Insertion takes place at point." (if (zerop (+ (length targets) (length macros))) (progn (beep) - (message "No macros or targets to browse! Consider running 'makefile-pickup-everything\'")) + (message "No macros or targets to browse! Consider running `makefile-pickup-everything'")) (let ((browser-buffer (get-buffer-create makefile-browser-buffer-name))) (pop-to-buffer browser-buffer) (makefile-browser-fill targets macros) diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el index 6b92c7ee2d6..a0f50fc0f19 100644 --- a/lisp/progmodes/mantemp.el +++ b/lisp/progmodes/mantemp.el @@ -89,7 +89,7 @@ (save-excursion (goto-char (point-min)) (message "Removing comments") - (while (re-search-forward "^[A-z\.()+0-9: ]*`\\|'.*$" nil t) + (while (re-search-forward "^[A-z.()+0-9: ]*`\\|'.*$" nil t) (replace-match "")))) (defun mantemp-remove-memfuncs () diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 3521a139809..55d69bfddff 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -932,7 +932,7 @@ Returns (parse-state) if line starts inside a string." (if (save-excursion (goto-char indent-point) (looking-at (if perl-indent-parens-as-block - "[ \t]*[{(\[]" "[ \t]*{"))) + "[ \t]*[{([]" "[ \t]*{"))) perl-continued-brace-offset 0))) (t ;; This line starts a new statement. diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 8f50887113e..f1aa35f2871 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -61,7 +61,7 @@ indentation of a line/region to the indentation engine of the sub mode, it is supposed to bind this variable to non-nil around the call. The non-nil value looks as follows - \(FIRST-COLUMN (START . END) PREVIOUS-CHUNKS) + (FIRST-COLUMN (START . END) PREVIOUS-CHUNKS) FIRST-COLUMN is the column the indentation engine of the sub mode should usually choose for top-level language constructs inside @@ -86,7 +86,7 @@ values are: - A function called with the start position of the current chunk. It will return either the region of the previous chunk - as \(PREV-START . PREV-END) or nil if there is no further + as (PREV-START . PREV-END) or nil if there is no further previous chunk. A typical use case are literate programming sources - the diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 5a4ed84c346..3d9b0c322ab 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -922,15 +922,38 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." (defun prolog-smie-rules (kind token) (pcase (cons kind token) (`(:elem . basic) prolog-indent-width) + ;; The list of arguments can never be on a separate line! + (`(:list-intro . ,_) t) + ;; When we don't know how to indent an empty line, assume the most + ;; likely token will be ";". + (`(:elem . empty-line-token) ";") (`(:after . ".") '(column . 0)) ;; To work around smie-closer-alist. ;; Allow indentation of if-then-else as: ;; ( test - ;; -> thenrule - ;; ; elserule + ;; -> thenrule + ;; ; elserule ;; ) (`(:before . ,(or `"->" `";")) - (and (smie-rule-bolp) (smie-rule-parent-p "(") (smie-rule-parent 1))) - (`(:after . ,(or `":-" `"->" `"-->")) prolog-indent-width))) + (and (smie-rule-bolp) (smie-rule-parent-p "(") (smie-rule-parent 0))) + (`(:after . ,(or `"->" `"*->")) + ;; We distinguish + ;; + ;; (a -> + ;; b; + ;; c) + ;; and + ;; ( a -> + ;; b + ;; ; c) + ;; + ;; based on the space between the open paren and the "a". + (unless (and (smie-rule-parent-p "(") + (save-excursion + (smie-indent-forward-token) + (smie-backward-sexp 'halfsexp) + (not (eq ?\( (char-before))))) + prolog-indent-width)) + (`(:after . ,(or `":-" `"-->")) prolog-indent-width))) ;;------------------------------------------------------------------- @@ -1005,7 +1028,7 @@ VERSION is of the format (Major . Minor)" (setq-local comment-start "%") (setq-local comment-end "") (setq-local comment-add 1) - (setq-local comment-start-skip "\\(?:/\\*+ *\\|%%+ *\\)") + (setq-local comment-start-skip "\\(?:/\\*+ *\\|%+ *\\)") (setq-local parens-require-spaces nil) ;; Initialize Prolog system specific variables (dolist (var '(prolog-keywords prolog-types prolog-mode-specificators @@ -1121,6 +1144,9 @@ Commands: (dolist (ar prolog-align-rules) (add-to-list 'align-rules-list ar)) (add-hook 'post-self-insert-hook #'prolog-post-self-insert nil t) ;; `imenu' entry moved to the appropriate hook for consistency. + (when prolog-electric-dot-flag + (setq-local electric-indent-chars + (cons ?\. electric-indent-chars))) ;; Load SICStus debugger if suitable (if (and (eq prolog-system 'sicstus) @@ -2060,7 +2086,7 @@ Argument BOUND is a buffer position limiting searching." (defun prolog-find-unmatched-paren () "Return the column of the last unmatched left parenthesis." (save-excursion - (goto-char (or (car (nth 9 (syntax-ppss))) (point-min))) + (goto-char (or (nth 1 (syntax-ppss)) (point-min))) (current-column))) @@ -2078,6 +2104,7 @@ whitespace characters, parentheses, or then/else branches." (when prolog-electric-if-then-else-flag (save-excursion (let ((regexp (concat "(\\|" prolog-left-indent-regexp)) + (pos (point)) level) (beginning-of-line) (skip-chars-forward " \t") @@ -2087,6 +2114,9 @@ whitespace characters, parentheses, or then/else branches." ;; prolog-paren-indent)) ;; work on all subsequent "->", "(", ";" + (and (looking-at regexp) + (= pos (match-end 0)) + (indent-according-to-mode)) (while (looking-at regexp) (goto-char (match-end 0)) (setq level (+ (prolog-find-unmatched-paren) prolog-paren-indent)) @@ -2357,7 +2387,7 @@ This function is only available when `prolog-system' is set to `swi'." (defun prolog-atom-under-point () "Return the atom under or left to the point." (save-excursion - (let ((nonatom_chars "[](){},\. \t\n") + (let ((nonatom_chars "[](){},. \t\n") start) (skip-chars-forward (concat "^" nonatom_chars)) (skip-chars-backward nonatom_chars) @@ -2826,10 +2856,10 @@ objects (relevant only if `prolog-system' is set to `sicstus')." (eq prolog-system 'sicstus) (prolog-in-object)) (format - "^\\(%s\\|%s\\|[^\n\'\"%%]\\)*&[ \t]*\\(\\|%%.*\\)$\\|[ \t]*}" + "^\\(%s\\|%s\\|[^\n'\"%%]\\)*&[ \t]*\\(\\|%%.*\\)$\\|[ \t]*}" prolog-quoted-atom-regexp prolog-string-regexp) (format - "^\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\.[ \t]*\\(\\|%%.*\\)$" + "^\\(%s\\|%s\\|[^\n'\"%%]\\)*\\.[ \t]*\\(\\|%%.*\\)$" prolog-quoted-atom-regexp prolog-string-regexp)) nil t) (if (and (nth 8 (syntax-ppss)) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9528ffeebbc..b641e300163 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -620,6 +620,11 @@ The type returned can be `comment', `string' or `paren'." ((python-rx string-delimiter) (0 (ignore (python-syntax-stringify)))))) +(defconst python--prettify-symbols-alist + '(("lambda" . ?λ) + ("and" . ?∧) + ("or" . ?∨))) + (defsubst python-syntax-count-quotes (quote-char &optional point limit) "Count number of quotes around point (max is 3). QUOTE-CHAR is the quote char to count. Optional argument POINT is @@ -3635,12 +3640,18 @@ Never set this variable directly, use "Set the buffer for FILE-NAME as the tracked buffer. Internally it uses the `python-pdbtrack-tracked-buffer' variable. Returns the tracked buffer." - (let ((file-buffer (get-file-buffer - (concat (file-remote-p default-directory) - file-name)))) + (let* ((file-name-prospect (concat (file-remote-p default-directory) + file-name)) + (file-buffer (get-file-buffer file-name-prospect))) (if file-buffer (setq python-pdbtrack-tracked-buffer file-buffer) - (setq file-buffer (find-file-noselect file-name)) + (cond + ((file-exists-p file-name-prospect) + (setq file-buffer (find-file-noselect file-name-prospect))) + ((and (not (equal file-name file-name-prospect)) + (file-exists-p file-name)) + ;; Fallback to a locally available copy of the file. + (setq file-buffer (find-file-noselect file-name-prospect)))) (when (not (member file-buffer python-pdbtrack-buffers-to-kill)) (add-to-list 'python-pdbtrack-buffers-to-kill file-buffer))) file-buffer)) @@ -5098,6 +5109,9 @@ returned as is." "`outline-level' function for Python mode." (1+ (/ (current-indentation) python-indent-offset)))) + (set (make-local-variable 'prettify-symbols-alist) + python--prettify-symbols-alist) + (python-skeleton-add-menu-items) (make-local-variable 'python-shell-internal-buffer) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 5d59a56e858..09338860c75 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -695,7 +695,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." (let ((index-alist '()) (case-fold-search nil) name next pos decl sing) (goto-char beg) - (while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^\(<\n ]+\\)\\|\\(def\\|alias\\)\\s +\\([^\(\n ]+\\)\\)" end t) + (while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^(<\n ]+\\)\\|\\(def\\|alias\\)\\s +\\([^(\n ]+\\)\\)" end t) (setq sing (match-beginning 3)) (setq decl (match-string 5)) (setq next (match-end 0)) @@ -709,7 +709,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." (if prefix (setq name (cond - ((string-match "^self\." name) + ((string-match "^self\\." name) (concat (substring prefix 0 -1) (substring name 4))) (t (concat prefix name))))) (push (cons name pos) index-alist) @@ -1795,7 +1795,7 @@ If the result is do-end block, it will always be multiline." (setq content (if (equal string-quote "\"") (replace-regexp-in-string "\\\\\"" "\"" (replace-regexp-in-string "\\([^\\\\]\\)'" "\\1\\\\'" content)) - (replace-regexp-in-string "\\\\\'" "'" (replace-regexp-in-string "\\([^\\\\]\\)\"" "\\1\\\\\"" content)))) + (replace-regexp-in-string "\\\\'" "'" (replace-regexp-in-string "\\([^\\\\]\\)\"" "\\1\\\\\"" content)))) (let ((orig-point (point))) (delete-region min max) (insert @@ -2007,7 +2007,8 @@ It will be properly highlighted even when the call omits parens.") (t (error (concat "Internal error on `ruby-in-ppss-context-p': " - "context name `" (symbol-name context) "' is unknown")))) + "context name `%s' is unknown") + context))) t))) (defvar ruby-font-lock-syntax-table @@ -2192,7 +2193,7 @@ See `font-lock-syntax-table'.") ;; Constants. ("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)" 1 (unless (eq ?\( (char-after)) font-lock-type-face)) - ("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" + ("\\(^\\s *\\|[[{(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" (2 font-lock-constant-face)) ;; Conversion methods on Kernel. (,(concat ruby-font-lock-keyword-beg-re diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index a21bc198e3b..e921e84a33e 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -415,7 +415,7 @@ that variable's value is a string." (eval-when-compile (list ;; Similar to Scheme - (list "(\\(define\\(-\\w+\\)?\\)\\>[ ]*\\\((?\\)\\(\\sw+\\)\\>" + (list "(\\(define\\(-\\w+\\)?\\)\\>[ ]*\\((?\\)\\(\\sw+\\)\\>" '(1 font-lock-keyword-face) '(4 font-lock-function-name-face)) (cons diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 735c8f96888..049c93dfae2 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -347,7 +347,7 @@ naming the shell." . ((nil ;; function FOO ;; function FOO() - "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" + "^\\s-*function\\s-+\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" 1) ;; FOO() (nil @@ -374,7 +374,7 @@ For use in `add-log-current-defun-function'." (concat "\\(?:" ;; function FOO ;; function FOO() - "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" + "^\\s-*function\\s-+\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" "\\)\\|\\(?:" ;; FOO() "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" @@ -2319,7 +2319,7 @@ controls whether to query about making the visited file executable. Calls the value of `sh-set-shell-hook' if set." (interactive (list (completing-read - (format "Shell \(default %s\): " + (format "Shell (default %s): " sh-shell-file) ;; This used to use interpreter-mode-alist, but that is ;; no longer appropriate now that uses regexps. @@ -2810,15 +2810,15 @@ Return new point if successful, nil if an error occurred." "Return indent-info for this line. This is a list. nil means the line is to be left as is. Otherwise it contains one or more of the following sublists: -\(t NUMBER\) NUMBER is the base location in the buffer that indentation is +\(t NUMBER) NUMBER is the base location in the buffer that indentation is relative to. If present, this is always the first of the sublists. The indentation of the line in question is derived from the indentation of this point, possibly modified by subsequent sublists. -\(+ VAR\) -\(- VAR\) Get the value of variable VAR and add to or subtract from +\(+ VAR) +\(- VAR) Get the value of variable VAR and add to or subtract from the indentation calculated so far. -\(= VAR\) Get the value of variable VAR and *replace* the +\(= VAR) Get the value of variable VAR and *replace* the indentation with its value. This only occurs for special variables such as `sh-indent-comment'. STRING This is ignored for the purposes of calculating @@ -3086,7 +3086,7 @@ we go to the end of the previous line and do not check for continuations." (setq prev (point)) )) ;; backward-sexp failed - (if (zerop (skip-chars-backward " \t()[\]{};`'")) + (if (zerop (skip-chars-backward " \t()[]{};`'")) (forward-char -1)) (if (bolp) (let ((back (sh-prev-line nil))) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index cbf65c0a803..abc99eec909 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -360,7 +360,7 @@ file. Since that is a plaintext file, this could be dangerous." :sqli-comint-func sql-comint-db2 :prompt-regexp "^db2 => " :prompt-length 7 - :prompt-cont-regexp "^db2 (cont\.) => " + :prompt-cont-regexp "^db2 (cont\\.) => " :input-filter sql-escape-newlines-filter) (informix @@ -381,9 +381,9 @@ file. Since that is a plaintext file, this could be dangerous." :sqli-options sql-ingres-options :sqli-login sql-ingres-login-params :sqli-comint-func sql-comint-ingres - :prompt-regexp "^\* " + :prompt-regexp "^\\* " :prompt-length 2 - :prompt-cont-regexp "^\* ") + :prompt-cont-regexp "^\\* ") (interbase :name "Interbase" @@ -491,7 +491,7 @@ file. Since that is a plaintext file, this could be dangerous." :completion-object sql-sqlite-completion-object :prompt-regexp "^sqlite> " :prompt-length 8 - :prompt-cont-regexp "^ \.\.\.> " + :prompt-cont-regexp "^ \\.\\.\\.> " :terminator ";") (sybase @@ -525,7 +525,7 @@ highlighted and will not support `sql-interactive-mode'. Each element in the list is in the following format: - \(PRODUCT FEATURE VALUE ...) + (PRODUCT FEATURE VALUE ...) where PRODUCT is the appropriate value of `sql-product'. The product name is then followed by FEATURE-VALUE pairs. If a @@ -639,7 +639,7 @@ settings.") "An alist of connection parameters for interacting with a SQL product. Each element of the alist is as follows: - \(CONNECTION \(SQL-VARIABLE VALUE) ...) + (CONNECTION \(SQL-VARIABLE VALUE) ...) Where CONNECTION is a case-insensitive string identifying the connection, SQL-VARIABLE is the symbol name of a SQL mode @@ -3897,14 +3897,14 @@ Here is an example for your init file. It keeps the SQLi buffer a certain length. \(add-hook \\='sql-interactive-mode-hook - \(function (lambda () - \(setq comint-output-filter-functions \\='comint-truncate-buffer)))) + (function (lambda () + (setq comint-output-filter-functions \\='comint-truncate-buffer)))) Here is another example. It will always put point back to the statement you entered, right above the output it created. \(setq comint-output-filter-functions - \(function (lambda (STR) (comint-show-output))))" + (function (lambda (STR) (comint-show-output))))" (delay-mode-hooks (comint-mode)) ;; Get the `sql-product' for this interactive session. diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el index 5f1cb53f1dd..bce56a447f0 100644 --- a/lisp/progmodes/vera-mode.el +++ b/lisp/progmodes/vera-mode.el @@ -259,7 +259,7 @@ Usage: INDENTATION: Typing `TAB' at the beginning of a line indents the line. The amount of indentation is specified by option `vera-basic-offset'. - Indentation can be done for an entire region \(`M-C-\\') or buffer (menu). + Indentation can be done for an entire region (`M-C-\\') or buffer (menu). `TAB' always indents the line if option `vera-intelligent-tab' is nil. WORD/COMMAND COMPLETION: Typing `TAB' after a (not completed) word looks diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index f83c676396d..489094b2e4f 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -123,7 +123,7 @@ ;; ;; This variable will always hold the version number of the mode -(defconst verilog-mode-version "2015-08-16-ce03c7a-vpo-GNU" +(defconst verilog-mode-version "2015-09-18-314cf1d-vpo-GNU" "Version of this Verilog mode.") (defconst verilog-mode-release-emacs t "If non-nil, this version of Verilog mode was released with Emacs itself.") @@ -841,7 +841,7 @@ first difference.") (verilog-xl-2 "([WE][0-9A-Z]+)[ \t]+\\([^ \t\n,]+\\)[, \t]+\\(line[ \t]+\\)?\\([0-9]+\\):.*$" 1 3) (verilog-IES - ".*\\*[WE],[0-9A-Z]+\\(\[[0-9A-Z_,]+\]\\)? (\\([^ \t,]+\\),\\([0-9]+\\)" 2 3) + ".*\\*[WE],[0-9A-Z]+\\(\\[[0-9A-Z_,]+\\]\\)? (\\([^ \t,]+\\),\\([0-9]+\\)" 2 3) (verilog-surefire-1 "[^\n]*\\[\\([^:]+\\):\\([0-9]+\\)\\]" 1 2) (verilog-surefire-2 @@ -885,8 +885,8 @@ See `compilation-error-regexp-alist-alist' for the formatting. For XEmacs.") ("([WE][0-9A-Z]+)[ \t]+\\([^ \t\n,]+\\)[, \t]+\\(line[ \t]+\\)?\\([0-9]+\\):.*$" 1 bold t) ("([WE][0-9A-Z]+)[ \t]+\\([^ \t\n,]+\\)[, \t]+\\(line[ \t]+\\)?\\([0-9]+\\):.*$" 3 bold t) ;; verilog-IES (nc-verilog) - (".*\\*[WE],[0-9A-Z]+\\(\[[0-9A-Z_,]+\]\\)? (\\([^ \t,]+\\),\\([0-9]+\\)|" 2 bold t) - (".*\\*[WE],[0-9A-Z]+\\(\[[0-9A-Z_,]+\]\\)? (\\([^ \t,]+\\),\\([0-9]+\\)|" 3 bold t) + (".*\\*[WE],[0-9A-Z]+\\(\\[[0-9A-Z_,]+\\]\\)? (\\([^ \t,]+\\),\\([0-9]+\\)|" 2 bold t) + (".*\\*[WE],[0-9A-Z]+\\(\\[[0-9A-Z_,]+\\]\\)? (\\([^ \t,]+\\),\\([0-9]+\\)|" 3 bold t) ;; verilog-surefire-1 ("[^\n]*\\[\\([^:]+\\):\\([0-9]+\\)\\]" 1 bold t) ("[^\n]*\\[\\([^:]+\\):\\([0-9]+\\)\\]" 2 bold t) @@ -2303,7 +2303,7 @@ find the errors." ;; non blocking assignment operator "<=" ;; comparison - "==" "!=" "===" "!==" "<=" ">=" "==\?" "!=\?" "<->" + "==" "!=" "===" "!==" "<=" ">=" "==?" "!=?" "<->" ;; event_trigger "->" "->>" ;; property_expr @@ -2469,7 +2469,7 @@ find the errors." "\\(\\<begin\\>\\)\\|" ; 1 "\\(\\<else\\>\\)\\|" ; 2 "\\(\\<end\\>\\s-+\\<else\\>\\)\\|" ; 3 - "\\(\\<always\\(?:_ff\\)?\\>\\(?:\[ \t\]*@\\)\\)\\|" ; 4 (matches always or always_ff w/ @...) + "\\(\\<always\\(?:_ff\\)?\\>\\(?:[ \t]*@\\)\\)\\|" ; 4 (matches always or always_ff w/ @...) "\\(\\<always\\(?:_comb\\|_latch\\)?\\>\\)\\|" ; 5 (matches always, always_comb, always_latch w/o @...) "\\(\\<fork\\>\\)\\|" ; 7 "\\(\\<if\\>\\)\\|" @@ -3194,10 +3194,10 @@ See also `verilog-font-lock-extra-types'.") 'font-lock-preprocessor-face 'font-lock-type-face)) ;; Fontify delays/numbers - '("\\(@\\)\\|\\([ \t\n\f\r]#\\s-*\\(\\(\[0-9_.\]+\\('s?[hdxbo][0-9a-fA-F_xz]*\\)?\\)\\|\\(([^()]+)\\|\\sw+\\)\\)\\)" + '("\\(@\\)\\|\\([ \t\n\f\r]#\\s-*\\(\\([0-9_.]+\\('s?[hdxbo][0-9a-fA-F_xz]*\\)?\\)\\|\\(([^()]+)\\|\\sw+\\)\\)\\)" 0 font-lock-type-face append) ;; Fontify property/sequence cycle delays - these start with '##' - '("\\(##\\(\\sw+\\|\\[[^\]]+\\]\\)\\)" + '("\\(##\\(\\sw+\\|\\[[^]]+\\]\\)\\)" 0 font-lock-type-face append) ;; Fontify instantiation names '("\\([A-Za-z][A-Za-z0-9_]*\\)\\s-*(" 1 font-lock-function-name-face) @@ -3442,7 +3442,7 @@ Use filename, if current buffer being edited shorten to just buffer name." (verilog-forward-sexp)) (defun verilog-forward-sexp-function (arg) - "Move forward a sexp." + "Move forward ARG sexps." ;; Used by hs-minor-mode (if (< arg 0) (verilog-backward-sexp) @@ -3936,7 +3936,7 @@ With optional ARG, remove existing end of line comments." (defun electric-verilog-semi-with-comment () "Insert `;' character, reindent the line and indent for comment." (interactive) - (insert "\;") + (insert ";") (save-excursion (beginning-of-line) (verilog-indent-line)) @@ -4072,7 +4072,7 @@ if it reaches the end of the buffer." The upper left corner is defined by point. Indices begin with 0 and extend to the MAX - 1. If no prefix arg is given, the user is prompted for a value. The indices are surrounded by square -brackets \[]. For example, the following code with the point +brackets []. For example, the following code with the point located after the first 'a' gives: a = b a[ 0] = b @@ -5072,7 +5072,7 @@ Useful for creating tri's and other expanded fields." (if (verilog-within-string) (re-search-forward "\"" nil t) (if (verilog-in-star-comment-p) - (re-search-forward "\*/" nil t) + (re-search-forward "\\*/" nil t) (let ((bpt (- (point) 2))) (end-of-line) (delete-region bpt (point)))))) @@ -5184,7 +5184,7 @@ becomes: (t ))) ((verilog-in-star-comment-p) - (re-search-backward "/\*") + (re-search-backward "/\\*") (insert (format " // surefire lint_off_line %6s" code ))) (t (insert (format " // surefire lint_off_line %6s" code )) @@ -5301,8 +5301,8 @@ Save the result unless optional NO-SAVE is t." (save-excursion (if (not (file-exists-p (buffer-file-name buf))) (error - (concat "File not found: " (buffer-file-name buf)))) - (message (concat "Processing " (buffer-file-name buf))) + "File not found: %s" (buffer-file-name buf))) + (message "Processing %s" (buffer-file-name buf)) (set-buffer buf) (funcall funref) (when (and (not no-save) @@ -6054,7 +6054,7 @@ Optional BOUND limits search." (verilog-re-search-backward "//" nil 'move) (skip-chars-backward "/")) ((nth 4 state) ; in /* */ comment - (verilog-re-search-backward "/\*" nil 'move)))) + (verilog-re-search-backward "/\\*" nil 'move)))) (narrow-to-region bound (point)) (while (/= here (point)) (setq here (point)) @@ -6092,7 +6092,7 @@ Optional BOUND limits search." (skip-chars-forward " \t\n\f") ) ((nth 4 state) ; in /* */ comment - (verilog-re-search-forward "\*\/\\s-*" nil 'move)))) + (verilog-re-search-forward "\\*/\\s-*" nil 'move)))) (narrow-to-region (point) bound) (while (/= here (point)) (setq here (point) @@ -6673,7 +6673,7 @@ Do not count named blocks or case-statements." (save-excursion (forward-line -1) (skip-chars-forward " \t") - (looking-at "\*"))) + (looking-at "\\*"))) (insert "* "))))) (defun verilog-comment-indent (&optional _arg) @@ -7078,7 +7078,7 @@ Region is defined by B and EDPOS." (beginning-of-line) (point-marker) (end-of-line)))) - (if (re-search-backward " /\\* \[#-\]# \[a-zA-Z\]+ \[0-9\]+ ## \\*/" b t) + (if (re-search-backward " /\\* [#-]# [a-zA-Z]+ [0-9]+ ## \\*/" b t) (progn (replace-match " /* -# ## */") (end-of-line)) @@ -8074,9 +8074,9 @@ Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]." (when (and sv-busstring (not (equal sv-busstring (verilog-sig-bits sig)))) (when nil ; Debugging - (message (concat "Warning, can't merge into single bus " - sv-name bus - ", the AUTOs may be wrong"))) + (message (concat "Warning, can't merge into single bus %s%s" + ", the AUTOs may be wrong") + sv-name bus)) (setq buswarn ", Couldn't Merge")) (if (verilog-sig-comment sig) (setq combo ", ...")) (setq sv-memory (or sv-memory (verilog-sig-memory sig)) @@ -8129,7 +8129,8 @@ Tieoff value uses `verilog-active-low-regexp' and ;; (defun verilog-decls-princ (decls &optional header prefix) - "For debug, dump the `verilog-read-decls' structure DECLS." + "For debug, dump the `verilog-read-decls' structure DECLS. +Use optional HEADER and PREFIX." (when decls (if header (princ header)) (setq prefix (or prefix "")) @@ -8173,7 +8174,7 @@ Tieoff value uses `verilog-active-low-regexp' and (princ "\n"))))) (defun verilog-modport-princ (modports &optional header prefix) - "For debug, dump internal MODPORT structures, with HEADER and PREFIX." + "For debug, dump internal MODPORTS structures, with HEADER and PREFIX." (when modports (if header (princ header)) (while modports @@ -8196,32 +8197,32 @@ Tieoff value uses `verilog-active-low-regexp' and (verilog-backward-open-paren) (let (done) (while (not done) - (verilog-re-search-backward-quick "\\()\\|\\b[a-zA-Z0-9`_\$]\\|\\]\\)" nil nil) ; ] isn't word boundary + (verilog-re-search-backward-quick "\\()\\|\\b[a-zA-Z0-9`_$]\\|\\]\\)" nil nil) ; ] isn't word boundary (cond ((looking-at ")") (verilog-backward-open-paren)) (t (setq done t))))) (while (looking-at "\\]") (verilog-backward-open-bracket) - (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_\$]\\|\\]\\)" nil nil)) + (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_$]\\|\\]\\)" nil nil)) (skip-chars-backward "a-zA-Z0-9`_$")) (defun verilog-read-inst-module-matcher () "Set match data 0 with module_name when point is inside instantiation." (verilog-read-inst-backward-name) ;; Skip over instantiation name - (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_\$]\\|)\\)" nil nil) ; ) isn't word boundary + (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_$]\\|)\\)" nil nil) ; ) isn't word boundary ;; Check for parameterized instantiations (when (looking-at ")") (verilog-backward-open-paren) - (verilog-re-search-backward-quick "\\b[a-zA-Z0-9`_\$]" nil nil)) + (verilog-re-search-backward-quick "\\b[a-zA-Z0-9`_$]" nil nil)) (skip-chars-backward "a-zA-Z0-9'_$") ;; #1 is legal syntax for gate primitives (when (save-excursion (verilog-backward-syntactic-ws-quick) (eq ?# (char-before))) - (verilog-re-search-backward-quick "\\b[a-zA-Z0-9`_\$]" nil nil) + (verilog-re-search-backward-quick "\\b[a-zA-Z0-9`_$]" nil nil) (skip-chars-backward "a-zA-Z0-9'_$")) - (looking-at "[a-zA-Z0-9`_\$]+") + (looking-at "[a-zA-Z0-9`_$]+") ;; Important: don't use match string, this must work with Emacs 19 font-lock on (buffer-substring-no-properties (match-beginning 0) (match-end 0)) ;; Caller assumes match-beginning/match-end is still set @@ -8236,7 +8237,7 @@ Tieoff value uses `verilog-active-low-regexp' and "Return instance_name when point is inside instantiation." (save-excursion (verilog-read-inst-backward-name) - (looking-at "[a-zA-Z0-9`_\$]+") + (looking-at "[a-zA-Z0-9`_$]+") ;; Important: don't use match string, this must work with Emacs 19 font-lock on (buffer-substring-no-properties (match-beginning 0) (match-end 0)))) @@ -8247,7 +8248,7 @@ Tieoff value uses `verilog-active-low-regexp' and ;; Due to "module x import y (" we must search for declaration begin (verilog-re-search-backward-quick verilog-defun-re nil nil) (goto-char (match-end 0)) - (verilog-re-search-forward-quick "\\b[a-zA-Z0-9`_\$]+" nil nil) + (verilog-re-search-forward-quick "\\b[a-zA-Z0-9`_$]+" nil nil) ;; Important: don't use match string, this must work with Emacs 19 font-lock on (verilog-symbol-detick (buffer-substring-no-properties (match-beginning 0) (match-end 0)) t))) @@ -8257,7 +8258,7 @@ Tieoff value uses `verilog-active-low-regexp' and (save-excursion (verilog-read-inst-backward-name) ;; Skip over instantiation name - (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_\$]\\|)\\)" nil nil) ; ) isn't word boundary + (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_$]\\|)\\)" nil nil) ; ) isn't word boundary ;; If there are parameterized instantiations (when (looking-at ")") (let ((end-pt (point)) @@ -8265,9 +8266,9 @@ Tieoff value uses `verilog-active-low-regexp' and param-name paren-beg-pt param-value) (verilog-backward-open-paren) (while (verilog-re-search-forward-quick "\\." end-pt t) - (verilog-re-search-forward-quick "\\([a-zA-Z0-9`_\$]\\)" nil nil) + (verilog-re-search-forward-quick "\\([a-zA-Z0-9`_$]\\)" nil nil) (skip-chars-backward "a-zA-Z0-9'_$") - (looking-at "[a-zA-Z0-9`_\$]+") + (looking-at "[a-zA-Z0-9`_$]+") (setq param-name (buffer-substring-no-properties (match-beginning 0) (match-end 0))) (verilog-re-search-forward-quick "(" nil nil) @@ -8666,7 +8667,7 @@ Return an array of [outputs inouts inputs wire reg assign const]." (defun verilog-read-sub-decls-expr (submoddecls comment port expr) "For `verilog-read-sub-decls-line', parse a subexpression and add signals." - ;;(message "vrsde: ‘%s’" expr) + ;;(message "vrsde: `%s'" expr) ;; Replace special /*[....]*/ comments inserted by verilog-auto-inst-port (setq expr (verilog-string-replace-matches "/\\*\\(\\[[^*]+\\]\\)\\*/" "\\1" nil nil expr)) ;; Remove front operators @@ -8685,25 +8686,25 @@ Return an array of [outputs inouts inputs wire reg assign const]." (let (sig vec multidim) ;; Remove leading reduction operators, etc (setq expr (verilog-string-replace-matches "^\\s-*[---+~!|&]+\\s-*" "" nil nil expr)) - ;;(message "vrsde-ptop: ‘%s’" expr) + ;;(message "vrsde-ptop: `%s'" expr) (cond ; Find \signal. Final space is part of escaped signal name ((string-match "^\\s-*\\(\\\\[^ \t\n\f]+\\s-\\)" expr) - ;;(message "vrsde-s: ‘%s’" (match-string 1 expr)) + ;;(message "vrsde-s: `%s'" (match-string 1 expr)) (setq sig (match-string 1 expr) expr (substring expr (match-end 0)))) ;; Find signal ((string-match "^\\s-*\\([a-zA-Z_][a-zA-Z_0-9]*\\)" expr) - ;;(message "vrsde-s: ‘%s’" (match-string 1 expr)) + ;;(message "vrsde-s: `%s'" (match-string 1 expr)) (setq sig (verilog-string-remove-spaces (match-string 1 expr)) expr (substring expr (match-end 0))))) ;; Find [vector] or [multi][multi][multi][vector] (while (string-match "^\\s-*\\(\\[[^]]+\\]\\)" expr) - ;;(message "vrsde-v: ‘%s’" (match-string 1 expr)) + ;;(message "vrsde-v: `%s'" (match-string 1 expr)) (when vec (setq multidim (cons vec multidim))) (setq vec (match-string 1 expr) expr (substring expr (match-end 0)))) ;; If found signal, and nothing unrecognized, add the signal - ;;(message "vrsde-rem: ‘%s’" expr) + ;;(message "vrsde-rem: `%s'" expr) (when (and sig (string-match "^\\s-*$" expr)) (verilog-read-sub-decls-sig submoddecls comment port sig vec multidim)))))) @@ -9324,8 +9325,8 @@ warning message, you need to add to your init file: (let ((fns (verilog-library-filenames filename (buffer-file-name)))) (if fns (set-buffer (find-file-noselect (car fns))) - (error (concat (verilog-point-text) - ": Can't find verilog-read-defines file: " filename))))) + (error "%s: Can't find verilog-read-defines file: %s" + (verilog-point-text) filename)))) (when recurse (goto-char (point-min)) (while (re-search-forward "^\\s-*`include\\s-+\\([^ \t\n\f]+\\)" nil t) @@ -9506,8 +9507,8 @@ Some macros and such are also found and included. For dinotrace.el." line) (if fns (set-buffer (find-file-noselect (car fns))) - (error (concat (verilog-point-text) - ": Can't find verilog-getopt-file -f file: " filename))) + (error "%s: Can't find verilog-getopt-file -f file: %s" + (verilog-point-text) filename)) (goto-char (point-min)) (while (not (eobp)) (setq line (buffer-substring (point) (point-at-eol))) @@ -9674,7 +9675,7 @@ If undefined, and WING-IT, return just SYMBOL without the tick, else nil." ;; something like a[b]. Sorry, it should be substituted into the parser (setq symbol (verilog-string-replace-matches - "\[[^0-9: \t]+\]" "" nil nil + "\\[[^0-9: \t]+\\]" "" nil nil (or (verilog-symbol-detick symbol nil) (if verilog-auto-sense-defines-constant "0" @@ -9709,7 +9710,8 @@ Or, just the existing dirnames themselves if there are no wildcards." ;; Note this function is performance critical. ;; Do not call anything that requires disk access that cannot be cached. (interactive) - (unless dirnames (error "`verilog-library-directories' should include at least '.'")) + (unless dirnames + (error "`verilog-library-directories' should include at least `.'")) (setq dirnames (reverse dirnames)) ; not nreverse (let ((dirlist nil) pattern dirfile dirfiles dirname root filename rest basefile) @@ -9888,17 +9890,18 @@ Return modi if successful, else print message unless IGNORE-ERROR is true." (if (not (setq mif (verilog-module-inside-filename-p realname (car filenames)))) (setq filenames (cdr filenames)))) ;; mif has correct form to become later elements of modi - (cond (mif (setq modi mif)) - (t (setq modi nil) - (or ignore-error - (error (concat (verilog-point-text) - ": Can't locate " module " module definition" - (if (not (equal module realname)) - (concat " (Expanded macro to " realname ")") - "") - "\n Check the verilog-library-directories variable." - "\n I looked in (if not listed, doesn't exist):\n\t" - (mapconcat 'concat orig-filenames "\n\t")))))) + (setq modi mif) + (or mif ignore-error + (error + (concat + "%s: Can't locate %s module definition%s" + "\n Check the verilog-library-directories variable." + "\n I looked in (if not listed, doesn't exist):\n\t%s") + (verilog-point-text) module + (if (not (equal module realname)) + (concat " (Expanded macro to " realname ")") + "") + (mapconcat 'concat orig-filenames "\n\t"))) (when (eval-when-compile (fboundp 'make-hash-table)) (unless verilog-modi-lookup-cache (setq verilog-modi-lookup-cache @@ -9994,16 +9997,17 @@ and invalidating the cache." (defun verilog-modi-modport-lookup-one (modi name &optional ignore-error) - "Given a MODI, return the declarations related to the given modport NAME." + "Given a MODI, return the declarations related to the given modport NAME. +Report errors unless optional IGNORE-ERROR." ;; Recursive routine - see below (let* ((realname (verilog-symbol-detick name t)) (modport (assoc name (verilog-decls-get-modports (verilog-modi-get-decls modi))))) (or modport ignore-error - (error (concat (verilog-point-text) - ": Can't locate " name " modport definition" - (if (not (equal name realname)) - (concat " (Expanded macro to " realname ")") - "")))) + (error "%s: Can't locate %s modport definition%s" + (verilog-point-text) name + (if (not (equal name realname)) + (concat " (Expanded macro to " realname ")") + ""))) (let* ((decls (verilog-modport-decls modport)) (clks (verilog-modport-clockings modport))) ;; Now expand any clocking's @@ -10641,7 +10645,7 @@ Typing \\[verilog-inject-auto] will make this into: (save-excursion (goto-char (point-min)) ;; It's hard to distinguish modules; we'll instead search for pins. - (while (verilog-re-search-forward-quick "\\.\\s *[a-zA-Z0-9`_\$]+\\s *(\\s *[a-zA-Z0-9`_\$]+\\s *)" nil t) + (while (verilog-re-search-forward-quick "\\.\\s *[a-zA-Z0-9`_$]+\\s *(\\s *[a-zA-Z0-9`_$]+\\s *)" nil t) (verilog-backward-open-paren) ; Inst start (cond ((= (preceding-char) ?\#) ; #(...) parameter section, not pin. Skip. @@ -10656,7 +10660,7 @@ Typing \\[verilog-inject-auto] will make this into: (t ;; Delete identical interconnect (let ((case-fold-search nil)) ; So we don't convert upper-to-lower, etc - (while (verilog-re-search-forward-quick "\\.\\s *\\([a-zA-Z0-9`_\$]+\\)*\\s *(\\s *\\1\\s *)\\s *" end-pt t) + (while (verilog-re-search-forward-quick "\\.\\s *\\([a-zA-Z0-9`_$]+\\)*\\s *(\\s *\\1\\s *)\\s *" end-pt t) (delete-region (match-beginning 0) (match-end 0)) (setq end-pt (- end-pt (- (match-end 0) (match-beginning 0)))) ; Keep it correct (while (or (looking-at "[ \t\n\f,]+") @@ -11397,12 +11401,12 @@ Multiple Module Templates: instantiation name. If a regular expression is provided, the @ character will be replaced - with the first \(\) grouping that matches against the cell name. Using a - regexp of \"\\([0-9]+\\)\" provides identical values for @ as when no + with the first () grouping that matches against the cell name. Using a + regexp of `\\([0-9]+\\)' provides identical values for @ as when no regexp is provided. If you use multiple layers of parenthesis, - \"test\\([^0-9]+\\)_\\([0-9]+\\)\" would replace @ with non-number + `test\\([^0-9]+\\)_\\([0-9]+\\)' would replace @ with non-number characters after test and before _, whereas - \"\\(test\\([a-z]+\\)_\\([0-9]+\\)\\)\" would replace @ with the entire + `\\(test\\([a-z]+\\)_\\([0-9]+\\)\\)' would replace @ with the entire match. For example: diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 19a7e970a60..9ee4ab520e1 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -268,7 +268,7 @@ Overrides local variable `indent-tabs-mode'." ;; ** Error: adder.vhd(190): Unknown identifier: ctl_numb ("ModelSim" "vcom" "-93 -work \\1" "make" "-f \\1" nil "vlib \\1; vmap \\2 \\1" "./" "work/" "Makefile" "modelsim" - ("^\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*:\\( *\[[0-9]+\]\\)? \\([^ \t\n]+\\)(\\([0-9]+\\)):" 3 4 nil) ("" 0) + ("^\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*:\\( *\\[[0-9]+]\\)? \\([^ \t\n]+\\)(\\([0-9]+\\)):" 3 4 nil) ("" 0) ("\\1/_primary.dat" "\\2/\\1.dat" "\\1/_primary.dat" "\\1/_primary.dat" "\\1/body.dat" downcase)) ;; ProVHDL, Synopsys LEDA: provhdl -w work -f test.vhd @@ -315,7 +315,7 @@ Overrides local variable `indent-tabs-mode'." ;; ERROR[11]::File test.vhd Line 100: Use of undeclared identifier ("Speedwave" "analyze" "-libfile vsslib.ini -src" "make" "-f \\1" nil "mkdir \\1" "./" "work/" "Makefile" "speedwave" - ("^ *ERROR\[[0-9]+\]::File \\([^ \t\n]+\\) Line \\([0-9]+\\):" 1 2 nil) ("" 0) + ("^ *ERROR\\[[0-9]+]::File \\([^ \t\n]+\\) Line \\([0-9]+\\):" 1 2 nil) ("" 0) nil) ;; Synopsys, VHDL Analyzer (sim): vhdlan -nc test.vhd ;; **Error: vhdlan,703 test.vhd(22): OTHERS is not legal in this context. @@ -364,7 +364,7 @@ Overrides local variable `indent-tabs-mode'." ;; ERROR:HDLParsers:164 - "test.vhd" Line 3. parse error ("Xilinx XST" "xflow" "" "make" "-f \\1" nil "mkdir \\1" "./" "work/" "Makefile" "xilinx" - ("^ERROR:HDLParsers:[0-9]+ - \"\\([^ \t\n]+\\)\" Line \\([0-9]+\\)\." 1 2 nil) ("" 0) + ("^ERROR:HDLParsers:[0-9]+ - \"\\([^ \t\n]+\\)\" Line \\([0-9]+\\)\\." 1 2 nil) ("" 0) nil) ) "List of available VHDL compilers and their properties. @@ -376,8 +376,8 @@ Compiler: Make command : command used for compilation using a Makefile Make options : make options (\"\\1\" inserts Makefile name) Generate Makefile: use built-in function or command to generate a Makefile - \(\"\\1\" inserts Makefile name, \"\\2\" inserts library name) - Library command : command to create library directory \(\"\\1\" inserts + (\"\\1\" inserts Makefile name, \"\\2\" inserts library name) + Library command : command to create library directory (\"\\1\" inserts library directory, \"\\2\" inserts library name) Compile directory: where compilation is run and the Makefile is placed Library directory: directory of default library @@ -519,9 +519,9 @@ with other user Makefiles." Allows you to insert user specific parts into a Makefile. Example: - \(lambda nil - \(re-search-backward \"^# Rule for compiling entire design\") - \(insert \"# My target\\n\\n.MY_TARGET :\\n\\n\\n\"))" + (lambda nil + (re-search-backward \"^# Rule for compiling entire design\") + (insert \"# My target\\n\\n.MY_TARGET :\\n\\n\\n\"))" :type 'hook :group 'vhdl-compile) @@ -573,7 +573,7 @@ Is overwritten by project settings if a project is active." \"\\3\" project-specific options) - Do not compile: do not compile this file (in Makefile) Compile directory: where compilation is run and the Makefile is placed - \(\"\\1\" inserts compiler ID string) + (\"\\1\" inserts compiler ID string) Library name : name of library (default is \"work\") Library directory: path to library (\"\\1\" inserts compiler ID string) Makefile name : name of Makefile @@ -997,7 +997,7 @@ if the header needs to be version controlled. The following keywords for template generation are supported: <filename> : replaced by the name of the buffer <author> : replaced by the user name and email address - \(`user-full-name',`mail-host-address', `user-mail-address') + (`user-full-name',`mail-host-address', `user-mail-address') <authorfull> : replaced by the user full name (`user-full-name') <login> : replaced by user login name (`user-login-name') <company> : replaced by contents of option `vhdl-company-name' @@ -1678,8 +1678,8 @@ syntax (as regular expression) are highlighted in the corresponding color. Name : string of words and spaces Regexp : regular expression describing word syntax - (e.g. \"\\\\=\<\\\w+_c\\\\=\>\" matches word with suffix \"_c\") - expression must start with \"\\\\=\<\" and end with \"\\\\=\>\" + (e.g., `\\=\\<\\w+_c\\>' matches word with suffix `_c') + expression must start with `\\=\\<' and end with `\\>' if only whole words should be matched (no substrings) Color (light): foreground color for light background (matching color examples: Gold3, Grey50, LimeGreen, Tomato, @@ -1690,14 +1690,14 @@ syntax (as regular expression) are highlighted in the corresponding color. In comments : If non-nil, words are also highlighted inside comments Can be used for visual support of naming conventions, such as highlighting -different kinds of signals (e.g. \"Clk50\", \"Rst_n\") or objects (e.g. -\"Signal_s\", \"Variable_v\", \"Constant_c\") by distinguishing them using +different kinds of signals (e.g. `Clk50', `Rst_n') or objects (e.g. +`Signal_s', `Variable_v', `Constant_c') by distinguishing them using common substrings or name suffices. For each entry, a new face is generated with the specified colors and name -\"vhdl-font-lock-\" + name + \"-face\". +`vhdl-font-lock-' + name + `-face'. NOTE: Activate a changed regexp in a VHDL buffer by re-fontifying it (menu - entry \"Fontify Buffer\"). All other changes require restarting Emacs." + entry `Fontify Buffer'). All other changes require restarting Emacs." :type '(repeat (list :tag "Face" :indent 2 (string :tag "Name ") (regexp :tag "Regexp " "\\w+_") @@ -4323,7 +4323,7 @@ Usage: TEMPLATE INSERTION (electrification): After typing a VHDL keyword and entering `SPC', you are prompted for arguments while a template is generated for that VHDL construct. Typing - `RET' or `C-g' at the first \(mandatory) prompt aborts the current + `RET' or `C-g' at the first (mandatory) prompt aborts the current template generation. Optional arguments are indicated by square brackets and removed if the queried string is left empty. Prompts for mandatory arguments remain in the code if the queried string is left @@ -4342,7 +4342,7 @@ Usage: conf, comp, cons, func, inst, pack, sig, var. Template styles can be customized in customization group - `vhdl-template' \(see OPTIONS). + `vhdl-template' (see OPTIONS). HEADER INSERTION: @@ -4373,7 +4373,7 @@ Usage: Typing `TAB' after `(' looks for and inserts complete parenthesized expressions (e.g. for array index ranges). All keywords as well as standard types and subprograms of VHDL have predefined abbreviations - \(e.g. type \"std\" and `TAB' will toggle through all standard types + (e.g., type \"std\" and `TAB' will toggle through all standard types beginning with \"std\"). Typing `TAB' after a non-word character indents the line if at the @@ -4417,7 +4417,7 @@ Usage: the entire region. Indentation can be done for a group of lines (`C-c C-i C-g'), a region - \(`M-C-\\') or the entire buffer (menu). Argument and port lists are + (`M-C-\\') or the entire buffer (menu). Argument and port lists are indented normally (nil) or relative to the opening parenthesis (non-nil) according to option `vhdl-argument-list-indent'. @@ -4563,7 +4563,7 @@ Usage: Enables simple structural composition. `C-c C-m C-n' creates a skeleton for a new component. Subcomponents (i.e. component declaration and instantiation) can be automatically placed from a previously read port - \(`C-c C-m C-p') or directly from the hierarchy browser (`P'). Finally, + (`C-c C-m C-p') or directly from the hierarchy browser (`P'). Finally, all subcomponents can be automatically connected using internal signals and ports (`C-c C-m C-w') following these rules: - subcomponent actual ports with same name are considered to be @@ -4763,7 +4763,7 @@ Usage: Insert them once manually (will be kept afterwards). - Out parameters of procedures are considered to be read. Use option `vhdl-entity-file-name' to specify the entity file name - \(used to obtain the port names). + (used to obtain the port names). Use option `vhdl-array-index-record-field-in-sensitivity-list' to specify whether to include array indices and record fields in sensitivity lists. @@ -4771,12 +4771,12 @@ Usage: CODE FIXING: `C-c C-x C-p' fixes the closing parenthesis of a generic/port clause - \(e.g. if the closing parenthesis is on the wrong line or is missing). + (e.g., if the closing parenthesis is on the wrong line or is missing). PRINTING: PostScript printing with different faces (an optimized set of faces is - used if `vhdl-print-customize-faces' is non-nil) or colors \(if + used if `vhdl-print-customize-faces' is non-nil) or colors (if `ps-print-color-p' is non-nil) is possible using the standard Emacs PostScript printing commands. Option `vhdl-print-two-column' defines appropriate default settings for nice landscape two-column printing. @@ -4808,7 +4808,7 @@ Usage: automatically recognized as VHDL source files. To add an extension \".xxx\", add the following line to your Emacs start-up file (`.emacs'): - \(push \\='(\"\\\\.xxx\\\\\\='\" . vhdl-mode) auto-mode-alist) + (push \\='(\"\\\\.xxx\\\\\\='\" . vhdl-mode) auto-mode-alist) HINTS: @@ -4895,7 +4895,7 @@ Key bindings: (syntax-propertize-rules ;; Mark single quotes as having string quote syntax in ;; 'c' instances. - ("\\(\'\\).\\(\'\\)" (1 "\"'") (2 "\"'")))) + ("\\('\\).\\('\\)" (1 "\"'") (2 "\"'")))) (set (make-local-variable 'font-lock-syntactic-keywords) vhdl-font-lock-syntactic-keywords)) (unless vhdl-emacs-21 @@ -6707,7 +6707,7 @@ search, and an argument indicating an interactive call." (re-search-forward vhdl-e-o-s-re)) (defconst vhdl-b-o-s-re - (concat ";[^_]\\|\([^_]\\|\)[^_]\\|\\bwhen\\b[^_]\\|" + (concat ";[^_]\\|([^_]\\|)[^_]\\|\\bwhen\\b[^_]\\|" vhdl-begin-bwd-re "\\|" vhdl-statement-bwd-re)) (defun vhdl-beginning-of-statement-1 (&optional lim) @@ -8061,25 +8061,25 @@ end of line, do nothing in comments and strings." (setq end (point-marker)) ;; have no space before and one space after `,' and ';' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\s-*\\([,;]\\)\\)" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|'.'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\s-*\\([,;]\\)\\)" end t) (if (match-string 1) (goto-char (match-end 1)) (replace-match "\\3 " nil nil nil 2))) ;; have no space after `(' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\((\\)\\s-+" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|'.'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\((\\)\\s-+" end t) (if (match-string 1) (goto-char (match-end 1)) (replace-match "\\2"))) ;; have no space before `)' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\|^\\s-+\\)\\|\\s-+\\()\\)" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|'.'\\|\\\\[^\\\n]*[\\\n]\\|^\\s-+\\)\\|\\s-+\\()\\)" end t) (if (match-string 1) (goto-char (match-end 1)) (replace-match "\\2"))) ;; surround operator symbols by one space (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\([^/:<>=\n]\\)\\(:\\|\\??=\\|\\??<<\\|\\??>>\\|\\??<\\|\\??>\\|:=\\|\\??<=\\|\\??>=\\|=>\\|\\??/=\\|\\?\\?\\)\\([^=>\n]\\|$\\)\\)" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|'.'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\([^/:<>=\n]\\)\\(:\\|\\??=\\|\\??<<\\|\\??>>\\|\\??<\\|\\??>\\|:=\\|\\??<=\\|\\??>=\\|=>\\|\\??/=\\|\\?\\?\\)\\([^=>\n]\\|$\\)\\)" end t) (if (or (match-string 1) (<= (match-beginning 0) ; not if at boi (save-excursion (back-to-indentation) (point)))) @@ -11858,7 +11858,7 @@ reflected in a subsequent paste operation." (save-excursion (re-search-backward (concat "^\\s-*use\\s-+" (car clause) - "\." (cdr clause) "\\>") nil t))) + "." (cdr clause) "\\>") nil t))) (vhdl-template-standard-package (car clause) (cdr clause)) (insert "\n")) (setq clause-list (cdr clause-list))))) @@ -12113,7 +12113,7 @@ reflected in a subsequent paste operation." (insert name)) ((equal (cdr vhdl-instance-name) "") (setq name (vhdl-template-field "instance name"))) - ((string-match "\%d" (cdr vhdl-instance-name)) + ((string-match "%d" (cdr vhdl-instance-name)) (let ((n 1)) (while (save-excursion (setq name (format (vhdl-replace-string @@ -12978,7 +12978,7 @@ File statistics: \"%s\"\n\ # empty lines : %5d\n\ # comment lines : %5d\n\ # comments : %5d\n\ -# total lines : %5d\n\ " +# total lines : %5d\n" (buffer-file-name) no-stats no-code-lines no-empty-lines no-comm-lines no-comments no-lines) (unless vhdl-emacs-21 (vhdl-show-messages)))) @@ -13121,7 +13121,7 @@ File statistics: \"%s\"\n\ (vhdl-resolve-env-variable (vhdl-replace-string (cons "\\(.*\\) \\(.*\\)" (car file-name-list)) - (concat "\*" " " (user-login-name))))))) + (concat "* " (user-login-name))))))) (setq list-length (or list-length (length file-list))) (setq file-name-list (cdr file-name-list))) (while file-list @@ -13306,7 +13306,7 @@ File statistics: \"%s\"\n\ ;; Syntax definitions (defconst vhdl-font-lock-syntactic-keywords - '(("\\(\'\\).\\(\'\\)" (1 (7 . ?\')) (2 (7 . ?\')))) + '(("\\('\\).\\('\\)" (1 (7 . ?\')) (2 (7 . ?\')))) "Mark single quotes as having string quote syntax in 'c' instances.") (defvar vhdl-font-lock-keywords nil @@ -15461,19 +15461,19 @@ NO-POSITION non-nil means do not re-position cursor." (let* ((file-entry (vhdl-aget file-alist speedbar-last-selected-file))) (vhdl-speedbar-update-units - "\\[.\\] " (nth 0 file-entry) + "\\[.] " (nth 0 file-entry) speedbar-last-selected-file 'vhdl-speedbar-entity-face) (vhdl-speedbar-update-units "{.} " (nth 1 file-entry) speedbar-last-selected-file 'vhdl-speedbar-architecture-face) (vhdl-speedbar-update-units - "\\[.\\] " (nth 3 file-entry) + "\\[.] " (nth 3 file-entry) speedbar-last-selected-file 'vhdl-speedbar-configuration-face) (vhdl-speedbar-update-units "[]>] " (nth 4 file-entry) speedbar-last-selected-file 'vhdl-speedbar-package-face) (vhdl-speedbar-update-units - "\\[.\\].+(" '("body") + "\\[.].+(" '("body") speedbar-last-selected-file 'vhdl-speedbar-package-face) (vhdl-speedbar-update-units "> " (nth 6 file-entry) @@ -15482,19 +15482,19 @@ NO-POSITION non-nil means do not re-position cursor." (let* ((file-entry (vhdl-aget file-alist file-name))) (setq pos (vhdl-speedbar-update-units - "\\[.\\] " (nth 0 file-entry) + "\\[.] " (nth 0 file-entry) file-name 'vhdl-speedbar-entity-selected-face pos) pos (vhdl-speedbar-update-units "{.} " (nth 1 file-entry) file-name 'vhdl-speedbar-architecture-selected-face pos) pos (vhdl-speedbar-update-units - "\\[.\\] " (nth 3 file-entry) + "\\[.] " (nth 3 file-entry) file-name 'vhdl-speedbar-configuration-selected-face pos) pos (vhdl-speedbar-update-units "[]>] " (nth 4 file-entry) file-name 'vhdl-speedbar-package-selected-face pos) pos (vhdl-speedbar-update-units - "\\[.\\].+(" '("body") + "\\[.].+(" '("body") file-name 'vhdl-speedbar-package-selected-face pos) pos (vhdl-speedbar-update-units "> " (nth 6 file-entry) @@ -15926,7 +15926,7 @@ is already shown in a buffer." (if (not (or is-entity (vhdl-speedbar-check-unit 'subprogram))) (error "ERROR: No entity/component or subprogram under cursor") (beginning-of-line) - (if (looking-at "\\([0-9]\\)+:\\s-*\\(\\[[-+?]\\]\\|>\\) \\(\\(\\w\\|\\s_\\)+\\)") + (if (looking-at "\\([0-9]\\)+:\\s-*\\(\\[[-+?]]\\|>\\) \\(\\(\\w\\|\\s_\\)+\\)") (condition-case info (let ((token (get-text-property (match-beginning 3) 'speedbar-token))) @@ -17864,17 +17864,17 @@ NOTE: click `mouse-2' on variable names above (not in XEmacs).") For VHDL coding style and naming convention guidelines, see the following references: -\[1] Ben Cohen. +[1] Ben Cohen. \"VHDL Coding Styles and Methodologies\". Kluwer Academic Publishers, 1999. http://members.aol.com/vhdlcohen/vhdl/ -\[2] Michael Keating and Pierre Bricaud. +[2] Michael Keating and Pierre Bricaud. \"Reuse Methodology Manual, Second Edition\". Kluwer Academic Publishers, 1999. http://www.openmore.com/openmore/rmm2.html -\[3] European Space Agency. +[3] European Space Agency. \"VHDL Modelling Guidelines\". ftp://ftp.estec.esa.nl/pub/vhdl/doc/ModelGuide.{pdf,ps} diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index d5243dac769..cf61073b442 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -347,9 +347,9 @@ the command interpreter stack: Some possible command interpreter types and their meanings are: -\[Evaluator] read-eval-print loop for evaluating expressions -\[Debugger] single character commands for debugging errors -\[Where] single character commands for examining environments +[Evaluator] read-eval-print loop for evaluating expressions +[Debugger] single character commands for debugging errors +[Where] single character commands for examining environments Starting with release 6.2 of Scheme, the latter two types of command interpreters will change the major mode of the Scheme process buffer diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 218a02a7f6d..e9294279c23 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1684,7 +1684,7 @@ non-default settings would be \"LPT1\" to \"LPT3\" for parallel printers, or for a shared network printer. You can also set it to a name of a file, in which case the output gets appended to that file. \(Note that `ps-print' package already has facilities for printing to a file, so you might as well use -them instead of changing the setting of this variable.\) If you want to +them instead of changing the setting of this variable.) If you want to silently discard the printed output, set this to \"NUL\". Set to t, if the utility given by `ps-lpr-command' needs an empty printer name. @@ -3172,7 +3172,7 @@ This variable is used only when `ps-print-color-p' is set to `black-white'." font-lock-variable-name-face font-lock-keyword-face font-lock-warning-face)) - "A list of the \(non-bold\) faces that should be printed in bold font. + "A list of the (non-bold) faces that should be printed in bold font. This applies to generating PostScript." :type '(repeat face) :version "20" @@ -3185,7 +3185,7 @@ This applies to generating PostScript." font-lock-string-face font-lock-comment-face font-lock-warning-face)) - "A list of the \(non-italic\) faces that should be printed in italic font. + "A list of the (non-italic) faces that should be printed in italic font. This applies to generating PostScript." :type '(repeat face) :version "20" @@ -3196,7 +3196,7 @@ This applies to generating PostScript." '(font-lock-function-name-face font-lock-constant-face font-lock-warning-face)) - "A list of the \(non-underlined\) faces that should be printed underlined. + "A list of the (non-underlined) faces that should be printed underlined. This applies to generating PostScript." :type '(repeat face) :version "20" diff --git a/lisp/replace.el b/lisp/replace.el index 37e97e2c215..d84f3a24f61 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1,4 +1,4 @@ -;;; replace.el --- replace commands for Emacs +;;; replace.el --- replace commands for Emacs -*- coding: utf-8 -*- ;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2015 Free ;; Software Foundation, Inc. @@ -76,7 +76,7 @@ to the minibuffer that reads the string to replace, or invoke replacements from Isearch by using a key sequence like `C-s C-s M-%'." "24.3") (defcustom query-replace-from-to-separator - (propertize (if (char-displayable-p ?\u2192) " \u2192 " " -> ") + (propertize (if (char-displayable-p ?→) " → " " -> ") 'face 'minibuffer-prompt) "String that separates FROM and TO in the history of replacement pairs." ;; Avoids error when attempt to autoload char-displayable-p fails diff --git a/lisp/simple.el b/lisp/simple.el index f80faae80d8..8acb6839744 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8424,6 +8424,38 @@ contains the list of implementations currently supported for this command." command-name))))))) +;;; Functions for changing capitalization that Do What I Mean +(defun upcase-dwim (arg) + "Upcase words in the region, if active; if not, upcase word at point. +If the region is active, this function calls `upcase-region'. +Otherwise, it calls `upcase-word', with prefix argument passed to it +to upcase ARG words." + (interactive "*p") + (if (use-region-p) + (upcase-region (region-beginning) (region-end)) + (upcase-word arg))) + +(defun downcase-dwim (arg) + "Downcase words in the region, if active; if not, downcase word at point. +If the region is active, this function calls `downcase-region'. +Otherwise, it calls `downcase-word', with prefix argument passed to it +to downcase ARG words." + (interactive "*p") + (if (use-region-p) + (downcase-region (region-beginning) (region-end)) + (downcase-word arg))) + +(defun capitalize-dwim (arg) + "Capitalize words in the region, if active; if not, capitalize word at point. +If the region is active, this function calls `capitalize-region'. +Otherwise, it calls `capitalize-word', with prefix argument passed to it +to capitalize ARG words." + (interactive "*p") + (if (use-region-p) + (capitalize-region (region-beginning) (region-end)) + (capitalize-word arg))) + + (provide 'simple) diff --git a/lisp/sort.el b/lisp/sort.el index 9b8cec6ac68..9843749f0c8 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -316,7 +316,7 @@ FIELD, BEG and END. BEG and END specify region to sort." ;; (point) ;; (save-excursion ;; (re-search-forward -;; "[+-]?[0-9]*\.?[0-9]*\\([eE][+-]?[0-9]+\\)?") +;; "[+-]?[0-9]*\\.?[0-9]*\\([eE][+-]?[0-9]+\\)?") ;; (point)))))) ;; nil)) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 97c977cf1fc..17430587818 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -2857,7 +2857,7 @@ indicator, then do not add a space." (progn (goto-char speedbar-ro-to-do-point) (while (and (not (input-pending-p)) - (re-search-forward "^\\([0-9]+\\):\\s-*[[<][+-\?][]>] " + (re-search-forward "^\\([0-9]+\\):\\s-*[[<][+-?][]>] " nil t)) (setq speedbar-ro-to-do-point (point)) (let ((f (speedbar-line-file))) diff --git a/lisp/startup.el b/lisp/startup.el index 9caf485c1e8..33855673170 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -114,7 +114,7 @@ the remaining command-line args are in the variable `command-line-args-left'.") (defvaralias 'argv 'command-line-args-left "List of command-line args not yet processed. -This is a convenience alias, so that one can write \(pop argv\) +This is a convenience alias, so that one can write \(pop argv) inside of --eval command line arguments in order to access following arguments.") (internal-make-var-non-special 'argv) @@ -803,19 +803,61 @@ to prepare for opening the first frame (e.g. open a connection to an X server)." (defvar server-name) (defvar server-process) -(defun startup--setup-quote-display () - "Display ASCII approximations on user request or if curved quotes don't work." - (when (memq text-quoting-style '(nil grave straight)) - (dolist (char-repl '((?‘ . ?\`) (?’ . ?\') (?“ . ?\") (?” . ?\"))) - (let ((char (car char-repl)) - (repl (cdr char-repl))) - (when (or text-quoting-style (not (char-displayable-p char))) - (when (and (eq repl ?\`) (eq text-quoting-style 'straight)) - (setq repl ?\')) - (unless standard-display-table - (setq standard-display-table (make-display-table))) - (aset standard-display-table char - (vector (make-glyph-code repl 'shadow)))))))) +(defun startup--setup-quote-display (&optional style) + "If needed, display ASCII approximations to curved quotes. +Do this by modifying `standard-display-table'. Optional STYLE +specifies the desired quoting style, as in `text-quoting-style'. +If STYLE is nil, display appropriately for the terminal." + (let ((repls (let ((style-repls (assq style '((grave . "`'\"\"") + (straight . "''\"\""))))) + (if style-repls (cdr style-repls) (make-vector 4 nil)))) + glyph-count) + ;; REPLS is a sequence of the four replacements for "‘’“”", respectively. + ;; If STYLE is nil, infer REPLS from terminal characteristics. + (unless style + ;; On a terminal that supports glyph codes, + ;; GLYPH-COUNT[i] is the number of times that glyph code I + ;; represents either an ASCII character or one of the 4 + ;; quote characters. This assumes glyph codes are valid + ;; Elisp characters, which is a safe assumption in practice. + (when (integerp (internal-char-font nil (max-char))) + (setq glyph-count (make-char-table nil 0)) + (dotimes (i 132) + (let ((glyph (internal-char-font + nil (if (< i 128) i (aref "‘’“”" (- i 128)))))) + (when (<= 0 glyph) + (aset glyph-count glyph (1+ (aref glyph-count glyph))))))) + (dotimes (i 2) + (let ((lq (aref "‘“" i)) (rq (aref "’”" i)) + (lr (aref "`\"" i)) (rr (aref "'\"" i)) + (i2 (* i 2))) + (unless (if glyph-count + ;; On a terminal that supports glyph codes, use + ;; ASCII replacements unless both quotes are displayable. + ;; If not using ASCII replacements, highlight + ;; quotes unless they are both unique among the + ;; 128 + 4 characters of concern. + (let ((lglyph (internal-char-font nil lq)) + (rglyph (internal-char-font nil rq))) + (when (and (<= 0 lglyph) (<= 0 rglyph)) + (setq lr lq rr rq) + (and (= 1 (aref glyph-count lglyph)) + (= 1 (aref glyph-count rglyph))))) + ;; On a terminal that does not support glyph codes, use + ;; ASCII replacements unless both quotes are displayable. + (and (char-displayable-p lq) + (char-displayable-p rq))) + (aset repls i2 lr) + (aset repls (1+ i2) rr))))) + (dotimes (i 4) + (let ((char (aref "‘’“”" i)) + (repl (aref repls i))) + (if repl + (aset (or standard-display-table + (setq standard-display-table (make-display-table))) + char (vector (make-glyph-code repl 'escape-glyph))) + (when standard-display-table + (aset standard-display-table char nil))))))) (defun command-line () "A subroutine of `normal-top-level'. @@ -1239,11 +1281,6 @@ the `--debug-init' option to view a complete error backtrace." ;; unibyte (display table, terminal coding system &c). (set-language-environment current-language-environment))) - ;; Setup quote display again, if the init file sets - ;; text-quoting-style to a non-nil value. - (when (and (not noninteractive) text-quoting-style) - (startup--setup-quote-display)) - ;; Do this here in case the init file sets mail-host-address. (if (equal user-mail-address "") (setq user-mail-address (or (getenv "EMAIL") @@ -1933,7 +1970,7 @@ To quit a partially entered command, type Control-g.\n") 'action (lambda (_button) (info-emacs-manual)) 'follow-link t) (insert "\tView the Emacs manual using Info\n") - (insert-button "\(Non)Warranty" + (insert-button "(Non)Warranty" 'action (lambda (_button) (describe-no-warranty)) 'follow-link t) (insert "\t\tGNU Emacs comes with ABSOLUTELY NO WARRANTY\n") diff --git a/lisp/subr.el b/lisp/subr.el index ce3011d4e46..b1b363864f9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1503,19 +1503,6 @@ All symbols are bound before the VALUEFORMs are evalled." ,@(mapcar (lambda (binder) `(setq ,@binder)) binders) ,@body)) -(defmacro let-when-compile (bindings &rest body) - "Like `let', but allow for compile time optimization. -Use BINDINGS as in regular `let', but in BODY each usage should -be wrapped in `eval-when-compile'. -This will generate compile-time constants from BINDINGS." - (declare (indent 1) (debug let)) - (cl-progv (mapcar #'car bindings) - (mapcar (lambda (x) (eval (cadr x))) bindings) - (macroexpand-all - (macroexp-progn - body) - macroexpand-all-environment))) - (defmacro with-wrapper-hook (hook args &rest body) "Run BODY, using wrapper functions from HOOK with additional ARGS. HOOK is an abnormal hook. Each hook function in HOOK \"wraps\" diff --git a/lisp/term.el b/lisp/term.el index 06a44f29058..e5ae5530ce9 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1919,7 +1919,7 @@ A useful command to bind to SPC. See `term-replace-by-expanded-history'." (defun term-within-quotes (beg end) "Return t if the number of quotes between BEG and END is odd. Quotes are single and double." - (let ((countsq (term-how-many-region "\\(^\\|[^\\\\]\\)\'" beg end)) + (let ((countsq (term-how-many-region "\\(^\\|[^\\\\]\\)'" beg end)) (countdq (term-how-many-region "\\(^\\|[^\\\\]\\)\"" beg end))) (or (= (mod countsq 2) 1) (= (mod countdq 2) 1)))) diff --git a/lisp/term/README b/lisp/term/README index 35715d97bb4..d01f133e5fb 100644 --- a/lisp/term/README +++ b/lisp/term/README @@ -7,22 +7,22 @@ terminal types. When Emacs opens a new terminal, it checks the TERM environment variable to see what type of terminal the user is running on. (If there is an entry -for TERM in the `term-file-aliases' variable, Emacs uses the associated value +for TERM in the 'term-file-aliases' variable, Emacs uses the associated value in place of TERM in the following.) Emacs searches for an elisp file named "term/${TERM}.el", and if one exists, loads it. If Emacs finds no suitable file, then it strips the last hyphen and what follows it from TERM, and tries again. If that still doesn't yield a file, then the previous hyphen is stripped, and so on until all hyphens are gone. For example, if the -terminal type is `aaa-48-foo', Emacs will try first `term/aaa-48-foo.el', then -`term/aaa-48.el' and finally `term/aaa.el'. Emacs stops searching at the +terminal type is 'aaa-48-foo', Emacs will try first 'term/aaa-48-foo.el', then +'term/aaa-48.el' and finally 'term/aaa.el'. Emacs stops searching at the first file found, and will not load more than one file for any terminal. Note that it is not an error if Emacs is unable to find a terminal initialization file; in that case, it will simply proceed with the next step without loading any files. Once the file has been loaded (or the search failed), Emacs tries to call a -function named `terminal-init-TERMINALNAME' (eg `terminal-init-aaa-48' for the -`aaa-48' terminal) in order to initialize the terminal. Once again, if the +function named 'terminal-init-TERMINALNAME' (eg 'terminal-init-aaa-48' for the +'aaa-48' terminal) in order to initialize the terminal. Once again, if the function is not found, Emacs strips the last component of the name and tries again using the shorter name. This search is independent of the previous file search, so that you can have terminal initialization functions for a family of @@ -40,7 +40,7 @@ declaration. Simply loading the file should not have any side effect. given terminal, when the first frame is created on it. The function is not called for subsequent frames on the same terminal. Therefore, terminal-init-* functions should only modify terminal-local variables (such as -`local-function-key-map') and terminal parameters. For example, it is not +'local-function-key-map') and terminal parameters. For example, it is not correct to modify frame parameters, since the modifications will only be applied for the first frame opened on the terminal. @@ -51,7 +51,7 @@ mind. First, about keycap names. Your terminal package can create any keycap cookies it likes, but there are good reasons to stick to the set recognized by the X-windows code whenever possible. The key symbols recognized by Emacs -are listed in src/term.c; look for the string `keys' in that file. +are listed in src/term.c; look for the string 'keys' in that file. For one thing, it means that you'll have the same Emacs key bindings on in terminal mode as on an X console. If there are differences, you can bet @@ -61,7 +61,7 @@ they'll frustrate you after you've forgotten about them. about. It tries to bind many of them to useful things at startup, before your .emacs is read (so you can override them). In some ways, the X keysym standard is a admittedly poor one; it's incomplete, and not well matched to the set of -`virtual keys' that UNIX terminfo(3) provides. But, trust us, the alternatives +'virtual keys' that UNIX terminfo(3) provides. But, trust us, the alternatives were worse. This doesn't mean that if your terminal has a "Cokebottle" key you shouldn't @@ -70,7 +70,7 @@ that set, try to pattern them on the standard terminfo variable names for clarity; also, for a fighting chance that your binding may be useful to someone else someday. - For example, if your terminal has a `find' key, observe that terminfo + For example, if your terminal has a 'find' key, observe that terminfo supports a key_find capability and call your cookie [find]. Here is a complete list, with corresponding X keysyms. @@ -184,14 +184,14 @@ key_f36 FQ function key 36 key_f64 k1 function key 64 (1) The terminfo documentation says this may be the 'insert character' or - `enter insert mode' key. Accordingly, key_ic is mapped to the `insertchar' - keysym if there is also a key_dc key; otherwise it's mapped to `insert'. - The presumption is that keyboards with `insert character' keys usually - have `delete character' keys paired with them. + 'enter insert mode' key. Accordingly, key_ic is mapped to the 'insertchar' + keysym if there is also a key_dc key; otherwise it's mapped to 'insert'. + The presumption is that keyboards with 'insert character' keys usually + have 'delete character' keys paired with them. (2) If there is no key_next key but there is a key_npage key, key_npage - will be bound to the `next' keysym. If there is no key_previous key but - there is a key_ppage key, key_ppage will be bound to the `previous' keysym. + will be bound to the 'next' keysym. If there is no key_previous key but + there is a key_ppage key, key_ppage will be bound to the 'previous' keysym. (3) Sorry, these are not exact but they're the best we can do. @@ -242,7 +242,7 @@ the setup code to bind anything else. If your terminal's arrow key sequences are so funky that they conflict with normal Emacs key bindings, the package should set up a function called -(enable-foo-arrow-keys), where `foo' becomes the terminal name, and leave +(enable-foo-arrow-keys), where 'foo' becomes the terminal name, and leave it up to the user's .emacs file whether to call it. Before writing a terminal-support package, it's a good idea to read the diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index a21c105fb98..373f81238a2 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -243,7 +243,7 @@ The properties returned may include `top', `left', `height', and `width'." (insert ns-input-spi-arg)) ((string-equal ns-input-spi-name "mail-to") (compose-mail ns-input-spi-arg)) - (t (error (concat "Service " ns-input-spi-name " not recognized"))))) + (t (error "Service %s not recognized" ns-input-spi-name)))) ;; Composed key sequence handling for Nextstep system input methods. diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el index 98108ce6356..3bc1aa0ee48 100644 --- a/lisp/term/tty-colors.el +++ b/lisp/term/tty-colors.el @@ -810,9 +810,11 @@ Value is the modified color alist for FRAME." (while colors (tty-color-define (car color) (cadr color) (cddr color)) (setq colors (cdr colors) color (car colors))) - ;; Modifying color mappings means realized faces don't - ;; use the right colors, so clear them. - (clear-face-cache))) + ;; Modifying color mappings means realized faces don't use the + ;; right colors, so clear them, if we modified colors on a TTY + ;; frame. + (or (display-graphic-p) + (clear-face-cache)))) (defun tty-color-canonicalize (color) "Return COLOR in canonical form. diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 279f657c0ec..df8066ee2fc 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -433,7 +433,7 @@ is present; but these fields are required otherwise. OPTIONAL is a list of optional fields. Each element of these lists is a list of the form - \(FIELD COMMENT INIT ALTERNATIVE). + (FIELD COMMENT INIT ALTERNATIVE). COMMENT, INIT, and ALTERNATIVE are optional. FIELD is the name of the field. @@ -2620,7 +2620,7 @@ is returned unchanged." "Get content of BibTeX field FIELD. Return empty string if not found. Optional arg CHANGE-LIST is a list of substitution patterns that is applied to the content of FIELD. It is an alist with pairs -\(OLD-REGEXP . NEW-STRING\)." +\(OLD-REGEXP . NEW-STRING)." (let* ((bibtex-expand-strings bibtex-autokey-expand-strings) (content (bibtex-text-in-field field bibtex-autokey-use-crossref)) case-fold-search) @@ -3647,7 +3647,7 @@ If optional arg CONTENT is non-nil extract content of text fields." (defun bibtex-autofill-entry () "Try to fill fields of current BibTeX entry based on neighboring entries. The current entry must have a key. Determine the neighboring entry -\(previous or next\) whose key is more similar to the key of the current +\(previous or next) whose key is more similar to the key of the current entry. For all empty fields of the current entry insert the corresponding field contents of the neighboring entry. Finally try to update the text based on the difference between the keys of the neighboring and the current @@ -5111,7 +5111,7 @@ entries from minibuffer." "Browse a URL for the BibTeX entry at point. Optional POS is the location of the BibTeX entry. The URL is generated using the schemes defined in `bibtex-generate-url-list' -\(see there\). If multiple schemes match for this entry, or the same scheme +\(see there). If multiple schemes match for this entry, or the same scheme matches more than once, use the one for which the first step's match is the closest to POS. The URL is passed to `browse-url' unless NO-BROWSE is t. Return the URL or nil if none can be generated." diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index 267d23f38de..770571a264e 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -434,7 +434,7 @@ For details see `conf-mode'. Example: # Conf mode font-locks this right on Unix and with \\[conf-unix-mode] -\[Desktop Entry] +[Desktop Entry] Encoding=UTF-8 Name=The GIMP Name[ca]=El GIMP @@ -449,11 +449,11 @@ For details see `conf-mode'. Example: ; Conf mode font-locks this right on Windows and with \\[conf-windows-mode] -\[ExtShellFolderViews] +[ExtShellFolderViews] Default={5984FFE0-28D4-11CF-AE66-08002B2E1262} {5984FFE0-28D4-11CF-AE66-08002B2E1262}={5984FFE0-28D4-11CF-AE66-08002B2E1262} -\[{5984FFE0-28D4-11CF-AE66-08002B2E1262}] +[{5984FFE0-28D4-11CF-AE66-08002B2E1262}] PersistMoniker=file://Folder.htt" (conf-mode-initialize ";")) diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 639456dc77e..5f4eebdf977 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -78,8 +78,8 @@ "list-style" "list-style-image" "list-style-position" "list-style-type" "margin" "margin-bottom" "margin-left" "margin-right" "margin-top" "max-height" "max-width" "min-height" - "min-width" "orphans" "overflow" "padding" "padding-bottom" - "padding-left" "padding-right" "padding-top" "page-break-after" + "min-width" "orphans" "padding" "padding-bottom" "padding-left" + "padding-right" "padding-top" "page-break-after" "page-break-before" "page-break-inside" "pause" "pause-after" "pause-before" "pitch" "pitch-range" "play-during" "position" "quotes" "richness" "right" "speak" "speak-header" "speak-numeral" @@ -136,6 +136,10 @@ "font-variant-east-asian" "font-variant-ligatures" "font-variant-numeric" "font-variant-position" "font-weight" + ;; CSS Overflow Module Level 3 + ;; (http://www.w3.org/TR/css-overflow-3/#property-index) + "max-lines" "overflow" "overflow-x" "overflow-y" + ;; CSS Text Decoration Module Level 3 ;; (http://dev.w3.org/csswg/css-text-decor-3/#property-index) "text-decoration" "text-decoration-color" "text-decoration-line" @@ -265,7 +269,7 @@ "\\(?:\\(:" (regexp-opt (append css-pseudo-class-ids css-pseudo-element-ids) t) "\\|\\::" (regexp-opt css-pseudo-element-ids t) "\\)" - "\\(?:([^\)]+)\\)?" + "\\(?:([^)]+)\\)?" (if (not sassy) "[^:{}\n]*" (concat "[^:{}\n#]*\\(?:" scss--hash-re "[^:{}\n#]*\\)*")) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 87c2a95da49..fe27f0f158c 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -699,8 +699,8 @@ re-start Emacs." Each element of this list is also a list: -\(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P - ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET\) + (DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P + ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET) DICTIONARY-NAME is a possible string value of variable `ispell-dictionary', nil means the default dictionary. @@ -747,7 +747,7 @@ when the language uses non-ASCII characters. Note that with \"ispell\" as the speller, the CASECHARS and OTHERCHARS slots of the alist should contain the same character set as casechars and otherchars in the LANGUAGE.aff file \(e.g., -english.aff\). Aspell and Hunspell don't have this limitation.") +english.aff). Aspell and Hunspell don't have this limitation.") (defvar ispell-really-aspell nil "Non-nil if we can use Aspell extensions.") @@ -2024,7 +2024,7 @@ in a window allowing you to choose one. If optional argument FOLLOWING is non-nil or if `ispell-following-word' is non-nil when called interactively, then the following word -\(rather than preceding\) is checked when the cursor is not over a word. +\(rather than preceding) is checked when the cursor is not over a word. When the optional argument QUIETLY is non-nil or `ispell-quietly' is non-nil when called interactively, non-corrective messages are suppressed. @@ -2044,7 +2044,7 @@ Return values: nil word is correct or spelling is accepted. 0 word is inserted into buffer-local definitions. \"word\" word corrected from word list. -\(\"word\" arg\) word is hand entered. +\(\"word\" arg) word is hand entered. quit spell session exited." (interactive (list ispell-following-word ispell-quietly current-prefix-arg t)) (cond @@ -2162,7 +2162,7 @@ quit spell session exited." "Return the word for spell-checking according to ispell syntax. If optional argument FOLLOWING is non-nil or if `ispell-following-word' is non-nil when called interactively, then the following word -\(rather than preceding\) is checked when the cursor is not over a word. +\(rather than preceding) is checked when the cursor is not over a word. Optional second argument contains otherchars that can be included in word many times (see the doc string of `ispell-dictionary-alist' for details about otherchars). diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el index b9b72ea644f..0ca4cbefe93 100644 --- a/lisp/textmodes/makeinfo.el +++ b/lisp/textmodes/makeinfo.el @@ -228,7 +228,7 @@ nonsensical results." "Make Info file from current buffer. Use the \\[next-error] command to move to the next error -\(if there are errors\)." +\(if there are errors)." (interactive) (cond ((null buffer-file-name) diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 57134e06c19..99962c75897 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -446,7 +446,7 @@ REVERSE (non-nil means reverse order), BEG and END (region to sort)." (defun sort-pages-buffer (&optional reverse) "Sort pages alphabetically in buffer. Prefix arg means reverse order. -\(Non-nil arg if not interactive.\)" +\(Non-nil arg if not interactive.)" (interactive "P") (or reverse (setq reverse nil)) @@ -461,7 +461,7 @@ REVERSE (non-nil means reverse order), BEG and END (region to sort)." (defvar pages-directory-previous-regexp nil "Value of previous regexp used by `pages-directory'. \(This regular expression may be used to select only those pages that -contain matches to the regexp.\)") +contain matches to the regexp.)") (defvar pages-buffer nil "The buffer for which the pages-directory function creates the directory.") diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el index 8d824ebad35..22dc7dc9165 100644 --- a/lisp/textmodes/refer.el +++ b/lisp/textmodes/refer.el @@ -229,7 +229,7 @@ found on the last `refer-find-entry' or `refer-find-next-entry'." (sit-for 1) (setq files (cdr files)))))) (ding) - (message "Keywords \"%s\" not found in any \.bib file" keywords)) + (message "Keywords \"%s\" not found in any .bib file" keywords)) (select-window old-window))) (defun refer-find-entry-in-file (keywords-list file &optional old-pos) @@ -351,21 +351,21 @@ found on the last `refer-find-entry' or `refer-find-next-entry'." (if (progn (goto-char (point-min)) (re-search-forward (concat refer-bib-files-regexp - "\\s-*\{") nil t)) + "\\s-*{") nil t)) (let ((files (list (buffer-substring (point) (progn - (re-search-forward "[,\}]" + (re-search-forward "[,}]" nil t) (backward-char 1) (point)))))) - (while (not (looking-at "\}")) + (while (not (looking-at "}")) (setq files (append files (list (buffer-substring (progn (forward-char 1) (point)) (progn (re-search-forward - "[,\}]" nil t) + "[,}]" nil t) (backward-char 1) (point))))))) files) diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 17e8cfdc83c..8f3f2ccd061 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -210,7 +210,9 @@ Return list with entries." (setq first-re (car re-list) ; We'll use the first re to find things, rest-re (cdr re-list)) ; the others to narrow down. (if (string-match "\\`[ \t]*\\'" (or first-re "")) - (error "Empty regular expression")) + (user-error "Empty regular expression")) + (if (string-match first-re "") + (user-error "Regular expression matches the empty string.")) (save-excursion (save-window-excursion @@ -385,7 +387,7 @@ The environment should be located in FILES." (buffer-substring-no-properties start end) "[ \t\n\r]*\\\\bibitem[ \t]*\ -\\(\\[[^]]*]\\)*\[ \t]*")))))) +\\(\\[[^]]*]\\)*[ \t]*")))))) (goto-char end)))))) (unless entries (error "No bibitems found")) @@ -477,7 +479,7 @@ If RAW is non-nil, keep double quotes/curly braces delimiting fields." (goto-char (point-min)) (if (re-search-forward "@\\(\\(?:\\w\\|\\s_\\)+\\)[ \t\n\r]*\ -\[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t) +[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t) (setq alist (list (cons "&type" (downcase (reftex-match-string 1))) @@ -1195,7 +1197,7 @@ created files in the variables `reftex-create-bibtex-header' or (widen) (goto-char (point-min)) (while (re-search-forward "^[ \t]*@\\(?:\\w\\|\\s_\\)+[ \t\n\r]*\ -\[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t) +[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t) (setq key (match-string 1) beg (match-beginning 0) end (progn diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 7f186afc27c..f57113177c5 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -244,7 +244,7 @@ of master file." (when (or (null reftex-label-ignored-macros-and-environments) ;; \label{} defs should always be honored, ;; just no keyval style [label=foo] defs. - (string-equal "\label{" (substring (reftex-match-string 0) 0 7)) + (string-equal "\\label{" (substring (reftex-match-string 0) 0 7)) (if (and (fboundp 'TeX-current-macro) (fboundp 'LaTeX-current-environment)) (not (or (member (save-match-data (TeX-current-macro)) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 482dd4c6396..357a0938e6a 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1991,7 +1991,8 @@ symbol indicating in what context the hook is called." (defcustom reftex-extra-bindings nil "Non-nil means, make additional key bindings on startup. -These extra bindings are located in the users `C-c letter' map." +These extra bindings are located in the users `C-c letter' map. +Note that this variable needs to be set before reftex is loaded." :group 'reftex-miscellaneous-configurations :type 'boolean) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 7dc91844583..fb96c6c551b 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2354,7 +2354,7 @@ what in fact did happen. Check if the bug is reproducible with an up-to-date version of RefTeX available from http://www.gnu.org/software/auctex/. -If the bug is triggered by a specific \(La\)TeX file, you should try +If the bug is triggered by a specific \(La)TeX file, you should try to produce a minimal sample file showing the problem and include it in your report. @@ -2446,7 +2446,7 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL). See ;;;*** -;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "83811ccf3471820f0ad0dc005ffc88d5") +;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "751df6ee674ea533b755e8cda4ad1cf8") ;;; Generated autoloads from reftex-cite.el (autoload 'reftex-default-bibliography "reftex-cite" "\ @@ -2774,7 +2774,7 @@ Here are all local bindings. ;;;*** -;;;### (autoloads nil "reftex-parse" "reftex-parse.el" "c327a848a6d168412b1a9be9f2e3dce8") +;;;### (autoloads nil "reftex-parse" "reftex-parse.el" "7bfdcb2f040dbe9a08d2c38c005c8f21") ;;; Generated autoloads from reftex-parse.el (autoload 'reftex-parse-one "reftex-parse" "\ diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 9625ec2c7cc..4c234c9a31f 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -296,7 +296,7 @@ in parentheses follows the development revision and the time stamp.") ;; syntax. (defconst rst-bullets ;; Sorted so they can form a character class when concatenated. - '(?- ?* ?+ ?\u2022 ?\u2023 ?\u2043) + '(?- ?* ?+ ?• ?‣ ?⁃) "List of all possible bullet characters for bulleted lists.") (defconst rst-uri-schemes @@ -392,8 +392,8 @@ in parentheses follows the development revision and the time stamp.") ; item tag. ;; Inline markup (`ilm') - (ilm-pfx (:alt "^" hws-prt "[-'\"([{<\u2018\u201c\u00ab\u2019/:]")) - (ilm-sfx (:alt "$" hws-prt "[]-'\")}>\u2019\u201d\u00bb/:.,;!?\\]")) + (ilm-pfx (:alt "^" hws-prt "[-'\"([{<‘“«’/:]")) + (ilm-sfx (:alt "$" hws-prt "[]-'\")}>’”»/:.,;!?\\]")) ;; Inline markup content (`ilc') (ilcsgl-tag "\\S ") ; A single non-white character. @@ -442,7 +442,7 @@ in parentheses follows the development revision and the time stamp.") (opt-tag (:shy optsta-tag optnam-tag optarg-tag "?")) ; A complete option. ;; Footnotes and citations (`fnc') - (fncnam-prt "[^\]\n]") ; Part of a footnote or citation name. + (fncnam-prt "[^]\n]") ; Part of a footnote or citation name. (fncnam-tag fncnam-prt "+") ; A footnote or citation name. (fnc-tag "\\[" fncnam-tag "]") ; A complete footnote or citation tag. (fncdef-tag-2 (:grp exm-sta) @@ -512,7 +512,7 @@ in parentheses follows the development revision and the time stamp.") ; colon tag. ;; Comments (`cmt') - (cmt-sta-1 (:grp exm-sta) "[^\[|_\n]" + (cmt-sta-1 (:grp exm-sta) "[^[|_\n]" (:alt "[^:\n]" (:seq ":" (:alt "[^:\n]" "$"))) "*$") ; Start of a comment block; first group is explicit markup ; start. @@ -778,12 +778,12 @@ This inherits from Text mode.") (modify-syntax-entry ?\\ "\\" st) (modify-syntax-entry ?_ "." st) (modify-syntax-entry ?| "." st) - (modify-syntax-entry ?\u00ab "." st) - (modify-syntax-entry ?\u00bb "." st) - (modify-syntax-entry ?\u2018 "." st) - (modify-syntax-entry ?\u2019 "." st) - (modify-syntax-entry ?\u201c "." st) - (modify-syntax-entry ?\u201d "." st) + (modify-syntax-entry ?« "." st) + (modify-syntax-entry ?» "." st) + (modify-syntax-entry ?‘ "." st) + (modify-syntax-entry ?’ "." st) + (modify-syntax-entry ?“ "." st) + (modify-syntax-entry ?” "." st) st) "Syntax table used while in `rst-mode'.") @@ -4235,4 +4235,8 @@ column is used (fill-column vs. end of previous/next line)." (provide 'rst) +;; Local Variables: +;; coding: utf-8 +;; End: + ;;; rst.el ends here diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index cb65e5f1073..55a1e6d26db 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -525,7 +525,7 @@ Do \\[describe-key] on the following bindings to discover what they do. ;; This is desirable because SGML discards a newline that appears ;; immediately after a start tag or immediately before an end tag. (setq-local paragraph-start (concat "[ \t]*$\\|\ -\[ \t]*</?\\(" sgml-name-re sgml-attrs-re "\\)?>")) +[ \t]*</?\\(" sgml-name-re sgml-attrs-re "\\)?>")) (setq-local paragraph-separate (concat paragraph-start "$")) (setq-local adaptive-fill-regexp "[ \t]*") (add-hook 'fill-nobreak-predicate 'sgml-fill-nobreak nil t) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 5fdf9e3b250..bf15b2628f9 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -135,8 +135,8 @@ If nil, TeX runs with no options. See the documentation of `tex-command'." "TeX commands to use when starting TeX. They are shell-quoted and precede the input file name, with a separating space. If nil, no commands are used. See the documentation of `tex-command'." - :type '(radio (const :tag "Interactive \(nil\)" nil) - (const :tag "Nonstop \(\"\\nonstopmode\\input\"\)" + :type '(radio (const :tag "Interactive (nil)" nil) + (const :tag "Nonstop (\"\\nonstopmode\\input\")" "\\nonstopmode\\input") (string :tag "String at your choice")) :group 'tex-run @@ -266,8 +266,8 @@ tex shell terminates.") (defvar tex-command "tex" "Command to run TeX. -If this string contains an asterisk \(`*'\), that is replaced by the file name; -otherwise the value of `tex-start-options', the \(shell-quoted\) +If this string contains an asterisk \(`*'), that is replaced by the file name; +otherwise the value of `tex-start-options', the \(shell-quoted) value of `tex-start-commands', and the file name are added at the end with blanks as separators. @@ -387,7 +387,7 @@ An alternative value is \" . \", if you use a font with a narrow period." (goto-char (point-min)) (while (search-forward-regexp "\\\\\\(include\\|input\\|verbatiminput\\|bibliography\\)\ -\[ \t]*{\\([^}\n]+\\)}" +[ \t]*{\\([^}\n]+\\)}" nil t) (push (cons (concat "<<" (buffer-substring-no-properties (match-beginning 2) @@ -1550,7 +1550,7 @@ Puts point on a blank line between them." "\\end{" str "}" > \n) (define-skeleton latex-insert-item - "Insert a \item macro." + "Insert an \\item macro." nil \n "\\item " >) @@ -2955,7 +2955,7 @@ There might be text before point." ("\\beta" . ?β) ("\\gamma" . ?γ) ("\\delta" . ?δ) - ("\\epsilon" . ?ε) + ("\\epsilon" . ?ϵ) ("\\zeta" . ?ζ) ("\\eta" . ?η) ("\\theta" . ?θ) @@ -3272,7 +3272,8 @@ There might be text before point." ("\\prod" . ?∏) ("\\propto" . ?∝) ("\\qed" . ?∎) - ("\\quad" . ? ) + ("\\qquad" . ?⧢) + ("\\quad" . ?␣) ("\\rangle" . 10217) ; Literal ?⟩ breaks indentation. ("\\rbrace" . ?}) ("\\rbrack" . ?\]) @@ -3357,8 +3358,10 @@ There might be text before point." ("\\urcorner" . ?⌝) ("\\u{i}" . ?ĭ) ("\\vDash" . ?⊨) + ("\\varepsilon" . ?ε) ("\\varprime" . ?′) ("\\varpropto" . ?∝) + ("\\varrho" . ?ϱ) ;; ("\\varsigma" ?ς) ;FIXME: Looks reversed with the non\var. ("\\vartriangleleft" . ?⊲) ("\\vartriangleright" . ?⊳) @@ -3406,16 +3409,17 @@ There might be text before point." (defun tex--prettify-symbols-compose-p (start end _match) (let* ((after-char (char-after end)) - (after-syntax (char-syntax after-char))) + (after-syntax (char-syntax after-char))) (not (or ;; Don't compose \alpha@foo. - (eq after-syntax ?_) - ;; Don't compose inside verbatim blocks! - (nth 8 (syntax-ppss)) - ;; The \alpha in \alpha2 may be composed but of course \alphax may not. + (eq after-char ?@) + ;; The \alpha in \alpha2 or \alpha-\beta may be composed but + ;; of course \alphax may not. (and (eq after-syntax ?w) - (or (< after-char ?0) - (> after-char ?9))))))) + (not (memq after-char + '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?+ ?- ?' ?\")))) + ;; Don't compose inside verbatim blocks. + (eq 2 (nth 7 (syntax-ppss))))))) (run-hooks 'tex-mode-load-hook) diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 37f10a8e871..500c1e38394 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -1043,7 +1043,7 @@ Leave point after argument." (setq texinfo-command-end (point))) (t (error - "Invalid `texinfo-optional-braces-discard' format \(need braces?\)"))) + "Invalid `texinfo-optional-braces-discard' format (need braces?)"))) (delete-region texinfo-command-start texinfo-command-end))) (defun texinfo-format-parse-line-args () @@ -2336,7 +2336,7 @@ Use only the FILENAME arg; for Info, ignore the other arguments to @image." ;; Write a `@definfoenclose' command on a line and follow it with three ;; arguments separated by commas (commas are used as separators in an ;; `@node' line in the same way). The first argument to -;; `@definfoenclose' is the @-command name \(without the `@'\); the +;; `@definfoenclose' is the @-command name (without the `@'); the ;; second argument is the Info start delimiter string; and the third ;; argument is the Info end delimiter string. The latter two arguments ;; enclose the highlighted text in the Info file. A delimiter string @@ -2491,8 +2491,8 @@ surrounded by in angle brackets." Enclose the verbatim text, including the delimiters, in braces. Print text exactly as written (but not the delimiters) in a fixed-width. -For example, @verb\{|@|\} results in @ and -@verb\{+@\\='e?\\=`!\\=`+} results in @\\='e?\\=`!\\=`." +For example, @verb{|@|} results in @ and +@verb{+@\\='e?\\=`!\\=`+} results in @\\='e?\\=`!\\=`." (let ((delimiter (buffer-substring-no-properties (1+ texinfo-command-end) (+ 2 texinfo-command-end)))) diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 2c6d5b3827c..57218177d7b 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -86,7 +86,7 @@ command to gain use of `next-error'." "Make Info file from current buffer. Use the \\[next-error] command to move to the next error -\(if there are errors\)." +\(if there are errors)." t nil) (autoload 'kill-compilation diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index 0508426619f..321967a3721 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -694,8 +694,8 @@ section titles are often too short to explain a node well. MENU-LIST has form: - \(\(\"node-name1\" . \"description\"\) - \(\"node-name2\" . \"description\"\) ... \) + ((\"node-name1\" . \"description\") + (\"node-name2\" . \"description\") ... ) However, the description field might be nil. @@ -1002,9 +1002,9 @@ following menu and the title of the node preceding that menu. The master menu list has this form: - \(\(\(... \"entry-1-2\" \"entry-1\"\) \"title-1\"\) - \(\(... \"entry-2-2\" \"entry-2-1\"\) \"title-2\"\) - ...\) + (((... \"entry-1-2\" \"entry-1\") \"title-1\") + ((... \"entry-2-2\" \"entry-2-1\") \"title-2\") + ...) However, there does not need to be a title field." @@ -1018,7 +1018,7 @@ However, there does not need to be a title field." "Format and insert the master menu in the current buffer." (goto-char (point-min)) ;; Insert a master menu only after `Top' node and before next node - ;; \(or include file if there is no next node\). + ;; (or include file if there is no next node). (unless (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t) (error "This buffer needs a Top node")) (let ((first-chapter @@ -1407,7 +1407,7 @@ level in the Texinfo file; when looking for the `Previous' pointer, the section found will be at the same or higher hierarchical level in the Texinfo file; when looking for the `Up' pointer, the section found will be at some level higher in the Texinfo file. The fourth argument -\(one of `next', `previous', or `up'\) specifies whether to find the +\(one of `next', `previous', or `up') specifies whether to find the `Next', `Previous', or `Up' pointer." (let ((case-fold-search t)) (cond ((eq direction 'next) @@ -1850,8 +1850,8 @@ chapters." ;; The menu-list has the form: ;; -;; \(\(\"node-name1\" . \"title1\"\) -;; \(\"node-name2\" . \"title2\"\) ... \) +;; ((\"node-name1\" . \"title1\") +;; (\"node-name2\" . \"title2\") ... ) ;; ;; However, there does not need to be a title field and this function ;; does not fill it; however a comment tells you how to do so. diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index a9c539b7b87..654bccd0988 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -219,7 +219,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." (defun thing-at-point-bounds-of-list-at-point () "Return the bounds of the list at point. -\[Internal function used by `bounds-of-thing-at-point'.]" +[Internal function used by `bounds-of-thing-at-point'.]" (save-excursion (let ((opoint (point)) (beg (ignore-errors diff --git a/lisp/tutorial.el b/lisp/tutorial.el index f8660f55f65..a4a422fbc4f 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -63,8 +63,8 @@ with default Emacs bindings information about this is shown. VALUE should have either of these formats: - \(cua-mode) - \(current-binding KEY-FUN DEF-FUN KEY WHERE) + (cua-mode) + (current-binding KEY-FUN DEF-FUN KEY WHERE) Where KEY is a key sequence whose standard binding has been changed @@ -135,7 +135,7 @@ options: ;; then save this value in mapsym (setq mapsym s))))) (insert - (format + (format-message "The default Emacs binding for the key %s is the command `%s'. " (key-description key) db)) @@ -402,8 +402,8 @@ where REMARK is a list with info about rebinding. It has either of these formats: - \(TEXT cua-mode) - \(TEXT current-binding KEY-FUN DEF-FUN KEY WHERE) + (TEXT cua-mode) + (TEXT current-binding KEY-FUN DEF-FUN KEY WHERE) Here TEXT is a link text to show to the user. The rest of the list is used to show information when diff --git a/lisp/type-break.el b/lisp/type-break.el index 85037364016..5f56956c52b 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -677,7 +677,7 @@ INTERVAL is the full length of an interval (defaults to TIME)." (defun type-break-check () "Ask to take a typing break if appropriate. This may be the case either because the scheduled time has come \(and the -minimum keystroke threshold has been reached\) or because the maximum +minimum keystroke threshold has been reached) or because the maximum keystroke threshold has been exceeded." (type-break-file-keystroke-count) (let* ((min-threshold (car type-break-keystroke-threshold)) diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index a7b3d16d46d..df9cf621037 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -264,7 +264,7 @@ telling Microsoft that." (and expires (string-match (concat "^[^,]+, +\\(..\\)-\\(...\\)-\\(..\\) +" - "\\(..:..:..\\) +\\[*\\([^\]]+\\)\\]*$") + "\\(..:..:..\\) +\\[*\\([^]]+\\)\\]*$") expires) (setq expires (concat (match-string 1 expires) " " (match-string 2 expires) " " @@ -356,7 +356,7 @@ to run the `url-cookie-setup-save-timer' function manually." (defun url-cookie-list () "Display a buffer listing the current URL cookies, if there are any. -Use \\<url-cookie-mode-map>\\\[url-cookie-delete] to remove cookies." +Use \\<url-cookie-mode-map>\\[url-cookie-delete] to remove cookies." (interactive) (when (and (null url-cookie-secure-storage) (null url-cookie-storage)) diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index 61ca0885ec5..1cf6b8209f9 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -495,7 +495,7 @@ make sure you are comfortable with it leaking to the outside world.") (defun url-dav-lock-resource (url exclusive &optional depth) "Request a lock on URL. If EXCLUSIVE is non-nil, get an exclusive lock. Optional 3rd argument DEPTH says how deep the lock should go, default is 0 -\(lock only the resource and none of its children\). +\(lock only the resource and none of its children). Returns a cons-cell of (SUCCESSFUL-RESULTS . FAILURE-RESULTS). SUCCESSFUL-RESULTS is a list of (URL STATUS locktoken). diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index cc0e4f8f8d6..ab61802a6bb 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -39,7 +39,7 @@ :group 'url-gateway) (defcustom url-gateway-prompt-pattern - "^[^#$%>;]*[#$%>;] *" ;; "bash\\|\$ *\r?$\\|> *\r?" + "^[^#$%>;]*[#$%>;] *" ;; "bash\\|[$>] *\r?$" "A regular expression matching a shell prompt." :type 'regexp :group 'url-gateway) diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 001a7831ad5..845195e7d4c 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -117,9 +117,9 @@ When URL Handler mode is enabled, this regular expression is added to `file-name-handler-alist'. Some valid URL protocols just do not make sense to visit -interactively \(about, data, info, irc, mailto, etc\). This +interactively \(about, data, info, irc, mailto, etc.). This regular expression avoids conflicts with local files that look -like URLs \(Gnus is particularly bad at this\)." +like URLs \(Gnus is particularly bad at this)." :group 'url :type 'regexp :version "25.1" diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 6a7d8e2c947..7367a1eb3e9 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -25,8 +25,8 @@ ;;; Code: +(require 'cl-lib) (eval-when-compile - (require 'cl-lib) (require 'subr-x)) (defvar url-callback-arguments) @@ -646,6 +646,12 @@ should be shown to the user." ;; compute the redirection relative to the URL of the proxy. (setq redirect-uri (url-expand-file-name redirect-uri url-http-target-url))) + ;; Do not automatically include an authorization header in the + ;; redirect. If needed it will be regenerated by the relevant + ;; auth scheme when the new request happens. + (setq url-http-extra-headers + (cl-remove "Authorization" + url-http-extra-headers :key 'car :test 'equal)) (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index d120d052215..9ab8d75fbb5 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -158,7 +158,7 @@ use the file's name relative to the directory of the change log file." :group 'change-log) (defcustom change-log-version-number-regexp-list - (let ((re "\\([0-9]+\.[0-9.]+\\)")) + (let ((re "\\([0-9]+\\.[0-9.]+\\)")) (list ;; (defconst ad-version "2.15" (concat "^(def[^ \t\n]+[ \t]+[^ \t\n][ \t]\"" re) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 37ed4a53b44..464e3754eb9 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1427,8 +1427,8 @@ modified lines of the diff." (diff-hunk-style))))) (set (make-local-variable 'whitespace-trailing-regexp) (if (eq style 'context) - "^[-\+!] .*?\\([\t ]+\\)$" - "^[-\+!<>].*?\\([\t ]+\\)$")))) + "^[-+!] .*?\\([\t ]+\\)$" + "^[-+!<>].*?\\([\t ]+\\)$")))) (defun diff-delete-if-empty () ;; An empty diff file means there's no more diffs to integrate, so we diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index 352892c945a..7647544d65d 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -168,7 +168,7 @@ This variable can be set either in .emacs or toggled interactively. Use `setq-default' if setting it in .emacs") (ediff-defvar-local ediff-auto-refine-limit 14000 - "Auto-refine only the regions of this size \(in bytes\) or less.") + "Auto-refine only the regions of this size (in bytes) or less.") ;;; General diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 8c935bfab19..bf211599b9f 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -776,7 +776,7 @@ TYPE-OF-EMACS is either 'xemacs or 'emacs." ;; A var local to each control panel buffer. Indicates highlighting style ;; in effect for this buffer: `face', `ascii', -;; `off' -- turned off \(on a dumb terminal only\). +;; `off' -- turned off (on a dumb terminal only). (ediff-defvar-local ediff-highlighting-style (if (and (ediff-has-face-support-p) ediff-use-faces) 'face 'ascii) "") diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index b45d533caea..a3b8bf0a28a 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -90,14 +90,14 @@ See also `ediff-backup-specs'." ;; traditional `patch' (format "-b %s" ediff-backup-extension)))) "Backup directives to pass to the patch program. -Ediff requires that the old version of the file \(before applying the patch\) +Ediff requires that the old version of the file \(before applying the patch) be saved in a file named `the-patch-file.extension'. Usually `extension' is `.orig', but this can be changed by the user and may depend on the system. Therefore, Ediff needs to know the backup extension used by the patch program. Some versions of the patch program let you specify `-b backup-extension'. Other versions only permit `-b', which assumes the extension `.orig' -\(in which case ediff-backup-extension MUST be also `.orig'\). The latest +\(in which case ediff-backup-extension MUST be also `.orig'). The latest versions of GNU patch require `-b -z backup-extension'. Note that both `ediff-backup-extension' and `ediff-backup-specs' @@ -333,7 +333,7 @@ program." (ediff-with-current-buffer standard-output (fundamental-mode)) (princ - (format " + (format-message " The patch file contains a context diff for %s %s @@ -342,7 +342,7 @@ to be patched on your system. If you know the correct file name, please enter it now. If you don't know and still would like to apply patches to -other files, enter /dev/null +other files, enter `/dev/null'. " (substring (car proposed-file-names) 6) (substring (cdr proposed-file-names) 6)))) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index bf5bb5cd5da..e664f9fdac3 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -1500,7 +1500,7 @@ Used in ediff-windows/regions only." (select-window wind))) (defun ediff-scroll-vertically (&optional arg) - "Vertically scroll buffers A, B \(and C if appropriate\). + "Vertically scroll buffers A, B (and C if appropriate). With optional argument ARG, scroll ARG lines; otherwise scroll by nearly the one half of the height of window-A." (interactive "P") @@ -1544,7 +1544,7 @@ the one half of the height of window-A." (defun ediff-scroll-horizontally (&optional arg) - "Horizontally scroll buffers A, B \(and C if appropriate\). + "Horizontally scroll buffers A, B (and C if appropriate). If an argument is given, that is how many columns are scrolled, else nearly the width of the A/B/C windows." (interactive "P") @@ -1822,7 +1822,7 @@ If the prefix is negative, count differences from the end." (defun ediff-jump-to-difference-at-point (arg) "Go to difference closest to the point in buffer A, B, or C. -The buffer depends on last command character \(a, b, or c\) that invoked this +The buffer depends on last command character \(a, b, or c) that invoked this command. For instance, if the command was `ga' then the point value in buffer A is used. With a prefix argument, synchronize all files around the current point position @@ -1921,7 +1921,7 @@ in the specified buffer." ;;; Copying diffs. (defun ediff-diff-to-diff (arg &optional keys) - "Copy buffer-X'th difference region to buffer Y \(X,Y are A, B, or C\). + "Copy buffer-X'th difference region to buffer Y (X,Y are A, B, or C). If numerical prefix argument, copy the difference specified in the arg. Otherwise, copy the difference given by `ediff-current-difference'. This command assumes it is bound to a 2-character key sequence, `ab', `ba', @@ -1986,7 +1986,7 @@ ARG is a prefix argument. If nil, copy the current difference region." -;; Copy diff N from FROM-BUF-TYPE \(given as A, B or C\) to TO-BUF-TYPE. +;; Copy diff N from FROM-BUF-TYPE (given as A, B or C) to TO-BUF-TYPE. ;; If optional DO-NOT-SAVE is non-nil, do not save the old value of the ;; target diff. This is used in merging, when constructing the merged ;; version. @@ -2065,7 +2065,7 @@ ARG is a prefix argument. If nil, copy the current difference region." (message "%s" messg)) )) -;; Save Nth diff of buffer BUF-TYPE \(A, B, or C\). +;; Save Nth diff of buffer BUF-TYPE (A, B, or C). ;; That is to say, the Nth diff on the `ediff-killed-diffs-alist'. REG ;; is the region to save. It is redundant here, but is passed anyway, for ;; convenience. @@ -2385,10 +2385,10 @@ the number seen by the user." "Finish an Ediff session and exit Ediff. Unselects the selected difference, if any, restores the read-only and modified flags of the compared file buffers, kills Ediff buffers for this session -\(but not buffers A, B, C\). +\(but not buffers A, B, C). If `ediff-keep-variants' is nil, the user will be asked whether the buffers -containing the variants should be removed \(if they haven't been modified\). +containing the variants should be removed \(if they haven't been modified). If it is t, they will be preserved unconditionally. A prefix argument, temporarily reverses the meaning of this variable." (interactive "P") @@ -3312,7 +3312,7 @@ and `wd' saves the diff output. With prefix argument, `wd' saves plain diff output. Without an argument, it saves customized diff argument, if available -\(and plain output, if customized output was not generated\)." +\(and plain output, if customized output was not generated)." (interactive "P") (ediff-barf-if-not-control-buffer) (ediff-compute-custom-diffs-maybe) diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index c31df824996..e0887f03b62 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -211,7 +211,7 @@ responsibility." "Function to call to determine the desired location for the control panel. Expects three parameters: the control buffer, the desired width and height of the control frame. It returns an association list -of the form \(\(top . <position>\) \(left . <position>\)\)" +of the form \((top . <position>) \(left . <position>))" :type 'function :group 'ediff-window) @@ -432,7 +432,7 @@ into icons, regardless of the window manager." three-way-comparison ediff-3way-comparison-job)) ;; if in minibuffer go somewhere else (if (save-match-data - (string-match "\*Minibuf-" (buffer-name (window-buffer)))) + (string-match "\\*Minibuf-" (buffer-name (window-buffer)))) (select-window (next-window nil 'ignore-minibuf))) (delete-other-windows) (set-window-dedicated-p (selected-window) nil) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 65ca0bd4408..3a2d1e48aac 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -963,7 +963,7 @@ If WIND-B is nil, use window next to WIND-A." ;;;###autoload (defun ediff-regions-wordwise (buffer-A buffer-B &optional startup-hooks) "Run Ediff on a pair of regions in specified buffers. -Regions \(i.e., point and mark\) can be set in advance or marked interactively. +Regions (i.e., point and mark) can be set in advance or marked interactively. This function is effective only for relatively small regions, up to 200 lines. For large regions, use `ediff-regions-linewise'." (interactive @@ -1003,7 +1003,7 @@ lines. For large regions, use `ediff-regions-linewise'." ;;;###autoload (defun ediff-regions-linewise (buffer-A buffer-B &optional startup-hooks) "Run Ediff on a pair of regions in specified buffers. -Regions \(i.e., point and mark\) can be set in advance or marked interactively. +Regions (i.e., point and mark) can be set in advance or marked interactively. Each region is enlarged to contain full lines. This function is effective for large regions, over 100-200 lines. For small regions, use `ediff-regions-wordwise'." diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index acbd9c0cd9f..9857116e2d4 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -905,7 +905,7 @@ Return non-nil if it is." The return value looks like this: (LOGBUFFER (ENTRYSTART ENTRYEND) ...) where LOGBUFFER is the name of the ChangeLog buffer, and each -\(ENTRYSTART . ENTRYEND\) pair is a buffer region." +\(ENTRYSTART . ENTRYEND) pair is a buffer region." (let ((changelog-file-name (let ((default-directory (file-name-directory (expand-file-name file))) diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 3a50c9b6a2d..ab3161e11e6 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -269,7 +269,7 @@ cover the range from the oldest annotation to the newest." (/ (- (if full newest current) oldest) (vc-annotate-oldest-in-map vc-annotate-color-map)) (if full newest)) - (message "Redisplaying annotation...done \(%s\)" + (message "Redisplaying annotation...done (%s)" (if full (format "Spanned from %.1f to %.1f days old" (- current oldest) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 5f8dd0bf0e8..9b2711d8146 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -649,7 +649,7 @@ or a superior directory.") "" (replace-regexp-in-string "\n[ \t]?" " " str))))) -(defun vc-bzr-checkin (files comment) +(defun vc-bzr-checkin (files comment &optional _rev) "Check FILES in to bzr with log message COMMENT." (apply 'vc-bzr-command "commit" nil 0 files (cons "-m" (log-edit-extract-headers diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 0aa9c5a1e22..5f5807fb3c6 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -107,7 +107,7 @@ switches." :version "25.1" :group 'vc-cvs) -(defcustom vc-cvs-header '("\$Id\$") +(defcustom vc-cvs-header '("$Id\ $") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist :type '(repeat string) @@ -332,38 +332,20 @@ its parents." (directory-file-name dir)))) (eq dir t))) -;; vc-cvs-checkin used to take a 'rev' second argument that allowed -;; checking in onto a specified branch tip rather than the current -;; default branch, but nothing in the entire rest of VC exercised -;; this code. Removing it simplifies the backend interface for all -;; modes. -;; -;; Here's the setup code preserved in amber, in case the logic needs -;; to be broken out into a method someday; (if rev (concat "-r" rev)) -;; used to be part of the switches passed to vc-cvs-command. -;; -;; (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) -;; (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) -;; (error "%s is not a valid symbolic tag name" rev) -;; ;; If the input revision is a valid symbolic tag name, we create it -;; ;; as a branch, commit and switch to it. -;; (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) -;; (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) -;; (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) -;; files))) -;; -;; The following postamble cleaned up after the branch change: -;; -;; ;; if this was an explicit check-in (does not include creation of -;; ;; a branch), remove the sticky tag. -;; (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) -;; (vc-cvs-command nil 0 files "update" "-A")))) -;; files))) -;; -(defun vc-cvs-checkin (files comment) +(defun vc-cvs-checkin (files comment &optional rev) "CVS-specific version of `vc-backend-checkin'." + (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) + (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) + (error "%s is not a valid symbolic tag name" rev) + ;; If the input revision is a valid symbolic tag name, we create it + ;; as a branch, commit and switch to it. + (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) + (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) + (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) + files))) (let ((status (apply 'vc-cvs-command nil 1 files - "ci" (concat "-m" comment) + "ci" (if rev (concat "-r" rev)) + (concat "-m" comment) (vc-switches 'CVS 'checkin)))) (set-buffer "*vc*") (goto-char (point-min)) @@ -394,7 +376,11 @@ its parents." ;; tell it from the permissions of the file (see ;; vc-cvs-checkout-model). (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil)) - files))) + files) + ;; if this was an explicit check-in (does not include creation of + ;; a branch), remove the sticky tag. + (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) + (vc-cvs-command nil 0 files "update" "-A")))) (defun vc-cvs-find-revision (file rev buffer) (apply 'vc-cvs-command @@ -932,7 +918,7 @@ state." (when (and full (re-search-forward "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ -\[\t ]+\\([0-9.]+\\)" +[\t ]+\\([0-9.]+\\)" nil t)) (vc-file-setprop file 'vc-latest-revision (match-string 2))) (vc-file-setprop diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 3326f2964c9..880e14be63e 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -82,7 +82,7 @@ See `vc-checkout-model' for a list of possible values." ;; Do we need to do anything here? FIXME? ) -(defun vc-dav-checkin (url comment) +(defun vc-dav-checkin (url comment &optional _rev) "Commit changes in URL to WebDAV. COMMENT is used as a check-in comment." ;; This should PUT the resource and release any locks that we hold. ) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 8a0f5547c4d..2f0439365e8 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -674,7 +674,7 @@ If toggling on, also insert its message into the buffer." "Major mode for editing Git log messages. It is based on `log-edit-mode', and has Git-specific extensions.") -(defun vc-git-checkin (files comment) +(defun vc-git-checkin (files comment &optional _rev) (let* ((file1 (or (car files) default-directory)) (root (vc-git-root file1)) (default-directory (expand-file-name root)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index f634e2eac53..49573986125 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -465,7 +465,7 @@ Optional arg REVISION is a revision to annotate from." (declare-function log-edit-extract-headers "log-edit" (headers string)) -(defun vc-hg-checkin (files comment) +(defun vc-hg-checkin (files comment &optional _rev) "Hg-specific version of `vc-backend-checkin'. REV is ignored." (apply 'vc-hg-command nil 0 files diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index 685ef3b6742..b56a08f2a9e 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -199,7 +199,7 @@ switches." (declare-function log-edit-extract-headers "log-edit" (headers string)) -(defun vc-mtn-checkin (files comment) +(defun vc-mtn-checkin (files comment &optional _rev) (apply 'vc-mtn-command nil 0 files (nconc (list "commit" "-m") (log-edit-extract-headers '(("Author" . "--author") diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 71ffa55a6e9..ba1336424ea 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -76,7 +76,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "21.1" :group 'vc-rcs) -(defcustom vc-rcs-header '("\$Id\$") +(defcustom vc-rcs-header '("$Id\ $") "Header keywords to be inserted by `vc-insert-headers'." :type '(repeat string) :version "24.1" ; no longer consult the obsolete vc-header-alist @@ -306,27 +306,23 @@ whether to remove it." (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) (delete-directory dir))))) -;; It used to be possible to pass in a value for the variable rev, but -;; nothing in the rest of VC used this capability. Removing it makes the -;; backend interface simpler for all modes. -;; -(defun vc-rcs-checkin (files comment) +(defun vc-rcs-checkin (files comment &optional rev) "RCS-specific version of `vc-backend-checkin'." - (let (rev (switches (vc-switches 'RCS 'checkin))) + (let ((switches (vc-switches 'RCS 'checkin))) ;; Now operate on the files (dolist (file (vc-expand-dirs files 'RCS)) (let ((old-version (vc-working-revision file)) new-version (default-branch (vc-file-getprop file 'vc-rcs-default-branch))) ;; Force branch creation if an appropriate ;; default branch has been set. - (and default-branch + (and (not rev) + default-branch (string-match (concat "^" (regexp-quote old-version) "\\.") default-branch) (setq rev default-branch) (setq switches (cons "-f" switches))) - (if old-version - (setq rev (vc-branch-part old-version)) - (error "can't find current branch")) + (if (and (not rev) old-version) + (setq rev (vc-branch-part old-version))) (apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file) ;; if available, use the secure check-in option (and (vc-rcs-release-p "5.6.4") "-j") @@ -1118,12 +1114,12 @@ Returns: nil if no headers were found (defun vc-release-greater-or-equal (r1 r2) "Compare release numbers, represented as strings. Release components are assumed cardinal numbers, not decimal fractions -\(5.10 is a higher release than 5.9\). Omitted fields are considered -lower \(5.6.7 is earlier than 5.6.7.1\). Comparison runs till the end +\(5.10 is a higher release than 5.9). Omitted fields are considered +lower \(5.6.7 is earlier than 5.6.7.1). Comparison runs till the end of the string is found, or a non-numeric component shows up \(5.6.7 is earlier than \"5.6.7 beta\", which is probably not what you want in -some cases\). This code is suitable for existing RCS release numbers. -CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5\)." +some cases). This code is suitable for existing RCS release numbers. +CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5)." (let (v1 v2 i1 i2) (catch 'done (or (and (string-match "^\\.?\\([0-9]+\\)" r1) diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 8d8d9e844ed..a3facc56d5d 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -222,10 +222,11 @@ to the SCCS command." (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "") (file-name-nondirectory file))))) -(defun vc-sccs-checkin (files comment) +(defun vc-sccs-checkin (files comment &optional rev) "SCCS-specific version of `vc-backend-checkin'." (dolist (file (vc-expand-dirs files 'SCCS)) (apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file) + (if rev (concat "-r" rev)) (concat "-y" comment) (vc-switches 'SCCS 'checkin)) (vc-sccs-do-command nil 0 "get" (vc-master-name file)))) diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index d9aa1b13e88..69e403668b1 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -227,7 +227,7 @@ This function differs from vc-do-command in that it invokes `vc-src-program'." file (file-name-directory file))))) -(defun vc-src-checkin (files comment) +(defun vc-src-checkin (files comment &optional _rev) "SRC-specific version of `vc-backend-checkin'. REV is ignored." (vc-src-command nil files "commit" "-m" comment)) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 755dbc1ca3b..4ef63a23db5 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -106,7 +106,7 @@ switches." :version "25.1" :group 'vc-svn) -(defcustom vc-svn-header '("\$Id\$") +(defcustom vc-svn-header '("$Id\ $") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist :type '(repeat string) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 3b9e788b7ab..f08e562efe5 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -233,12 +233,13 @@ ;; Unregister FILE from this backend. This is only needed if this ;; backend may be used as a "more local" backend for temporary editing. ;; -;; * checkin (files comment) +;; * checkin (files comment &optional rev) ;; ;; Commit changes in FILES to this backend. COMMENT is used as a ;; check-in comment. The implementation should pass the value of -;; vc-checkin-switches to the backend command. The revision argument -;; of some older VC versions is no longer supported. +;; vc-checkin-switches to the backend command. The optional REV +;; revision argument is only supported with some older VCSes, like +;; RCS and CVS, and is otherwise silently ignored. ;; ;; * find-revision (file rev buffer) ;; @@ -850,9 +851,9 @@ See `run-hooks'." (defcustom vc-static-header-alist '(("\\.c\\'" . - "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n#endif /* lint */\n")) + "\n#ifndef lint\nstatic char vcid[] = \"%s\";\n#endif /* lint */\n")) "Associate static header string templates with file types. -A \%s in the template is replaced with the first string associated with +A %s in the template is replaced with the first string associated with the file's version control type in `vc-BACKEND-header'." :type '(repeat (cons :format "%v" (regexp :tag "File Type") @@ -1221,10 +1222,15 @@ For old-style locking-based version control systems, like RCS: (message "No files remain to be committed") (if (not verbose) (vc-checkin ready-for-commit backend) - (let ((new-backend (vc-read-backend "New backend: "))) - (if new-backend - (dolist (file files) - (vc-transfer-file file new-backend)))))))) + (let* ((revision (read-string "New revision or backend: ")) + (revision-downcase (downcase revision))) + (if (member + revision-downcase + (mapcar (lambda (arg) (downcase (symbol-name arg))) + vc-handled-backends)) + (let ((vsym (intern revision-downcase))) + (dolist (file files) (vc-transfer-file file vsym))) + (vc-checkin ready-for-commit backend nil nil revision))))))) ;; locked by somebody else (locking VCSes only) ((stringp state) ;; In the old days, we computed the revision once and used it on @@ -1522,11 +1528,13 @@ Type \\[vc-next-action] to check in changes.") ".\n") (message "Please explain why you stole the lock. Type C-c C-c when done."))) -(defun vc-checkin (files backend &optional comment initial-contents) +(defun vc-checkin (files backend &optional comment initial-contents rev) "Check in FILES. COMMENT is a comment string; if omitted, a buffer is popped up to accept a comment. If INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents of the log entry buffer. +The optional argument REV may be a string specifying the new revision +level (only supported for some older VCSes, like RCS and CVS). Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." (when vc-before-checkin-hook @@ -1549,7 +1557,7 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." ;; vc-checkin-switches, but 'the' local buffer is ;; not a well-defined concept for filesets. (progn - (vc-call-backend backend 'checkin files comment) + (vc-call-backend backend 'checkin files comment rev) (mapc 'vc-delete-automatic-version-backups files)) `((vc-state . up-to-date) (vc-checkout-time . ,(nth 5 (file-attributes file))) @@ -2093,7 +2101,7 @@ changes from the current branch." (defun vc-tag-precondition (dir) "Scan the tree below DIR, looking for files not up-to-date. If any file is not up-to-date, return the name of the first such file. -\(This means, neither tag creation nor retrieval is allowed.\) +\(This means, neither tag creation nor retrieval is allowed.) If one or more of the files are currently visited, return `visited'. Otherwise, return nil." (let ((status nil)) diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 440a2786551..7e503269a8a 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -573,11 +573,11 @@ With optional NOT-THIS non-nil never return the current window. With NEW-WIN non-nil, display the virtual cursor buffer in another window if the virtual cursor is not currently visible \(note, however, -that this function never changes `window-point'\). +that this function never changes `window-point'). With THIS-FRAME non-nil, don't search other frames for a new window \(though if the vcursor is already off-frame then its current window is -always considered, and the value of `pop-up-frames' is always respected\). +always considered, and the value of `pop-up-frames' is always respected). Returns nil if the virtual cursor is not visible anywhere suitable. Set `vcursor-window' to the returned value as a side effect." diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 0c208502c34..839ca8c3ac5 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -891,22 +891,22 @@ Used when `whitespace-style' includes `lines' or `lines-tail'." ;; Hacked from `visible-whitespace-mappings' in visws.el (defcustom whitespace-display-mappings '( - (space-mark ?\ [?\u00B7] [?.]) ; space - centered dot - (space-mark ?\xA0 [?\u00A4] [?_]) ; hard space - currency + (space-mark ?\ [?·] [?.]) ; space - middle dot + (space-mark ?\xA0 [?¤] [?_]) ; hard space - currency sign ;; NEWLINE is displayed using the face `whitespace-newline' (newline-mark ?\n [?$ ?\n]) ; eol - dollar sign - ;; (newline-mark ?\n [?\u21B5 ?\n] [?$ ?\n]) ; eol - downwards arrow - ;; (newline-mark ?\n [?\u00B6 ?\n] [?$ ?\n]) ; eol - pilcrow - ;; (newline-mark ?\n [?\u00AF ?\n] [?$ ?\n]) ; eol - overscore - ;; (newline-mark ?\n [?\u00AC ?\n] [?$ ?\n]) ; eol - negation - ;; (newline-mark ?\n [?\u00B0 ?\n] [?$ ?\n]) ; eol - degrees + ;; (newline-mark ?\n [?↵ ?\n] [?$ ?\n]) ; eol - downwards arrow + ;; (newline-mark ?\n [?¶ ?\n] [?$ ?\n]) ; eol - pilcrow + ;; (newline-mark ?\n [?¯ ?\n] [?$ ?\n]) ; eol - overscore + ;; (newline-mark ?\n [?¬ ?\n] [?$ ?\n]) ; eol - negation + ;; (newline-mark ?\n [?° ?\n] [?$ ?\n]) ; eol - degrees ;; ;; WARNING: the mapping below has a problem. ;; When a TAB occupies exactly one column, it will display the ;; character ?\xBB at that column followed by a TAB which goes to ;; the next TAB column. ;; If this is a problem for you, please, comment the line below. - (tab-mark ?\t [?\u00BB ?\t] [?\\ ?\t]) ; tab - left quote mark + (tab-mark ?\t [?» ?\t] [?\\ ?\t]) ; tab - right guillemet ) "Specify an alist of mappings for displaying characters. @@ -2581,5 +2581,8 @@ It should be added buffer-locally to `write-file-functions'." (run-hooks 'whitespace-load-hook) +;; Local Variables: +;; coding: utf-8 +;; End: ;;; whitespace.el ends here diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index b64de4759d7..0d9157a5575 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2654,8 +2654,7 @@ Return an alist of (TYPE MATCH)." (save-excursion (let ((children (widget-get widget :children)) (inhibit-read-only t) - before-change-functions - after-change-functions) + (inhibit-modification-hooks t)) (cond (before (goto-char (widget-get before :entry-from))) (t @@ -2679,8 +2678,7 @@ Return an alist of (TYPE MATCH)." (let ((buttons (copy-sequence (widget-get widget :buttons))) button (inhibit-read-only t) - before-change-functions - after-change-functions) + (inhibit-modification-hooks t)) (while buttons (setq button (car buttons) buttons (cdr buttons)) @@ -2691,8 +2689,7 @@ Return an alist of (TYPE MATCH)." (let ((entry-from (widget-get child :entry-from)) (entry-to (widget-get child :entry-to)) (inhibit-read-only t) - before-change-functions - after-change-functions) + (inhibit-modification-hooks t)) (widget-delete child) (delete-region entry-from entry-to) (set-marker entry-from nil) diff --git a/lisp/winner.el b/lisp/winner.el index fdf62137514..a05f4ba867e 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -177,6 +177,11 @@ You may want to include buffer names such as *Help*, *Apropos*, ;; Called whenever the window configuration changes ;; (a `window-configuration-change-hook'). (defun winner-change-fun () + + ;; Cull dead frames. + (setq winner-modified-list + (cl-remove-if-not 'frame-live-p winner-modified-list)) + (unless (or (memq (selected-frame) winner-modified-list) (/= 0 (minibuffer-depth))) (push (selected-frame) winner-modified-list))) diff --git a/lisp/woman.el b/lisp/woman.el index f2e59e50bca..8fe1bfa0446 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -2716,7 +2716,7 @@ If DELETE is non-nil then delete from point." (defsubst woman-unescape (macro) "Replace escape sequences in the body of MACRO. -Replaces || by |, but | by \, where | denotes the internal escape." +Replaces || by |, but | by \\, where | denotes the internal escape." (let (start) (while (setq start (string-match woman-unescape-regex macro start)) (setq macro @@ -2838,7 +2838,7 @@ special characters." (defun woman-strings (&optional to) "Process ?roff string requests and escape sequences up to buffer position TO. Strings are defined/updated by `.ds xx string' requests and -interpolated by `\*x' and `\*(xx' escapes." +interpolated by `\\*x' and `\\*(xx' escapes." ;; Add support for .as and .rm? (while ;; Find .ds requests and \* escapes: @@ -3549,7 +3549,7 @@ The expression may be an argument in quotes." (if (> (woman-parse-numeric-value) 0) 1 0)) ))) )) -; (if (looking-at "[ \t\nRC\)\"]") ; R, C are tab types +; (if (looking-at "[ \t\nRC)\"]") ; R, C are tab types ; () ; (WoMan-warn "Unimplemented numerical operator `%c' in %s" ; (following-char) @@ -3583,7 +3583,7 @@ expression in parentheses. Leaves point after the value." ;; string-to-number returns 0 if number not parsed. (string-to-number (match-string 0))) ((looking-at "\\\\n\\([-+]\\)?\\(?:\ -\\[\\([^]]+\\)\\]\\|\(\\(..\\)\\|\\(.\\)\\)") +\\[\\([^]]+\\)\\]\\|(\\(..\\)\\|\\(.\\)\\)") ;; interpolate number register, maybe auto-incremented (let* ((pm (match-string-no-properties 1)) (name (or (match-string-no-properties 2) @@ -3761,7 +3761,7 @@ Round to whole lines, default 1 line. Format paragraphs upto TO. (defun woman2-TH (to) ".TH n c x v m -- Begin a man page. Format paragraphs upto TO. -n is the name of the page in chapter c\; x is extra commentary\; +n is the name of the page in chapter c; x is extra commentary; v alters page foot left; m alters page head center. \(Should set prevailing indent and tabs to 5.)" (woman-forward-arg 'unquote 'concat) @@ -4349,7 +4349,7 @@ Format paragraphs upto TO." (defun woman2-ta (to) ".ta Nt ... -- Set tabs, left type, unless t=R(right), C(centered). -\(Breaks, but should not.) The tab stops are separated by spaces\; +\(Breaks, but should not.) The tab stops are separated by spaces; a value preceded by + represents an increment to the previous stop value. Format paragraphs upto TO." (setq tab-stop-list nil) |
