Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
This commit is contained in:
commit
3f4f21b406
37 changed files with 734 additions and 663 deletions
|
@ -986,10 +986,8 @@ AS_IF([test $gl_gcc_warnings = no],
|
|||
|
||||
# More things that clang is unduly picky about.
|
||||
if test $emacs_cv_clang = yes; then
|
||||
gl_WARN_ADD([-Wno-format-extra-args])
|
||||
gl_WARN_ADD([-Wno-tautological-compare])
|
||||
gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
|
||||
gl_WARN_ADD([-Wno-unused-command-line-argument])
|
||||
gl_WARN_ADD([-Wno-unused-value])
|
||||
fi
|
||||
|
||||
# This causes too much noise in the MinGW build
|
||||
|
@ -5238,9 +5236,10 @@ emacs_config_features=
|
|||
for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
|
||||
GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
|
||||
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS MODULES \
|
||||
XWIDGETS LIBSYSTEMD; do
|
||||
XWIDGETS LIBSYSTEMD CANNOT_DUMP; do
|
||||
|
||||
case $opt in
|
||||
CANNOT_DUMP) eval val=\${$opt} ;;
|
||||
NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
|
||||
TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
|
||||
*) eval val=\${HAVE_$opt} ;;
|
||||
|
|
|
@ -285,7 +285,7 @@ connection the SMTP library uses. The default value is @code{nil},
|
|||
which means to use a plain connection, but try to switch to a STARTTLS
|
||||
encrypted connection if the server supports it. Other possible values
|
||||
are: @code{starttls} to insist on STARTTLS; @code{ssl} to use TLS/SSL;
|
||||
and @code{plain} for encryption.
|
||||
and @code{plain} for no encryption.
|
||||
|
||||
Use of any form of TLS/SSL requires support in Emacs. You can either
|
||||
use the built-in support (in Emacs 24.1 and later), or the
|
||||
|
|
4
etc/NEWS
4
etc/NEWS
|
@ -103,8 +103,8 @@ have been added. They are: 'file-attribute-type',
|
|||
'file-attribute-device-number'.
|
||||
|
||||
+++
|
||||
** The new function 'buffer-hash' computes compute a fast, non-consing
|
||||
hash of a buffer's contents.
|
||||
** The new function 'buffer-hash' computes a fast, non-consing hash of
|
||||
a buffer's contents.
|
||||
|
||||
---
|
||||
** 'fill-paragraph' no longer marks the buffer as changed unless it
|
||||
|
|
|
@ -2419,6 +2419,13 @@ files are installed. Then use:
|
|||
|
||||
(using the location of the 32-bit X libraries on your system).
|
||||
|
||||
*** Building on FreeBSD 11 fails at link time due to unresolved symbol
|
||||
|
||||
The symbol is sendmmsg@FBSD_1.4. This is due to a faulty libgio
|
||||
library on these systems. The solution is to reconfigure Emacs while
|
||||
disabling all the features that require libgio: rsvg, dbus, gconf, and
|
||||
imagemagick.
|
||||
|
||||
*** Building Emacs for Cygwin can fail with GCC 3
|
||||
|
||||
As of Emacs 22.1, there have been stability problems with Cygwin
|
||||
|
|
|
@ -592,7 +592,7 @@ software. By default:
|
|||
See `allout-plain-bullets-string' for the standard, alternating
|
||||
bullets.
|
||||
|
||||
You must run `set-allout-regexp' in order for outline mode to
|
||||
You must run `allout-set-regexp' in order for outline mode to
|
||||
adopt changes of this value.
|
||||
|
||||
DO NOT include the close-square-bracket, `]', on either of the bullet
|
||||
|
@ -947,13 +947,13 @@ case the value of `allout-default-layout' is used.")
|
|||
|
||||
Any line whose beginning matches this regexp is considered a
|
||||
heading. This var is set according to the user configuration vars
|
||||
by `set-allout-regexp'.")
|
||||
by `allout-set-regexp'.")
|
||||
(make-variable-buffer-local 'allout-regexp)
|
||||
;;;_ = allout-bullets-string
|
||||
(defvar allout-bullets-string ""
|
||||
"A string dictating the valid set of outline topic bullets.
|
||||
|
||||
This var should *not* be set by the user -- it is set by `set-allout-regexp',
|
||||
This var should *not* be set by the user -- it is set by `allout-set-regexp',
|
||||
and is produced from the elements of `allout-plain-bullets-string'
|
||||
and `allout-distinctive-bullets-string'.")
|
||||
(make-variable-buffer-local 'allout-bullets-string)
|
||||
|
@ -970,7 +970,7 @@ headers at depth 2 and greater. Use `allout-depth-one-regexp'
|
|||
for to seek topics at depth one.
|
||||
|
||||
This var is set according to the user configuration vars by
|
||||
`set-allout-regexp'. It is prepared with format strings for two
|
||||
`allout-set-regexp'. It is prepared with format strings for two
|
||||
decimal numbers, which should each be one less than the depth of the
|
||||
topic prefix to be matched.")
|
||||
(make-variable-buffer-local 'allout-depth-specific-regexp)
|
||||
|
@ -979,7 +979,7 @@ topic prefix to be matched.")
|
|||
"Regular expression to match a heading line prefix for depth one.
|
||||
|
||||
This var is set according to the user configuration vars by
|
||||
`set-allout-regexp'. It is prepared with format strings for two
|
||||
`allout-set-regexp'. It is prepared with format strings for two
|
||||
decimal numbers, which should each be one less than the depth of the
|
||||
topic prefix to be matched.")
|
||||
(make-variable-buffer-local 'allout-depth-one-regexp)
|
||||
|
@ -987,7 +987,7 @@ topic prefix to be matched.")
|
|||
(defvar allout-line-boundary-regexp ()
|
||||
"`allout-regexp' prepended with a newline for the search target.
|
||||
|
||||
This is properly set by `set-allout-regexp'.")
|
||||
This is properly set by `allout-set-regexp'.")
|
||||
(make-variable-buffer-local 'allout-line-boundary-regexp)
|
||||
;;;_ = allout-bob-regexp
|
||||
(defvar allout-bob-regexp ()
|
||||
|
@ -999,7 +999,7 @@ This is properly set by `set-allout-regexp'.")
|
|||
(make-variable-buffer-local 'allout-header-subtraction)
|
||||
;;;_ = allout-plain-bullets-string-len
|
||||
(defvar allout-plain-bullets-string-len (length allout-plain-bullets-string)
|
||||
"Length of `allout-plain-bullets-string', updated by `set-allout-regexp'.")
|
||||
"Length of `allout-plain-bullets-string', updated by `allout-set-regexp'.")
|
||||
(make-variable-buffer-local 'allout-plain-bullets-string-len)
|
||||
|
||||
;;;_ = allout-doublecheck-at-and-shallower
|
||||
|
@ -1034,7 +1034,7 @@ suitably economical.")
|
|||
(interactive "sNew lead string: ")
|
||||
(setq allout-header-prefix header-lead)
|
||||
(setq allout-header-subtraction (1- (length allout-header-prefix)))
|
||||
(set-allout-regexp))
|
||||
(allout-set-regexp))
|
||||
;;;_ X allout-lead-with-comment-string (header-lead)
|
||||
(defun allout-lead-with-comment-string (&optional header-lead)
|
||||
"Set the topic-header leading string to specified string.
|
||||
|
@ -1114,8 +1114,8 @@ file is programming code."
|
|||
comment-start
|
||||
(not (eq 'force allout-reindent-bodies)))
|
||||
(setq allout-reindent-bodies nil)))
|
||||
;;;_ > set-allout-regexp ()
|
||||
(defun set-allout-regexp ()
|
||||
;;;_ > allout-set-regexp ()
|
||||
(defun allout-set-regexp ()
|
||||
"Generate proper topic-header regexp form for outline functions.
|
||||
|
||||
Works with respect to `allout-plain-bullets-string' and
|
||||
|
@ -1242,12 +1242,13 @@ Also refresh various data structures that hinge on the regexp."
|
|||
"[^" allout-primary-bullet "]"))
|
||||
"\\)"
|
||||
))))
|
||||
(define-obsolete-function-alias 'set-allout-regexp 'allout-set-regexp "25.2")
|
||||
;;;_ : Menu bar
|
||||
(defvar allout-mode-exposure-menu)
|
||||
(defvar allout-mode-editing-menu)
|
||||
(defvar allout-mode-navigation-menu)
|
||||
(defvar allout-mode-misc-menu)
|
||||
(defun produce-allout-mode-menubar-entries ()
|
||||
(defun allout-produce-mode-menubar-entries ()
|
||||
(require 'easymenu)
|
||||
(easy-menu-define allout-mode-exposure-menu
|
||||
allout-mode-map-value
|
||||
|
@ -2029,7 +2030,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
|
|||
(allout-infer-header-lead-and-primary-bullet)
|
||||
(allout-infer-body-reindent)
|
||||
|
||||
(set-allout-regexp)
|
||||
(allout-set-regexp)
|
||||
(allout-add-resumptions '(allout-encryption-ciphertext-rejection-regexps
|
||||
allout-line-boundary-regexp
|
||||
extend)
|
||||
|
@ -2038,7 +2039,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
|
|||
extend))
|
||||
|
||||
(allout-compose-and-institute-keymap)
|
||||
(produce-allout-mode-menubar-entries)
|
||||
(allout-produce-mode-menubar-entries)
|
||||
|
||||
(add-to-invisibility-spec '(allout . t))
|
||||
|
||||
|
@ -2245,8 +2246,8 @@ the new value of `allout-recent-prefix-beginning'."
|
|||
allout-recent-prefix-beginning
|
||||
allout-header-subtraction)))
|
||||
allout-recent-prefix-beginning)
|
||||
;;;_ > nullify-allout-prefix-data ()
|
||||
(defsubst nullify-allout-prefix-data ()
|
||||
;;;_ > allout-nullify-prefix-data ()
|
||||
(defsubst allout-nullify-prefix-data ()
|
||||
"Mark allout prefix data as being uninformative."
|
||||
(setq allout-recent-prefix-end (point)
|
||||
allout-recent-prefix-beginning (point)
|
||||
|
@ -2381,7 +2382,7 @@ Like `allout-current-depth', but respects hidden as well as visible topics."
|
|||
allout-recent-depth
|
||||
(progn
|
||||
;; Oops, no prefix, nullify it:
|
||||
(nullify-allout-prefix-data)
|
||||
(allout-nullify-prefix-data)
|
||||
;; ... and return 0:
|
||||
0)))))
|
||||
;;;_ > allout-current-depth ()
|
||||
|
@ -3478,11 +3479,11 @@ Offer one suitable for current depth DEPTH as default."
|
|||
|
||||
(let* ((default-bullet (or (and (stringp current-bullet) current-bullet)
|
||||
(allout-bullet-for-depth depth)))
|
||||
(sans-escapes (regexp-sans-escapes allout-bullets-string))
|
||||
(sans-escapes (allout-regexp-sans-escapes allout-bullets-string))
|
||||
choice)
|
||||
(save-excursion
|
||||
(goto-char (allout-current-bullet-pos))
|
||||
(setq choice (solicit-char-in-string
|
||||
(setq choice (allout-solicit-char-in-string
|
||||
(format-message
|
||||
"Select bullet: %s (`%s' default): "
|
||||
sans-escapes
|
||||
|
@ -6341,7 +6342,7 @@ save. See `allout-encrypt-unencrypted-on-saves' for more info."
|
|||
;; we had to wait for this 'til now so prior topics are
|
||||
;; encrypted, any relevant text shifts are in place:
|
||||
editing-point (- current-mark-position
|
||||
(count-trailing-whitespace-region
|
||||
(allout-count-trailing-whitespace-region
|
||||
bo-subtree current-mark-position))))
|
||||
(allout-toggle-subtree-encryption)
|
||||
(if (not was-modified)
|
||||
|
@ -6507,8 +6508,8 @@ not its value."
|
|||
(allout-end-of-current-subtree)
|
||||
(exchange-point-and-mark))
|
||||
;;;_ : UI:
|
||||
;;;_ > solicit-char-in-string (prompt string &optional do-defaulting)
|
||||
(defun solicit-char-in-string (prompt string &optional do-defaulting)
|
||||
;;;_ > allout-solicit-char-in-string (prompt string &optional do-defaulting)
|
||||
(defun allout-solicit-char-in-string (prompt string &optional do-defaulting)
|
||||
"Solicit (with first arg PROMPT) choice of a character from string STRING.
|
||||
|
||||
Optional arg DO-DEFAULTING indicates to accept empty input (CR)."
|
||||
|
@ -6541,8 +6542,8 @@ Optional arg DO-DEFAULTING indicates to accept empty input (CR)."
|
|||
got)
|
||||
)
|
||||
;;;_ : Strings:
|
||||
;;;_ > regexp-sans-escapes (string)
|
||||
(defun regexp-sans-escapes (regexp &optional successive-backslashes)
|
||||
;;;_ > allout-regexp-sans-escapes (string)
|
||||
(defun allout-regexp-sans-escapes (regexp &optional successive-backslashes)
|
||||
"Return a copy of REGEXP with all character escapes stripped out.
|
||||
|
||||
Representations of actual backslashes -- `\\\\\\\\' -- are left as a
|
||||
|
@ -6561,11 +6562,11 @@ Optional arg SUCCESSIVE-BACKSLASHES is used internally for recursion."
|
|||
(if (or (not successive-backslashes) (= 2 successive-backslashes))
|
||||
;; Include first char:
|
||||
(concat (substring regexp 0 1)
|
||||
(regexp-sans-escapes (substring regexp 1)))
|
||||
(allout-regexp-sans-escapes (substring regexp 1)))
|
||||
;; Exclude first char, but maintain count:
|
||||
(regexp-sans-escapes (substring regexp 1) successive-backslashes))))
|
||||
;;;_ > count-trailing-whitespace-region (beg end)
|
||||
(defun count-trailing-whitespace-region (beg end)
|
||||
(allout-regexp-sans-escapes (substring regexp 1) successive-backslashes))))
|
||||
;;;_ > allout-count-trailing-whitespace-region (beg end)
|
||||
(defun allout-count-trailing-whitespace-region (beg end)
|
||||
"Return number of trailing whitespace chars between BEG and END.
|
||||
|
||||
If BEG is bigger than END we return 0."
|
||||
|
@ -6797,9 +6798,9 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
|
|||
"Isearch (regexp) for topic with bullet BULLET."
|
||||
(interactive)
|
||||
(if (not bullet)
|
||||
(setq bullet (solicit-char-in-string
|
||||
(setq bullet (allout-solicit-char-in-string
|
||||
"ISearch for topic with bullet: "
|
||||
(regexp-sans-escapes allout-bullets-string))))
|
||||
(allout-regexp-sans-escapes allout-bullets-string))))
|
||||
|
||||
(let ((isearch-regexp t)
|
||||
(isearch-string (concat "^"
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
(setq i (1+ i)))
|
||||
(modify-syntax-entry ?\s " " table)
|
||||
;; Non-break space acts as whitespace.
|
||||
(modify-syntax-entry ?\x8a0 " " table)
|
||||
(modify-syntax-entry ?\xa0 " " table)
|
||||
(modify-syntax-entry ?\t " " table)
|
||||
(modify-syntax-entry ?\f " " table)
|
||||
(modify-syntax-entry ?\n "> " table)
|
||||
|
|
|
@ -380,6 +380,11 @@ and the hook `eshell-exit-hook'."
|
|||
(make-local-variable 'eshell-modules-list)
|
||||
(setq eshell-modules-list modules-list))
|
||||
|
||||
;; This is to avoid making the paragraph base direction
|
||||
;; right-to-left if the first word just happens to start with a
|
||||
;; strong R2L character.
|
||||
(setq bidi-paragraph-direction 'left-to-right)
|
||||
|
||||
;; load extension modules into memory. This will cause any global
|
||||
;; variables they define to be visible, since some of the core
|
||||
;; modules sometimes take advantage of their functionality if used.
|
||||
|
|
|
@ -6210,7 +6210,7 @@ and `list-directory-verbose-switches'."
|
|||
|
||||
PATTERN is assumed to represent a file-name wildcard suitable for the
|
||||
underlying filesystem. For Unix and GNU/Linux, each character from the
|
||||
set [ \\t\\n;<>&|()`'\"#$] is quoted with a backslash; for DOS/Windows, all
|
||||
set [ \\t\\n;<>&|()\\=`\\='\"#$] is quoted with a backslash; for DOS/Windows, all
|
||||
the parts of the pattern which don't include wildcard characters are
|
||||
quoted with double quotes.
|
||||
|
||||
|
|
|
@ -541,14 +541,14 @@ FILE is the file where FUNCTION was probably defined."
|
|||
;; Print what kind of function-like object FUNCTION is.
|
||||
(princ (cond ((or (stringp def) (vectorp def))
|
||||
"a keyboard macro")
|
||||
((subrp def)
|
||||
(if (eq 'unevalled (cdr (subr-arity def)))
|
||||
(concat beg "special form")
|
||||
(concat beg "built-in function")))
|
||||
;; Aliases are Lisp functions, so we need to check
|
||||
;; aliases before functions.
|
||||
(aliased
|
||||
(format-message "an alias for `%s'" real-def))
|
||||
((subrp def)
|
||||
(if (eq 'unevalled (cdr (subr-arity def)))
|
||||
(concat beg "special form")
|
||||
(concat beg "built-in function")))
|
||||
((autoloadp def)
|
||||
(format "%s autoloaded %s"
|
||||
(if (commandp def) "an interactive" "an")
|
||||
|
|
|
@ -347,10 +347,14 @@ the mode if ARG is omitted or nil."
|
|||
:modifier-p nil)
|
||||
(shell-command (concat command " "
|
||||
(shell-quote-argument
|
||||
(if buffer-file-name
|
||||
buffer-file-name
|
||||
(make-temp-file
|
||||
(substring (buffer-name) 0 (min 10 (length (buffer-name))))))))))
|
||||
(or buffer-file-name
|
||||
(let ((file
|
||||
(make-temp-file
|
||||
(substring
|
||||
(buffer-name) 0
|
||||
(min 10 (length (buffer-name)))))))
|
||||
(write-region nil nil file nil 0)
|
||||
file))))))
|
||||
|
||||
;;;###autoload (autoload 'ibuffer-do-eval "ibuf-ext")
|
||||
(define-ibuffer-op eval (form)
|
||||
|
|
|
@ -2341,7 +2341,8 @@ FORMATS is the value to use for `ibuffer-formats'.
|
|||
(setq other-window-p t))
|
||||
(let ((buf (get-buffer-create (or name "*Ibuffer*"))))
|
||||
(if other-window-p
|
||||
(funcall (if noselect (lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf)
|
||||
(or (and noselect (display-buffer buf t))
|
||||
(pop-to-buffer buf t))
|
||||
(funcall (if noselect #'display-buffer #'switch-to-buffer) buf))
|
||||
(with-current-buffer buf
|
||||
(save-selected-window
|
||||
|
|
|
@ -194,6 +194,7 @@ with L, LRE, or LRO Unicode bidi character type.")
|
|||
|
||||
(dolist (l '(katakana-jisx0201 japanese-jisx0208 japanese-jisx0212
|
||||
japanese-jisx0213-1 japanese-jisx0213-2
|
||||
japanese-jisx0213.2004-1
|
||||
cp932-2-byte))
|
||||
(map-charset-chars #'modify-category-entry l ?j))
|
||||
|
||||
|
|
|
@ -1259,6 +1259,11 @@ You can update the global isearch variables by setting new values to
|
|||
(isearch-adjusted isearch-adjusted)
|
||||
(isearch-yank-flag isearch-yank-flag)
|
||||
(isearch-error isearch-error)
|
||||
|
||||
(multi-isearch-file-list-new multi-isearch-file-list)
|
||||
(multi-isearch-buffer-list-new multi-isearch-buffer-list)
|
||||
(multi-isearch-next-buffer-function multi-isearch-next-buffer-current-function)
|
||||
(multi-isearch-current-buffer-new multi-isearch-current-buffer)
|
||||
;;; Don't bind this. We want isearch-search, below, to set it.
|
||||
;;; And the old value won't matter after that.
|
||||
;;; (isearch-other-end isearch-other-end)
|
||||
|
@ -1313,7 +1318,10 @@ You can update the global isearch variables by setting new values to
|
|||
isearch-message isearch-new-message
|
||||
isearch-forward isearch-new-forward
|
||||
isearch-regexp-function isearch-new-regexp-function
|
||||
isearch-case-fold-search isearch-new-case-fold)
|
||||
isearch-case-fold-search isearch-new-case-fold
|
||||
multi-isearch-current-buffer multi-isearch-current-buffer-new
|
||||
multi-isearch-file-list multi-isearch-file-list-new
|
||||
multi-isearch-buffer-list multi-isearch-buffer-list-new)
|
||||
|
||||
;; Restore the minibuffer message before moving point.
|
||||
(funcall (or isearch-message-function #'isearch-message) nil t)
|
||||
|
|
|
@ -38,100 +38,100 @@
|
|||
(define-category ?v "Lao upper/lower vowel" lao-category-table)
|
||||
(define-category ?t "Lao tone" lao-category-table)
|
||||
|
||||
(let ((l '((?ກ consonant "LETTER KOR KAI'" "CHICKEN")
|
||||
(?ຂ consonant "LETTER KHOR KHAI'" "EGG")
|
||||
(? invalid nil)
|
||||
(?ຄ consonant "LETTER QHOR QHWARGN" "BUFFALO")
|
||||
(? invalid nil)
|
||||
(? invalid nil)
|
||||
(?ງ consonant "LETTER NGOR NGUU" "SNAKE")
|
||||
(?ຈ consonant "LETTER JOR JUA" "BUDDHIST NOVICE")
|
||||
(?ຉ invalid nil)
|
||||
(?ຊ consonant "LETTER XOR X\"ARNG" "ELEPHANT")
|
||||
(? invalid nil)
|
||||
(?ຌ invalid nil)
|
||||
(?ຍ consonant "LETTER YOR YUNG" "MOSQUITO")
|
||||
(?ຎ invalid nil)
|
||||
(?ຎ invalid nil)
|
||||
(?ຎ invalid nil)
|
||||
(?ຎ invalid nil)
|
||||
(?ຎ invalid nil)
|
||||
(?ຎ invalid nil)
|
||||
(?ດ consonant "LETTER DOR DANG" "NOSE")
|
||||
(?ຕ consonant "LETTER TOR TAR" "EYE")
|
||||
(?ຖ consonant "LETTER THOR THUNG" "TO ASK,QUESTION")
|
||||
(?ທ consonant "LETTER DHOR DHARM" "FLAG")
|
||||
(?ຘ invalid nil)
|
||||
(?ນ consonant "LETTER NOR NOK" "BIRD")
|
||||
(?ບ consonant "LETTER BOR BED" "FISHHOOK")
|
||||
(?ປ consonant "LETTER POR PAR" "FISH")
|
||||
(?ຜ consonant "LETTER HPOR HPER\"" "BEE")
|
||||
(?ຝ consonant "LETTER FHOR FHAR" "WALL")
|
||||
(?ພ consonant "LETTER PHOR PHUU" "MOUNTAIN")
|
||||
(?ຟ consonant "LETTER FOR FAI" "FIRE")
|
||||
(?ຠ invalid nil)
|
||||
(?ມ consonant "LETTER MOR MAR\"" "HORSE")
|
||||
(?ຢ consonant "LETTER GNOR GNAR" "MEDICINE")
|
||||
(?ຣ consonant "LETTER ROR ROD" "CAR")
|
||||
(? invalid nil)
|
||||
(?ລ consonant "LETTER LOR LIING" "MONKEY")
|
||||
(? invalid nil)
|
||||
(?ວ consonant "LETTER WOR WII" "HAND FAN")
|
||||
(?ຨ invalid nil)
|
||||
(?ຩ invalid nil)
|
||||
(?ສ consonant "LETTER SOR SEA" "TIGER")
|
||||
(?ຫ consonant "LETTER HHOR HHAI" "JAR")
|
||||
(?ຬ invalid nil)
|
||||
(?ອ consonant "LETTER OR OOW" "TAKE")
|
||||
(?ຮ consonant "LETTER HOR HEA" "BOAT")
|
||||
(?ຯ special "ELLIPSIS")
|
||||
(?ະ vowel-base "VOWEL SIGN SARA A")
|
||||
(?ັ vowel-upper "VOWEL SIGN MAI KAN")
|
||||
(?າ vowel-base "VOWEL SIGN SARA AR")
|
||||
(?ຳ vowel-base "VOWEL SIGN SARA AM")
|
||||
(?ິ vowel-upper "VOWEL SIGN SARA I")
|
||||
(?ີ vowel-upper "VOWEL SIGN SARA II")
|
||||
(?ຶ vowel-upper "VOWEL SIGN SARA EU")
|
||||
(?ື vowel-upper "VOWEL SIGN SARA UR")
|
||||
(?ຸ vowel-lower "VOWEL SIGN SARA U")
|
||||
(?ູ vowel-lower "VOWEL SIGN SARA UU")
|
||||
(?຺ invalid nil)
|
||||
(?ົ vowel-upper "VOWEL SIGN MAI KONG")
|
||||
(?ຼ semivowel-lower "SEMIVOWEL SIGN LO")
|
||||
(?ຽ vowel-base "SEMIVOWEL SIGN SARA IA")
|
||||
(? invalid nil)
|
||||
(? invalid nil)
|
||||
(?ເ vowel-base "VOWEL SIGN SARA EE")
|
||||
(?ແ vowel-base "VOWEL SIGN SARA AA")
|
||||
(?ໂ vowel-base "VOWEL SIGN SARA OO")
|
||||
(?ໃ vowel-base "VOWEL SIGN SARA EI MAI MUAN\"")
|
||||
(?ໄ vowel-base "VOWEL SIGN SARA AI MAI MAY")
|
||||
(? invalid nil)
|
||||
(?ໆ special "KO LA (REPETITION)")
|
||||
(? invalid nil)
|
||||
(?່ tone "TONE MAI EK")
|
||||
(?້ tone "TONE MAI THO")
|
||||
(?໊ tone "TONE MAI TI")
|
||||
(?໋ tone "TONE MAI JADTAWAR")
|
||||
(?໌ tone "CANCELLATION MARK")
|
||||
(?ໍ vowel-upper "VOWEL SIGN SARA OR")
|
||||
(?໎ invalid nil)
|
||||
(? invalid nil)
|
||||
(?໐ special "DIGIT ZERO")
|
||||
(?໑ special "DIGIT ONE")
|
||||
(?໒ special "DIGIT TWO")
|
||||
(?໓ special "DIGIT THREE")
|
||||
(?໔ special "DIGIT FOUR")
|
||||
(?໕ special "DIGIT FIVE")
|
||||
(?໖ special "DIGIT SIX")
|
||||
(?໗ special "DIGIT SEVEN")
|
||||
(?໘ special "DIGIT EIGHT")
|
||||
(?໙ special "DIGIT NINE")
|
||||
(? invalid nil)
|
||||
(? invalid nil)
|
||||
(?ໜ consonant "LETTER NHOR NHUU" "MOUSE")
|
||||
(?ໝ consonant "LETTER MHOR MHAR" "DOG")
|
||||
(?ໞ invalid nil)))
|
||||
(let ((l '((?ກ consonant "CHICKEN")
|
||||
(?ຂ consonant "EGG")
|
||||
(? invalid)
|
||||
(?ຄ consonant "BUFFALO")
|
||||
(? invalid)
|
||||
(? invalid)
|
||||
(?ງ consonant "SNAKE")
|
||||
(?ຈ consonant "BUDDHIST NOVICE")
|
||||
(?ຉ invalid)
|
||||
(?ຊ consonant "ELEPHANT")
|
||||
(? invalid)
|
||||
(?ຌ invalid)
|
||||
(?ຍ consonant "MOSQUITO")
|
||||
(?ຎ invalid)
|
||||
(?ຎ invalid)
|
||||
(?ຎ invalid)
|
||||
(?ຎ invalid)
|
||||
(?ຎ invalid)
|
||||
(?ຎ invalid)
|
||||
(?ດ consonant "NOSE")
|
||||
(?ຕ consonant "EYE")
|
||||
(?ຖ consonant "TO ASK,QUESTION")
|
||||
(?ທ consonant "FLAG")
|
||||
(?ຘ invalid)
|
||||
(?ນ consonant "BIRD")
|
||||
(?ບ consonant "FISHHOOK")
|
||||
(?ປ consonant "FISH")
|
||||
(?ຜ consonant "BEE")
|
||||
(?ຝ consonant "WALL")
|
||||
(?ພ consonant "MOUNTAIN")
|
||||
(?ຟ consonant "FIRE")
|
||||
(?ຠ invalid)
|
||||
(?ມ consonant "HORSE")
|
||||
(?ຢ consonant "MEDICINE")
|
||||
(?ຣ consonant "CAR")
|
||||
(? invalid)
|
||||
(?ລ consonant "MONKEY")
|
||||
(? invalid)
|
||||
(?ວ consonant "HAND FAN")
|
||||
(?ຨ invalid)
|
||||
(?ຩ invalid)
|
||||
(?ສ consonant "TIGER")
|
||||
(?ຫ consonant "JAR")
|
||||
(?ຬ invalid)
|
||||
(?ອ consonant "TAKE")
|
||||
(?ຮ consonant "BOAT")
|
||||
(?ຯ special)
|
||||
(?ະ vowel-base)
|
||||
(?ັ vowel-upper)
|
||||
(?າ vowel-base)
|
||||
(?ຳ vowel-base)
|
||||
(?ິ vowel-upper)
|
||||
(?ີ vowel-upper)
|
||||
(?ຶ vowel-upper)
|
||||
(?ື vowel-upper)
|
||||
(?ຸ vowel-lower)
|
||||
(?ູ vowel-lower)
|
||||
(?຺ invalid)
|
||||
(?ົ vowel-upper)
|
||||
(?ຼ semivowel-lower)
|
||||
(?ຽ vowel-base)
|
||||
(? invalid)
|
||||
(? invalid)
|
||||
(?ເ vowel-base)
|
||||
(?ແ vowel-base)
|
||||
(?ໂ vowel-base)
|
||||
(?ໃ vowel-base)
|
||||
(?ໄ vowel-base)
|
||||
(? invalid)
|
||||
(?ໆ special)
|
||||
(? invalid)
|
||||
(?່ tone)
|
||||
(?້ tone)
|
||||
(?໊ tone)
|
||||
(?໋ tone)
|
||||
(?໌ tone)
|
||||
(?ໍ vowel-upper)
|
||||
(?໎ invalid)
|
||||
(? invalid)
|
||||
(?໐ special)
|
||||
(?໑ special)
|
||||
(?໒ special)
|
||||
(?໓ special)
|
||||
(?໔ special)
|
||||
(?໕ special)
|
||||
(?໖ special)
|
||||
(?໗ special)
|
||||
(?໘ special)
|
||||
(?໙ special)
|
||||
(? invalid)
|
||||
(? invalid)
|
||||
(?ໜ consonant "MOUSE")
|
||||
(?ໝ consonant "DOG")
|
||||
(?ໞ invalid)))
|
||||
elm)
|
||||
(while l
|
||||
(setq elm (car l) l (cdr l))
|
||||
|
@ -146,8 +146,7 @@
|
|||
((eq ptype 'tone)
|
||||
(modify-category-entry char ?t lao-category-table)))
|
||||
(put-char-code-property char 'phonetic-type ptype)
|
||||
(put-char-code-property char 'name (nth 2 elm))
|
||||
(put-char-code-property char 'meaning (nth 3 elm)))))
|
||||
(put-char-code-property char 'meaning (nth 2 elm)))))
|
||||
|
||||
;; The general composing rules are as follows:
|
||||
;;
|
||||
|
|
|
@ -55,100 +55,100 @@
|
|||
"\\cc\\(\\cu\\|\\cI\\cU\\|\\cv\\ct?\\)\\|\\cv\\ct\\|\\cI\\cU"
|
||||
"Regular expression matching a Thai composite sequence.")
|
||||
|
||||
(let ((l '((?ก consonant "LETTER KO KAI") ; 0xA1
|
||||
(?ข consonant "LETTER KHO KHAI") ; 0xA2
|
||||
(?ฃ consonant "LETTER KHO KHUAT") ; 0xA3
|
||||
(?ค consonant "LETTER KHO KHWAI") ; 0xA4
|
||||
(?ฅ consonant "LETTER KHO KHON") ; 0xA5
|
||||
(?ฆ consonant "LETTER KHO RAKHANG") ; 0xA6
|
||||
(?ง consonant "LETTER NGO NGU") ; 0xA7
|
||||
(?จ consonant "LETTER CHO CHAN") ; 0xA8
|
||||
(?ฉ consonant "LETTER CHO CHING") ; 0xA9
|
||||
(?ช consonant "LETTER CHO CHANG") ; 0xAA
|
||||
(?ซ consonant "LETTER SO SO") ; 0xAB
|
||||
(?ฌ consonant "LETTER CHO CHOE") ; 0xAC
|
||||
(?ญ consonant "LETTER YO YING") ; 0xAD
|
||||
(?ฎ consonant "LETTER DO CHADA") ; 0xAE
|
||||
(?ฏ consonant "LETTER TO PATAK") ; 0xAF
|
||||
(?ฐ consonant "LETTER THO THAN") ; 0xB0
|
||||
(?ฑ consonant "LETTER THO NANGMONTHO") ; 0xB1
|
||||
(?ฒ consonant "LETTER THO PHUTHAO") ; 0xB2
|
||||
(?ณ consonant "LETTER NO NEN") ; 0xB3
|
||||
(?ด consonant "LETTER DO DEK") ; 0xB4
|
||||
(?ต consonant "LETTER TO TAO") ; 0xB5
|
||||
(?ถ consonant "LETTER THO THUNG") ; 0xB6
|
||||
(?ท consonant "LETTER THO THAHAN") ; 0xB7
|
||||
(?ธ consonant "LETTER THO THONG") ; 0xB8
|
||||
(?น consonant "LETTER NO NU") ; 0xB9
|
||||
(?บ consonant "LETTER BO BAIMAI") ; 0xBA
|
||||
(?ป consonant "LETTER PO PLA") ; 0xBB
|
||||
(?ผ consonant "LETTER PHO PHUNG") ; 0xBC
|
||||
(?ฝ consonant "LETTER FO FA") ; 0xBD
|
||||
(?พ consonant "LETTER PHO PHAN") ; 0xBE
|
||||
(?ฟ consonant "LETTER FO FAN") ; 0xBF
|
||||
(?ภ consonant "LETTER PHO SAMPHAO") ; 0xC0
|
||||
(?ม consonant "LETTER MO MA") ; 0xC1
|
||||
(?ย consonant "LETTER YO YAK") ; 0xC2
|
||||
(?ร consonant "LETTER RO RUA") ; 0xC3
|
||||
(?ฤ vowel-base "LETTER RU (Pali vowel letter)") ; 0xC4
|
||||
(?ล consonant "LETTER LO LING") ; 0xC5
|
||||
(?ฦ vowel-base "LETTER LU (Pali vowel letter)") ; 0xC6
|
||||
(?ว consonant "LETTER WO WAEN") ; 0xC7
|
||||
(?ศ consonant "LETTER SO SALA") ; 0xC8
|
||||
(?ษ consonant "LETTER SO RUSI") ; 0xC9
|
||||
(?ส consonant "LETTER SO SUA") ; 0xCA
|
||||
(?ห consonant "LETTER HO HIP") ; 0xCB
|
||||
(?ฬ consonant "LETTER LO CHULA") ; 0xCC
|
||||
(?อ consonant "LETTER O ANG") ; 0xCD
|
||||
(?ฮ consonant "LETTER HO NOK HUK") ; 0xCE
|
||||
(?ฯ special "PAI YAN NOI (abbreviation)") ; 0xCF
|
||||
(?ะ vowel-base "VOWEL SIGN SARA A") ; 0xD0
|
||||
(?ั vowel-upper "VOWEL SIGN MAI HAN-AKAT N/S-T") ; 0xD1
|
||||
(?า vowel-base "VOWEL SIGN SARA AA") ; 0xD2
|
||||
(?ำ vowel-base "VOWEL SIGN SARA AM") ; 0xD3
|
||||
(?ิ vowel-upper "VOWEL SIGN SARA I N/S-T") ; 0xD4
|
||||
(?ี vowel-upper "VOWEL SIGN SARA II N/S-T") ; 0xD5
|
||||
(?ึ vowel-upper "VOWEL SIGN SARA UE N/S-T") ; 0xD6
|
||||
(?ื vowel-upper "VOWEL SIGN SARA UEE N/S-T") ; 0xD7
|
||||
(?ุ vowel-lower "VOWEL SIGN SARA U N/S-B") ; 0xD8
|
||||
(?ู vowel-lower "VOWEL SIGN SARA UU N/S-B") ; 0xD9
|
||||
(?ฺ vowel-lower "VOWEL SIGN PHINTHU N/S-B (Pali virama)") ; 0xDA
|
||||
(? invalid nil) ; 0xDA
|
||||
(? invalid nil) ; 0xDC
|
||||
(? invalid nil) ; 0xDC
|
||||
(? invalid nil) ; 0xDC
|
||||
(?฿ special "BAHT SIGN (currency symbol)") ; 0xDF
|
||||
(?เ vowel-base "VOWEL SIGN SARA E") ; 0xE0
|
||||
(?แ vowel-base "VOWEL SIGN SARA AE") ; 0xE1
|
||||
(?โ vowel-base "VOWEL SIGN SARA O") ; 0xE2
|
||||
(?ใ vowel-base "VOWEL SIGN SARA MAI MUAN") ; 0xE3
|
||||
(?ไ vowel-base "VOWEL SIGN SARA MAI MALAI") ; 0xE4
|
||||
(?ๅ vowel-base "LAK KHANG YAO") ; 0xE5
|
||||
(?ๆ special "MAI YAMOK (repetition)") ; 0xE6
|
||||
(?็ sign-upper "VOWEL SIGN MAI TAI KHU N/S-T") ; 0xE7
|
||||
(?่ tone "TONE MAI EK N/S-T") ; 0xE8
|
||||
(?้ tone "TONE MAI THO N/S-T") ; 0xE9
|
||||
(?๊ tone "TONE MAI TRI N/S-T") ; 0xEA
|
||||
(?๋ tone "TONE MAI CHATTAWA N/S-T") ; 0xEB
|
||||
(?์ sign-upper "THANTHAKHAT N/S-T (cancellation mark)") ; 0xEC
|
||||
(?ํ sign-upper "NIKKHAHIT N/S-T (final nasal)") ; 0xED
|
||||
(?๎ sign-upper "YAMAKKAN N/S-T") ; 0xEE
|
||||
(?๏ special "FONRMAN") ; 0xEF
|
||||
(?๐ special "DIGIT ZERO") ; 0xF0
|
||||
(?๑ special "DIGIT ONE") ; 0xF1
|
||||
(?๒ special "DIGIT TWO") ; 0xF2
|
||||
(?๓ special "DIGIT THREE") ; 0xF3
|
||||
(?๔ special "DIGIT FOUR") ; 0xF4
|
||||
(?๕ special "DIGIT FIVE") ; 0xF5
|
||||
(?๖ special "DIGIT SIX") ; 0xF6
|
||||
(?๗ special "DIGIT SEVEN") ; 0xF7
|
||||
(?๘ special "DIGIT EIGHT") ; 0xF8
|
||||
(?๙ special "DIGIT NINE") ; 0xF9
|
||||
(?๚ special "ANGKHANKHU (ellipsis)") ; 0xFA
|
||||
(?๛ special "KHOMUT (beginning of religious texts)") ; 0xFB
|
||||
(? invalid nil) ; 0xFC
|
||||
(? invalid nil) ; 0xFD
|
||||
(? invalid nil) ; 0xFE
|
||||
(let ((l '((?ก consonant) ; 0xA1
|
||||
(?ข consonant) ; 0xA2
|
||||
(?ฃ consonant) ; 0xA3
|
||||
(?ค consonant) ; 0xA4
|
||||
(?ฅ consonant) ; 0xA5
|
||||
(?ฆ consonant) ; 0xA6
|
||||
(?ง consonant) ; 0xA7
|
||||
(?จ consonant) ; 0xA8
|
||||
(?ฉ consonant) ; 0xA9
|
||||
(?ช consonant) ; 0xAA
|
||||
(?ซ consonant) ; 0xAB
|
||||
(?ฌ consonant) ; 0xAC
|
||||
(?ญ consonant) ; 0xAD
|
||||
(?ฎ consonant) ; 0xAE
|
||||
(?ฏ consonant) ; 0xAF
|
||||
(?ฐ consonant) ; 0xB0
|
||||
(?ฑ consonant) ; 0xB1
|
||||
(?ฒ consonant) ; 0xB2
|
||||
(?ณ consonant) ; 0xB3
|
||||
(?ด consonant) ; 0xB4
|
||||
(?ต consonant) ; 0xB5
|
||||
(?ถ consonant) ; 0xB6
|
||||
(?ท consonant) ; 0xB7
|
||||
(?ธ consonant) ; 0xB8
|
||||
(?น consonant) ; 0xB9
|
||||
(?บ consonant) ; 0xBA
|
||||
(?ป consonant) ; 0xBB
|
||||
(?ผ consonant) ; 0xBC
|
||||
(?ฝ consonant) ; 0xBD
|
||||
(?พ consonant) ; 0xBE
|
||||
(?ฟ consonant) ; 0xBF
|
||||
(?ภ consonant) ; 0xC0
|
||||
(?ม consonant) ; 0xC1
|
||||
(?ย consonant) ; 0xC2
|
||||
(?ร consonant) ; 0xC3
|
||||
(?ฤ vowel-base) ; 0xC4
|
||||
(?ล consonant) ; 0xC5
|
||||
(?ฦ vowel-base) ; 0xC6
|
||||
(?ว consonant) ; 0xC7
|
||||
(?ศ consonant) ; 0xC8
|
||||
(?ษ consonant) ; 0xC9
|
||||
(?ส consonant) ; 0xCA
|
||||
(?ห consonant) ; 0xCB
|
||||
(?ฬ consonant) ; 0xCC
|
||||
(?อ consonant) ; 0xCD
|
||||
(?ฮ consonant) ; 0xCE
|
||||
(?ฯ special) ; 0xCF
|
||||
(?ะ vowel-base) ; 0xD0
|
||||
(?ั vowel-upper) ; 0xD1
|
||||
(?า vowel-base) ; 0xD2
|
||||
(?ำ vowel-base) ; 0xD3
|
||||
(?ิ vowel-upper) ; 0xD4
|
||||
(?ี vowel-upper) ; 0xD5
|
||||
(?ึ vowel-upper) ; 0xD6
|
||||
(?ื vowel-upper) ; 0xD7
|
||||
(?ุ vowel-lower) ; 0xD8
|
||||
(?ู vowel-lower) ; 0xD9
|
||||
(?ฺ vowel-lower) ; 0xDA
|
||||
(? invalid) ; 0xDA
|
||||
(? invalid) ; 0xDC
|
||||
(? invalid) ; 0xDC
|
||||
(? invalid) ; 0xDC
|
||||
(?฿ special) ; 0xDF
|
||||
(?เ vowel-base) ; 0xE0
|
||||
(?แ vowel-base) ; 0xE1
|
||||
(?โ vowel-base) ; 0xE2
|
||||
(?ใ vowel-base) ; 0xE3
|
||||
(?ไ vowel-base) ; 0xE4
|
||||
(?ๅ vowel-base) ; 0xE5
|
||||
(?ๆ special) ; 0xE6
|
||||
(?็ sign-upper) ; 0xE7
|
||||
(?่ tone) ; 0xE8
|
||||
(?้ tone) ; 0xE9
|
||||
(?๊ tone) ; 0xEA
|
||||
(?๋ tone) ; 0xEB
|
||||
(?์ sign-upper) ; 0xEC
|
||||
(?ํ sign-upper) ; 0xED
|
||||
(?๎ sign-upper) ; 0xEE
|
||||
(?๏ special) ; 0xEF
|
||||
(?๐ special) ; 0xF0
|
||||
(?๑ special) ; 0xF1
|
||||
(?๒ special) ; 0xF2
|
||||
(?๓ special) ; 0xF3
|
||||
(?๔ special) ; 0xF4
|
||||
(?๕ special) ; 0xF5
|
||||
(?๖ special) ; 0xF6
|
||||
(?๗ special) ; 0xF7
|
||||
(?๘ special) ; 0xF8
|
||||
(?๙ special) ; 0xF9
|
||||
(?๚ special) ; 0xFA
|
||||
(?๛ special) ; 0xFB
|
||||
(? invalid) ; 0xFC
|
||||
(? invalid) ; 0xFD
|
||||
(? invalid) ; 0xFE
|
||||
))
|
||||
elm)
|
||||
(while l
|
||||
|
@ -170,8 +170,7 @@
|
|||
(modify-category-entry char ?u thai-category-table)
|
||||
(if (= char ?์)
|
||||
;; Give category `U' to "THANTHAKHAT".
|
||||
(modify-category-entry char ?U thai-category-table))))
|
||||
(put-char-code-property char 'name (nth 2 elm)))))
|
||||
(modify-category-entry char ?U thai-category-table)))))))
|
||||
|
||||
(defun thai-compose-syllable (beg end &optional category-set string)
|
||||
(or category-set
|
||||
|
|
|
@ -793,7 +793,7 @@ With a prefix argument ARG, enable Footnote mode if ARG is
|
|||
positive, and disable it otherwise. If called from Lisp, enable
|
||||
the mode if ARG is omitted or nil.
|
||||
|
||||
Footnode mode is a buffer-local minor mode. If enabled, it
|
||||
Footnote mode is a buffer-local minor mode. If enabled, it
|
||||
provides footnote support for `message-mode'. To get started,
|
||||
play around with the following keys:
|
||||
\\{footnote-minor-mode-map}"
|
||||
|
|
17
lisp/man.el
17
lisp/man.el
|
@ -308,7 +308,7 @@ This regular expression should start with a `^' character.")
|
|||
|
||||
(defvar Man-reference-regexp
|
||||
(concat "\\(" Man-name-regexp
|
||||
"\\(\n[ \t]+" Man-name-regexp "\\)*\\)[ \t]*(\\("
|
||||
"\\(‐?\n[ \t]+" Man-name-regexp "\\)*\\)[ \t]*(\\("
|
||||
Man-section-regexp "\\))")
|
||||
"Regular expression describing a reference to another manpage.")
|
||||
|
||||
|
@ -779,7 +779,7 @@ POS defaults to `point'."
|
|||
;; see this-
|
||||
;; command-here(1)
|
||||
;; Note: This code gets executed iff our entry is after POS.
|
||||
(when (looking-at "[ \t\r\n]+\\([-a-zA-Z0-9._+:]+\\)([0-9])")
|
||||
(when (looking-at "‐?[ \t\r\n]+\\([-a-zA-Z0-9._+:]+\\)([0-9])")
|
||||
(setq word (concat word (match-string-no-properties 1)))
|
||||
;; Make sure the section number gets included by the code below.
|
||||
(goto-char (match-end 1)))
|
||||
|
@ -1430,8 +1430,17 @@ manpage command."
|
|||
(quit-restore-window
|
||||
(get-buffer-window (current-buffer) t) 'kill)
|
||||
(kill-buffer (current-buffer)))
|
||||
(message "Can't find the %s manpage"
|
||||
(Man-page-from-arguments args)))
|
||||
;; Entries hyphenated due to the window's width
|
||||
;; won't be found in the man database, so remove
|
||||
;; the hyphenation -- assuming Groff hyphenates
|
||||
;; either with hyphen-minus (ASCII 45, #x2d),
|
||||
;; hyphen (#x2010) or soft hyphen (#xad) -- and
|
||||
;; look again.
|
||||
(if (string-match "[-‐]" args)
|
||||
(let ((str (replace-match "" nil nil args)))
|
||||
(Man-getpage-in-background str))
|
||||
(message "Can't find the %s manpage"
|
||||
(Man-page-from-arguments args))))
|
||||
|
||||
(if Man-fontify-manpage-flag
|
||||
(message "%s man page formatted"
|
||||
|
|
|
@ -415,7 +415,15 @@ must be one of the symbols `header', `mode', or `vertical'."
|
|||
(or (not resize-mini-windows)
|
||||
(eq minibuffer-window
|
||||
(active-minibuffer-window)))))))
|
||||
(setq draggable nil))))
|
||||
(setq draggable nil)))
|
||||
((eq line 'vertical)
|
||||
(let ((divider-width (frame-right-divider-width frame)))
|
||||
(when (and (or (not (numberp divider-width))
|
||||
(zerop divider-width))
|
||||
(eq (cdr (assq 'vertical-scroll-bars
|
||||
(frame-parameters frame)))
|
||||
'left))
|
||||
(setq window (window-in-direction 'left window t))))))
|
||||
|
||||
(let* ((exitfun nil)
|
||||
(move
|
||||
|
|
|
@ -67,142 +67,18 @@
|
|||
|
||||
;;------------------------------------------------------------------- Constants
|
||||
|
||||
(defvar webjump-sample-sites
|
||||
(defgroup webjump nil
|
||||
"Programmable Web hotlist."
|
||||
:prefix "webjump-"
|
||||
:group 'browse-url)
|
||||
|
||||
(defconst webjump-sample-sites
|
||||
'(
|
||||
;; FSF, not including Emacs-specific.
|
||||
("GNU Project FTP Archive" .
|
||||
;; GNU FTP Mirror List from http://www.gnu.org/order/ftp.html
|
||||
[mirrors "ftp://ftp.gnu.org/pub/gnu/"
|
||||
;; United States
|
||||
"ftp://mirrors.kernel.org/gnu"
|
||||
"ftp://gatekeeper.dec.com/pub/GNU/"
|
||||
"ftp://ftp.keystealth.org/pub/gnu/"
|
||||
"ftp://mirrors.usc.edu/pub/gnu/"
|
||||
"ftp://cudlug.cudenver.edu/pub/mirrors/ftp.gnu.org/"
|
||||
"ftp://ftp.cise.ufl.edu/pub/mirrors/GNU/"
|
||||
"ftp://uiarchive.cso.uiuc.edu/pub/ftp/ftp.gnu.org/gnu/"
|
||||
"ftp://gnu.cs.lewisu.edu/gnu/"
|
||||
"ftp://ftp.in-span.net/pub/mirrors/ftp.gnu.org/"
|
||||
"ftp://gnu.ms.uky.edu/pub/mirrors/gnu/"
|
||||
"ftp://ftp.algx.net/pub/gnu/"
|
||||
"ftp://aeneas.mit.edu/pub/gnu/"
|
||||
"ftp://ftp.egr.msu.edu/pub/gnu/"
|
||||
"ftp://ftp.wayne.edu/pub/gnu/"
|
||||
"ftp://wuarchive.wustl.edu/mirrors/gnu/"
|
||||
"ftp://gnu.teleglobe.net/ftp.gnu.org/"
|
||||
"ftp://ftp.cs.columbia.edu/archives/gnu/prep/"
|
||||
"ftp://ftp.ece.cornell.edu/pub/mirrors/gnu/"
|
||||
"ftp://ftp.ibiblio.org/pub/mirrors/gnu/"
|
||||
"ftp://ftp.cis.ohio-state.edu/mirror/gnu/"
|
||||
"ftp://ftp.club.cc.cmu.edu/gnu/"
|
||||
"ftp://ftp.sunsite.utk.edu/pub/gnu/ftp/"
|
||||
"ftp://thales.memphis.edu/pub/gnu/"
|
||||
"ftp://gnu.wwc.edu"
|
||||
"ftp://ftp.twtelecom.net/pub/GNU/"
|
||||
;; Africa
|
||||
"ftp://ftp.sun.ac.za/mirrorsites/ftp.gnu.org"
|
||||
;; The Americas
|
||||
"ftp://ftp.unicamp.br/pub/gnu/"
|
||||
"ftp://master.softaplic.com.br/pub/gnu/"
|
||||
"ftp://ftp.matrix.com.br/pub/gnu/"
|
||||
"ftp://ftp.pucpr.br/gnu"
|
||||
"ftp://ftp.linorg.usp.br/gnu"
|
||||
"ftp://ftp.cs.ubc.ca/mirror2/gnu/"
|
||||
"ftp://cs.ubishops.ca/pub/ftp.gnu.org/"
|
||||
"ftp://ftp.inf.utfsm.cl/pub/gnu/"
|
||||
"ftp://sunsite.ulatina.ac.cr/Mirrors/GNU/"
|
||||
"ftp://www.gnu.unam.mx/pub/gnu/software/"
|
||||
"ftp://gnu.cem.itesm.mx/pub/mirrors/gnu.org/"
|
||||
"ftp://ftp.azc.uam.mx/mirrors/gnu/"
|
||||
;; Australia
|
||||
"ftp://mirror.aarnet.edu.au/pub/gnu/"
|
||||
"ftp://gnu.mirror.pacific.net.au/gnu/"
|
||||
;; Asia
|
||||
"ftp://ftp.cs.cuhk.edu.hk/pub/gnu/gnu/"
|
||||
"ftp://sunsite.ust.hk/pub/gnu/"
|
||||
"ftp://ftp.gnupilgrims.org/pub/gnu"
|
||||
"ftp://www.imtech.res.in/mirror/gnuftp/"
|
||||
"ftp://kambing.vlsm.org/gnu"
|
||||
"ftp://ftp.cs.huji.ac.il/mirror/GNU/"
|
||||
"ftp://tron.um.u-tokyo.ac.jp/pub/GNU/"
|
||||
"ftp://core.ring.gr.jp/pub/GNU/"
|
||||
"ftp://ftp.ring.gr.jp/pub/GNU/"
|
||||
"ftp://mirrors.hbi.co.jp/gnu/"
|
||||
"ftp://ftp.cs.titech.ac.jp/pub/gnu/"
|
||||
"ftp://ftpmirror.hanyang.ac.kr/GNU/"
|
||||
"ftp://ftp.linux.sarang.net/mirror/gnu/gnu/"
|
||||
"ftp://ftp.xgate.co.kr/pub/mirror/gnu/"
|
||||
"ftp://ftp://gnu.xinicks.com/"
|
||||
"ftp://ftp.isu.net.sa/pub/gnu/"
|
||||
"ftp://ftp.nctu.edu.tw/UNIX/gnu/"
|
||||
"ftp://coda.nctu.edu.tw/UNIX/gnu/"
|
||||
"ftp://ftp1.sinica.edu.tw/pub3/GNU/gnu/"
|
||||
"ftp://gnu.cdpa.nsysu.edu.tw/gnu"
|
||||
"ftp://ftp.nectec.or.th/pub/mirrors/gnu/"
|
||||
;; Europe
|
||||
"ftp://ftp.gnu.vbs.at/"
|
||||
"ftp://ftp.univie.ac.at/packages/gnu/"
|
||||
"ftp://gd.tuwien.ac.at/gnu/gnusrc/"
|
||||
"ftp://ftp.belnet.be/mirror/ftp.gnu.org/"
|
||||
"ftp://gnu.blic.net/pub/gnu/"
|
||||
"ftp://ftp.fi.muni.cz/pub/gnu/"
|
||||
"ftp://ftp.dkuug.dk/pub/gnu/"
|
||||
"ftp://sunsite.dk/mirrors/gnu"
|
||||
"ftp://ftp.funet.fi/pub/gnu/prep/"
|
||||
"ftp://ftp.irisa.fr/pub/gnu/"
|
||||
"ftp://ftp.cs.univ-paris8.fr/mirrors/ftp.gnu.org/"
|
||||
"ftp://ftp.cs.tu-berlin.de/pub/gnu/"
|
||||
"ftp://ftp.leo.org/pub/comp/os/unix/gnu/"
|
||||
"ftp://ftp.informatik.rwth-aachen.de/pub/gnu/"
|
||||
"ftp://ftp.de.uu.net/pub/gnu/"
|
||||
"ftp://ftp.freenet.de/pub/ftp.gnu.org/gnu/"
|
||||
"ftp://ftp.cs.uni-bonn.de/pub/gnu/"
|
||||
"ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/"
|
||||
"ftp://ftp.stw-bonn.de/pub/mirror/ftp.gnu.org/"
|
||||
"ftp://ftp.math.uni-bremen.de/pub/gnu"
|
||||
"ftp://ftp.forthnet.gr/pub/gnu/"
|
||||
"ftp://ftp.ntua.gr/pub/gnu/"
|
||||
"ftp://ftp.duth.gr/pub/gnu/"
|
||||
"ftp://ftp.physics.auth.gr/pub/gnu/"
|
||||
"ftp://ftp.esat.net/pub/gnu/"
|
||||
"ftp://ftp.heanet.ie/mirrors/ftp.gnu.org"
|
||||
"ftp://ftp.lugroma2.org/pub/gnu/"
|
||||
"ftp://ftp.gnu.inetcosmos.org/pub/gnu/"
|
||||
"ftp://ftp.digitaltrust.it/pub/gnu"
|
||||
"ftp://ftp://rm.mirror.garr.it/mirrors/gnuftp"
|
||||
"ftp://ftp.nluug.nl/pub/gnu/"
|
||||
"ftp://ftp.mirror.nl/pub/mirror/gnu/"
|
||||
"ftp://ftp.nl.uu.net/pub/gnu/"
|
||||
"ftp://mirror.widexs.nl/pub/gnu/"
|
||||
"ftp://ftp.easynet.nl/mirror/GNU/"
|
||||
"ftp://ftp.win.tue.nl/pub/gnu"
|
||||
"ftp://gnu.mirror.vuurwerk.net/pub/GNU/"
|
||||
"ftp://gnu.kookel.org/pub/ftp.gnu.org/"
|
||||
"ftp://ftp.uninett.no/pub/gnu/"
|
||||
"ftp://ftp.task.gda.pl/pub/gnu/"
|
||||
"ftp://sunsite.icm.edu.pl/pub/gnu/"
|
||||
"ftp://ftp.man.poznan.pl/pub/gnu"
|
||||
"ftp://ftp.ist.utl.pt/pub/GNU/gnu/"
|
||||
"ftp://ftp.telepac.pt/pub/gnu/"
|
||||
"ftp://ftp.timisoara.roedu.net/mirrors/ftp.gnu.org/pub/gnu"
|
||||
"ftp://ftp.chg.ru/pub/gnu/"
|
||||
"ftp://gnuftp.axitel.ru/"
|
||||
"ftp://ftp.arnes.si/software/gnu/"
|
||||
"ftp://ftp.etsimo.uniovi.es/pub/gnu/"
|
||||
"ftp://ftp.rediris.es/pub/gnu/"
|
||||
"ftp://ftp.chl.chalmers.se/pub/gnu/"
|
||||
"ftp://ftp.isy.liu.se/pub/gnu/"
|
||||
"ftp://ftp.luth.se/pub/unix/gnu/"
|
||||
"ftp://ftp.stacken.kth.se/pub/gnu/"
|
||||
"ftp://ftp.sunet.se/pub/gnu/"
|
||||
"ftp://sunsite.cnlab-switch.ch/mirror/gnu/"
|
||||
"ftp://ftp.ulak.net.tr/gnu/"
|
||||
"ftp://ftp.gnu.org.ua"
|
||||
"ftp://ftp.mcc.ac.uk/pub/gnu/"
|
||||
"ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/gnu/"
|
||||
"ftp://ftp.warwick.ac.uk/pub/gnu/"
|
||||
"ftp://ftp.hands.com/ftp.gnu.org/"
|
||||
"ftp://gnu.teleglobe.net/ftp.gnu.org/"])
|
||||
"http://ftpmirror.gnu.org"])
|
||||
("GNU Project Home Page" . "www.gnu.org")
|
||||
|
||||
;; Emacs.
|
||||
|
@ -233,7 +109,7 @@
|
|||
[simple-query "wikipedia.org" "wikipedia.org/wiki/" ""])
|
||||
|
||||
;; Misc. general interest.
|
||||
("Interactive Weather Information Network" . webjump-to-iwin)
|
||||
("National Weather Service" . webjump-to-iwin)
|
||||
("Usenet FAQs" .
|
||||
"www.faqs.org/faqs/")
|
||||
("RTFM Usenet FAQs by Group" .
|
||||
|
@ -254,10 +130,10 @@
|
|||
"www.neilvandyke.org/webjump/")
|
||||
|
||||
)
|
||||
"Sample hotlist for WebJump. See the documentation for the `webjump'
|
||||
function and the `webjump-sites' variable.")
|
||||
"Sample hotlist for WebJump.
|
||||
See the documentation for `webjump' and `webjump-sites'.")
|
||||
|
||||
(defvar webjump-state-to-postal-alist
|
||||
(defconst webjump-state-to-postal-alist
|
||||
'(("Alabama" . "al") ("Alaska" . "ak") ("Arizona" . "az") ("Arkansas" . "ar")
|
||||
("California" . "ca") ("Colorado" . "co") ("Connecticut" . "ct")
|
||||
("Delaware" . "de") ("Florida" . "fl") ("Georgia" . "ga") ("Hawaii" . "hi")
|
||||
|
@ -277,8 +153,7 @@ function and the `webjump-sites' variable.")
|
|||
|
||||
;;------------------------------------------------------------ Option Variables
|
||||
|
||||
(defvar webjump-sites
|
||||
webjump-sample-sites
|
||||
(defcustom webjump-sites webjump-sample-sites
|
||||
"Hotlist for WebJump.
|
||||
|
||||
The hotlist is represented as an association list, with the CAR of each cell
|
||||
|
@ -309,33 +184,47 @@ parameter. This might come in handy for various kludges.
|
|||
|
||||
For convenience, if the `http://', `ftp://', or `file://' prefix is missing
|
||||
from a URL, WebJump will make a guess at what you wanted and prepend it before
|
||||
submitting the URL.")
|
||||
submitting the URL."
|
||||
:type '(alist :key-type (string :tag "Name")
|
||||
:value-type (choice :tag "URL"
|
||||
(string :tag "URL")
|
||||
function
|
||||
(vector :tag "Builtin"
|
||||
(symbol :tag "Name")
|
||||
(repeat :inline t :tag "Arguments"
|
||||
string))
|
||||
(sexp :tag "Expression to eval"))))
|
||||
|
||||
;;------------------------------------------------------- Sample Site Functions
|
||||
|
||||
(defun webjump-to-iwin (name)
|
||||
(let ((prefix "http://iwin.nws.noaa.gov/")
|
||||
(state (webjump-read-choice name "state"
|
||||
(append '(("Puerto Rico" . "pr"))
|
||||
webjump-state-to-postal-alist))))
|
||||
(if state
|
||||
(concat prefix "iwin/" state "/"
|
||||
(webjump-read-choice name "option"
|
||||
'(("Hourly Report" . "hourly")
|
||||
("State Forecast" . "state")
|
||||
("Local Forecast" . "local")
|
||||
("Zone Forecast" . "zone")
|
||||
("Short-Term Forecast" . "shortterm")
|
||||
("Weather Summary" . "summary")
|
||||
("Public Information" . "public")
|
||||
("Climatic Data" . "climate")
|
||||
("Aviation Products" . "aviation")
|
||||
("Hydro Products" . "hydro")
|
||||
("Special Weather" . "special")
|
||||
("Watches and Warnings" . "warnings"))
|
||||
"zone")
|
||||
".html")
|
||||
prefix)))
|
||||
(let* ((prefix "http://www.nws.noaa.gov/view/")
|
||||
(state (webjump-read-choice name "state"
|
||||
(append '(("Puerto Rico" . "pr")
|
||||
("Guam" . "gu")
|
||||
("American Samoa" . "as")
|
||||
("District of Columbia" . "dc")
|
||||
("US Virgin Islands" . "vi"))
|
||||
webjump-state-to-postal-alist)))
|
||||
(opt (if state
|
||||
(webjump-read-choice
|
||||
name "option"
|
||||
'(("Hourly Report" . "hourly")
|
||||
("State Forecast" . "state")
|
||||
("Zone Forecast" . "zone")
|
||||
("Short-Term Forecast" . "shortterm")
|
||||
("Forecast Discussion" . "discussion")
|
||||
("Weather Summary" . "summary")
|
||||
("Public Information" . "public")
|
||||
("Climatic Data" . "climate")
|
||||
("Hydro Products" . "hydro")
|
||||
("Watches" . "watches")
|
||||
("Special Weather" . "special")
|
||||
("Warnings and Advisories" . "warnings")
|
||||
("Fire Weather" . "firewx"))))))
|
||||
(cond (opt (concat prefix "prodsByState.php?state=" state "&prodtype=" opt))
|
||||
(state (concat prefix "states.php?state=" state))
|
||||
(t prefix))))
|
||||
|
||||
(defun webjump-to-risks (name)
|
||||
(let (issue volume)
|
||||
|
|
|
@ -1151,7 +1151,7 @@ delimiter."
|
|||
((looking-at "<<")
|
||||
(cond
|
||||
((and (ruby-expr-beg 'heredoc)
|
||||
(looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)"))
|
||||
(looking-at "<<\\([-~]\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)"))
|
||||
(setq re (regexp-quote (or (match-string 4) (match-string 2))))
|
||||
(if (match-beginning 1) (setq re (concat "\\s *" re)))
|
||||
(let* ((id-end (goto-char (match-end 0)))
|
||||
|
|
|
@ -4684,7 +4684,7 @@ Usage:
|
|||
SPECIAL MENUES:
|
||||
As an alternative to the speedbar, an index menu can be added (set
|
||||
option `vhdl-index-menu' to non-nil) or made accessible as a mouse menu
|
||||
(e.g. add \"(global-set-key '[S-down-mouse-3] 'imenu)\" to your start-up
|
||||
(e.g. add \"(global-set-key [S-down-mouse-3] \\='imenu)\" to your start-up
|
||||
file) for browsing the file contents (is not populated if buffer is
|
||||
larger than 256000). Also, a source file menu can be
|
||||
added (set option `vhdl-source-file-menu' to non-nil) for browsing the
|
||||
|
|
|
@ -3765,6 +3765,7 @@ support pty association, if PROGRAM is nil."
|
|||
(define-derived-mode process-menu-mode tabulated-list-mode "Process Menu"
|
||||
"Major mode for listing the processes called by Emacs."
|
||||
(setq tabulated-list-format [("Process" 15 t)
|
||||
("PID" 7 t)
|
||||
("Status" 7 t)
|
||||
("Buffer" 15 t)
|
||||
("TTY" 12 t)
|
||||
|
@ -3796,6 +3797,7 @@ Also, delete any process that is exited or signaled."
|
|||
(process-query-on-exit-flag p))
|
||||
(let* ((buf (process-buffer p))
|
||||
(type (process-type p))
|
||||
(pid (if (process-id p) (format "%d" (process-id p)) "--"))
|
||||
(name (process-name p))
|
||||
(status (symbol-name (process-status p)))
|
||||
(buf-label (if (buffer-live-p buf)
|
||||
|
@ -3831,7 +3833,7 @@ Also, delete any process that is exited or signaled."
|
|||
(format " at %s b/s" speed)
|
||||
"")))))
|
||||
(mapconcat 'identity (process-command p) " "))))
|
||||
(push (list p (vector name status buf-label tty cmd))
|
||||
(push (list p (vector name pid status buf-label tty cmd))
|
||||
tabulated-list-entries))))))
|
||||
|
||||
(defun process-menu-visit-buffer (button)
|
||||
|
|
|
@ -3954,9 +3954,9 @@ the match data are the result of matching REGEXP against a substring
|
|||
of STRING, the same substring that is the actual text of the match which
|
||||
is passed to REP as its argument.
|
||||
|
||||
To replace only the first match (if any), make REGEXP match up to \\'
|
||||
To replace only the first match (if any), make REGEXP match up to \\\\='
|
||||
and replace a sub-expression, e.g.
|
||||
(replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1)
|
||||
(replace-regexp-in-string \"\\\\(foo\\\\).*\\\\\\='\" \"bar\" \" foo foo\" nil nil 1)
|
||||
=> \" bar foo\""
|
||||
|
||||
;; To avoid excessive consing from multiple matches in long strings,
|
||||
|
|
|
@ -429,7 +429,7 @@ x exchanges point and mark.
|
|||
Mark ring is pushed at start of every successful search and when
|
||||
jump to line occurs. The mark is set on jump to buffer start or end.
|
||||
\\[point-to-register] save current position in character register.
|
||||
' go to position saved in character register.
|
||||
\\=' go to position saved in character register.
|
||||
s do forward incremental search.
|
||||
r do reverse incremental search.
|
||||
\\[View-search-regexp-forward] searches forward for regular expression, starting after current page.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; wdired.el --- Rename files editing their names in dired buffers
|
||||
;;; wdired.el --- Rename files editing their names in dired buffers -*- coding: utf-8; -*-
|
||||
|
||||
;; Copyright (C) 2004-2016 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -590,7 +590,7 @@ Optional arguments are ignored."
|
|||
"Move down lines then position at filename or the current column.
|
||||
See `wdired-use-dired-vertical-movement'. Optional prefix ARG
|
||||
says how many lines to move; default is one line."
|
||||
(interactive "p")
|
||||
(interactive "^p")
|
||||
(with-no-warnings (next-line arg))
|
||||
(if (or (eq wdired-use-dired-vertical-movement t)
|
||||
(and wdired-use-dired-vertical-movement
|
||||
|
@ -603,7 +603,7 @@ says how many lines to move; default is one line."
|
|||
"Move up lines then position at filename or the current column.
|
||||
See `wdired-use-dired-vertical-movement'. Optional prefix ARG
|
||||
says how many lines to move; default is one line."
|
||||
(interactive "p")
|
||||
(interactive "^p")
|
||||
(with-no-warnings (previous-line arg))
|
||||
(if (or (eq wdired-use-dired-vertical-movement t)
|
||||
(and wdired-use-dired-vertical-movement
|
||||
|
|
|
@ -294,15 +294,31 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
|
|||
}
|
||||
}
|
||||
|
||||
DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r",
|
||||
DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 3,
|
||||
"(list (region-beginning) (region-end) (region-noncontiguous-p))",
|
||||
doc: /* Convert the region to upper case. In programs, wants two arguments.
|
||||
These arguments specify the starting and ending character numbers of
|
||||
the region to operate on. When used as a command, the text between
|
||||
point and the mark is operated on.
|
||||
See also `capitalize-region'. */)
|
||||
(Lisp_Object beg, Lisp_Object end)
|
||||
(Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p)
|
||||
{
|
||||
casify_region (CASE_UP, beg, end);
|
||||
Lisp_Object bounds = Qnil;
|
||||
|
||||
if (!NILP (region_noncontiguous_p))
|
||||
{
|
||||
bounds = call1 (Fsymbol_value (intern ("region-extract-function")),
|
||||
intern ("bounds"));
|
||||
|
||||
while (CONSP (bounds))
|
||||
{
|
||||
casify_region (CASE_UP, XCAR (XCAR (bounds)), XCDR (XCAR (bounds)));
|
||||
bounds = XCDR (bounds);
|
||||
}
|
||||
}
|
||||
else
|
||||
casify_region (CASE_UP, beg, end);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,15 @@ typedef bool bool_bf;
|
|||
(4 < __GNUC__ + (8 <= __GNUC_MINOR__))
|
||||
#endif
|
||||
|
||||
/* Simulate __has_builtin on compilers that lack it. It is used only
|
||||
on arguments like __builtin_assume_aligned that are handled in this
|
||||
simulation. */
|
||||
#ifndef __has_builtin
|
||||
# define __has_builtin(a) __has_builtin_##a
|
||||
# define __has_builtin___builtin_assume_aligned \
|
||||
(4 < __GNUC__ + (7 <= __GNUC_MINOR__))
|
||||
#endif
|
||||
|
||||
/* Simulate __has_feature on compilers that lack it. It is used only
|
||||
to define ADDRESS_SANITIZER below. */
|
||||
#ifndef __has_feature
|
||||
|
@ -77,6 +86,11 @@ typedef bool bool_bf;
|
|||
# define ADDRESS_SANITIZER false
|
||||
#endif
|
||||
|
||||
/* Yield PTR, which must be aligned to ALIGNMENT. */
|
||||
#if ! __has_builtin (__builtin_assume_aligned)
|
||||
# define __builtin_assume_aligned(ptr, alignment, ...) ((void *) (ptr))
|
||||
#endif
|
||||
|
||||
#ifdef DARWIN_OS
|
||||
#ifdef emacs
|
||||
#define malloc unexec_malloc
|
||||
|
|
10
src/fileio.c
10
src/fileio.c
|
@ -5387,14 +5387,8 @@ auto_save_error (Lisp_Object error_val)
|
|||
msg = CALLN (Fformat, format, BVAR (current_buffer, name),
|
||||
Ferror_message_string (error_val));
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
if (i == 0)
|
||||
message3 (msg);
|
||||
else
|
||||
message3_nolog (msg);
|
||||
Fsleep_for (make_number (1), Qnil);
|
||||
}
|
||||
call3 (intern ("display-warning"),
|
||||
intern ("auto-save"), msg, intern ("error"));
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
|
@ -341,7 +341,9 @@ error !;
|
|||
(struct Lisp_Symbol *) ((intptr_t) XLI (a) - Lisp_Symbol \
|
||||
+ (char *) lispsym))
|
||||
# define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK))
|
||||
# define lisp_h_XUNTAG(a, type) ((void *) (intptr_t) (XLI (a) - (type)))
|
||||
# define lisp_h_XUNTAG(a, type) \
|
||||
__builtin_assume_aligned ((void *) (intptr_t) (XLI (a) - (type)), \
|
||||
GCALIGNMENT)
|
||||
#endif
|
||||
|
||||
/* When compiling via gcc -O0, define the key operations as macros, as
|
||||
|
|
|
@ -3125,7 +3125,7 @@ - (NSString *)panel: (id)sender userEnteredFilename: (NSString *)filename
|
|||
|
||||
(setq ns-icon-type-alist
|
||||
(append ns-icon-type-alist
|
||||
'((\"^\\\\*\\\\(Group\\\\*$\\\\|Summary \\\\|Article\\\\*$\\\\)\"
|
||||
\\='((\"^\\\\*\\\\(Group\\\\*$\\\\|Summary \\\\|Article\\\\*$\\\\)\"
|
||||
. \"Gnus\"))))
|
||||
|
||||
When you miniaturize a Group, Summary or Article frame, Gnus.tiff will
|
||||
|
|
|
@ -2691,7 +2691,8 @@ since only regular expressions have distinguished subexpressions. */)
|
|||
|
||||
if (case_action == all_caps)
|
||||
Fupcase_region (make_number (search_regs.start[sub]),
|
||||
make_number (newpoint));
|
||||
make_number (newpoint),
|
||||
Qnil);
|
||||
else if (case_action == cap_initial)
|
||||
Fupcase_initials_region (make_number (search_regs.start[sub]),
|
||||
make_number (newpoint));
|
||||
|
|
61
src/syntax.c
61
src/syntax.c
|
@ -2182,63 +2182,51 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
|
|||
ptrdiff_t start_point = PT;
|
||||
ptrdiff_t pos = PT;
|
||||
ptrdiff_t pos_byte = PT_BYTE;
|
||||
unsigned char *p = PT_ADDR, *endp, *stop;
|
||||
|
||||
if (forwardp)
|
||||
{
|
||||
endp = (XINT (lim) == GPT) ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
|
||||
stop = (pos < GPT && GPT < XINT (lim)) ? GPT_ADDR : endp;
|
||||
}
|
||||
else
|
||||
{
|
||||
endp = CHAR_POS_ADDR (XINT (lim));
|
||||
stop = (pos >= GPT && GPT > XINT (lim)) ? GAP_END_ADDR : endp;
|
||||
}
|
||||
unsigned char *p, *endp, *stop;
|
||||
|
||||
immediate_quit = 1;
|
||||
SETUP_SYNTAX_TABLE (pos, forwardp ? 1 : -1);
|
||||
|
||||
if (forwardp)
|
||||
{
|
||||
if (multibyte)
|
||||
while (true)
|
||||
{
|
||||
while (1)
|
||||
p = BYTE_POS_ADDR (pos_byte);
|
||||
endp = XINT (lim) == GPT ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
|
||||
stop = pos < GPT && GPT < XINT (lim) ? GPT_ADDR : endp;
|
||||
|
||||
do
|
||||
{
|
||||
int nbytes;
|
||||
|
||||
if (p >= stop)
|
||||
{
|
||||
if (p >= endp)
|
||||
break;
|
||||
goto done;
|
||||
p = GAP_END_ADDR;
|
||||
stop = endp;
|
||||
}
|
||||
c = STRING_CHAR_AND_LENGTH (p, nbytes);
|
||||
if (multibyte)
|
||||
c = STRING_CHAR_AND_LENGTH (p, nbytes);
|
||||
else
|
||||
c = *p, nbytes = 1;
|
||||
if (! fastmap[SYNTAX (c)])
|
||||
break;
|
||||
goto done;
|
||||
p += nbytes, pos++, pos_byte += nbytes;
|
||||
UPDATE_SYNTAX_TABLE_FORWARD (pos);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (p >= stop)
|
||||
{
|
||||
if (p >= endp)
|
||||
break;
|
||||
p = GAP_END_ADDR;
|
||||
stop = endp;
|
||||
}
|
||||
if (! fastmap[SYNTAX (*p)])
|
||||
break;
|
||||
p++, pos++, pos_byte++;
|
||||
UPDATE_SYNTAX_TABLE_FORWARD (pos);
|
||||
}
|
||||
while (!parse_sexp_lookup_properties
|
||||
|| pos < gl_state.e_property);
|
||||
|
||||
update_syntax_table_forward (pos + gl_state.offset,
|
||||
false, gl_state.object);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p = BYTE_POS_ADDR (pos_byte);
|
||||
endp = CHAR_POS_ADDR (XINT (lim));
|
||||
stop = pos >= GPT && GPT > XINT (lim) ? GAP_END_ADDR : endp;
|
||||
|
||||
if (multibyte)
|
||||
{
|
||||
while (1)
|
||||
|
@ -2280,6 +2268,7 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
|
|||
}
|
||||
}
|
||||
|
||||
done:
|
||||
SET_PT_BOTH (pos, pos_byte);
|
||||
immediate_quit = 0;
|
||||
|
||||
|
@ -3109,7 +3098,7 @@ but before count is used up, nil is returned. */)
|
|||
DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars,
|
||||
0, 0, 0,
|
||||
doc: /* Move point backward over any number of chars with prefix syntax.
|
||||
This includes chars with expression prefix syntax class (') and those with
|
||||
This includes chars with expression prefix syntax class (\\=') and those with
|
||||
the prefix syntax flag (p). */)
|
||||
(void)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
if sys.argv[1:]:
|
||||
port = int(sys.argv[1])
|
||||
else:
|
||||
port = 8000
|
||||
port = 0
|
||||
server_address = ('127.0.0.1', port)
|
||||
|
||||
HandlerClass.protocol_version = Protocol
|
||||
|
|
|
@ -372,16 +372,28 @@ Must called from within a `tar-mode' buffer."
|
|||
(skip-unless (executable-find "python2"))
|
||||
;; For some reason this test doesn't work reliably on hydra.nixos.org.
|
||||
(skip-unless (not (getenv "NIX_STORE")))
|
||||
(with-package-test (:basedir
|
||||
package-test-data-dir
|
||||
:location "http://0.0.0.0:8000/")
|
||||
(let* ((package-menu-async t)
|
||||
(process (start-process
|
||||
"package-server" "package-server-buffer"
|
||||
(executable-find "python2")
|
||||
(expand-file-name "package-test-server.py"))))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(let* ((package-menu-async t)
|
||||
(default-directory package-test-data-dir)
|
||||
(process (start-process
|
||||
"package-server" "package-server-buffer"
|
||||
(executable-find "python2")
|
||||
"package-test-server.py"))
|
||||
port)
|
||||
(unwind-protect
|
||||
(progn
|
||||
(with-current-buffer "package-server-buffer"
|
||||
(should
|
||||
(with-timeout (10 nil)
|
||||
(while (not port)
|
||||
(accept-process-output nil 1)
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward "Serving HTTP on .* port \\([0-9]+\\) "
|
||||
nil t)
|
||||
(setq port (match-string 1))))
|
||||
port)))
|
||||
(with-package-test (:basedir
|
||||
package-test-data-dir
|
||||
:location (format "http://0.0.0.0:%s/" port))
|
||||
(list-packages)
|
||||
(should package--downloads-in-progress)
|
||||
(should mode-line-process)
|
||||
|
@ -395,8 +407,8 @@ Must called from within a `tar-mode' buffer."
|
|||
(skip-unless (process-live-p process))
|
||||
(goto-char (point-min))
|
||||
(should
|
||||
(search-forward-regexp "^ +simple-single" nil t)))
|
||||
(if (process-live-p process) (kill-process process))))))
|
||||
(search-forward-regexp "^ +simple-single" nil t))))
|
||||
(if (process-live-p process) (kill-process process)))))
|
||||
|
||||
(ert-deftest package-test-describe-package ()
|
||||
"Test displaying help for a package."
|
||||
|
|
|
@ -65,6 +65,7 @@ after itself, although it will leave a buffer called
|
|||
rtn))
|
||||
;; Switch everything off and restore the buffer.
|
||||
(toggle-viper-mode)
|
||||
(delete-file viper-custom-file-name)
|
||||
(switch-to-buffer before-buffer))))
|
||||
|
||||
(ert-deftest viper-test-go ()
|
||||
|
|
|
@ -73,8 +73,46 @@ It is different for local and remote file notification libraries.")
|
|||
(cond
|
||||
((file-remote-p temporary-file-directory) 6)
|
||||
((string-equal (file-notify--test-library) "w32notify") 4)
|
||||
((eq system-type 'cygwin) 6)
|
||||
(t 3)))
|
||||
|
||||
(defmacro file-notify--wait-for-events (timeout until)
|
||||
"Wait for and return file notification events until form UNTIL is true.
|
||||
TIMEOUT is the maximum time to wait for, in seconds."
|
||||
`(with-timeout (,timeout (ignore))
|
||||
(while (null ,until)
|
||||
(read-event nil nil file-notify--test-read-event-timeout))))
|
||||
|
||||
(defun file-notify--test-no-descriptors ()
|
||||
"Check that `file-notify-descriptors' is an empty hash table.
|
||||
Return nil when any other file notification watch is still active."
|
||||
;; Give read events a last chance.
|
||||
(file-notify--wait-for-events
|
||||
(file-notify--test-timeout)
|
||||
(zerop (hash-table-count file-notify-descriptors)))
|
||||
;; Now check.
|
||||
(zerop (hash-table-count file-notify-descriptors)))
|
||||
|
||||
(defun file-notify--test-no-descriptors-explainer ()
|
||||
"Explain why `file-notify--test-no-descriptors' fails."
|
||||
(let ((result (list "Watch descriptor(s) existent:")))
|
||||
(maphash
|
||||
(lambda (key value) (push (cons key value) result))
|
||||
file-notify-descriptors)
|
||||
(nreverse result)))
|
||||
|
||||
(put 'file-notify--test-no-descriptors 'ert-explainer
|
||||
'file-notify--test-no-descriptors-explainer)
|
||||
|
||||
(defun file-notify--test-cleanup-p ()
|
||||
"Check, that the test has cleaned up the environment as much as needed."
|
||||
;; `file-notify--test-event' should not be set but bound
|
||||
;; dynamically.
|
||||
(should-not file-notify--test-event)
|
||||
;; The test should have cleaned up this already. Let's check
|
||||
;; nevertheless.
|
||||
(should (file-notify--test-no-descriptors)))
|
||||
|
||||
(defun file-notify--test-cleanup ()
|
||||
"Cleanup after a test."
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
|
@ -102,9 +140,7 @@ It is different for local and remote file notification libraries.")
|
|||
file-notify--test-desc1 nil
|
||||
file-notify--test-desc2 nil
|
||||
file-notify--test-results nil
|
||||
file-notify--test-events nil)
|
||||
(when file-notify--test-event
|
||||
(error "file-notify--test-event should not be set but bound dynamically")))
|
||||
file-notify--test-events nil))
|
||||
|
||||
(setq password-cache-expiry nil
|
||||
tramp-verbose 0
|
||||
|
@ -175,14 +211,22 @@ remote host, or nil."
|
|||
(ert-deftest file-notify-test00-availability ()
|
||||
"Test availability of `file-notify'."
|
||||
(skip-unless (file-notify--test-local-enabled))
|
||||
;; Report the native library which has been used.
|
||||
(message "Library: `%s'" (file-notify--test-library))
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch temporary-file-directory '(change) #'ignore)))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup))
|
||||
(unwind-protect
|
||||
(progn
|
||||
;; Report the native library which has been used.
|
||||
(message "Library: `%s'" (file-notify--test-library))
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
temporary-file-directory '(change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
||||
(file-notify--deftest-remote file-notify-test00-availability
|
||||
"Test availability of `file-notify' for remote files.")
|
||||
|
@ -191,58 +235,66 @@ remote host, or nil."
|
|||
"Check `file-notify-add-watch'."
|
||||
(skip-unless (file-notify--test-local-enabled))
|
||||
|
||||
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name)
|
||||
file-notify--test-tmpfile1
|
||||
(format "%s/%s" file-notify--test-tmpfile (md5 (current-time-string))))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name)
|
||||
file-notify--test-tmpfile1
|
||||
(format
|
||||
"%s/%s" file-notify--test-tmpfile (md5 (current-time-string))))
|
||||
|
||||
;; Check, that different valid parameters are accepted.
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch temporary-file-directory '(change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
temporary-file-directory '(attribute-change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
temporary-file-directory '(change attribute-change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(write-region "any text" nil file-notify--test-tmpfile nil 'no-message)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile '(change attribute-change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(delete-file file-notify--test-tmpfile)
|
||||
;; Check, that different valid parameters are accepted.
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
temporary-file-directory '(change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
temporary-file-directory '(attribute-change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
temporary-file-directory '(change attribute-change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(write-region "any text" nil file-notify--test-tmpfile nil 'no-message)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile '(change attribute-change) #'ignore)))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(delete-file file-notify--test-tmpfile)
|
||||
|
||||
;; Check error handling.
|
||||
(should-error (file-notify-add-watch 1 2 3 4)
|
||||
:type 'wrong-number-of-arguments)
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch 1 2 3))
|
||||
'(wrong-type-argument 1)))
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch temporary-file-directory 2 3))
|
||||
'(wrong-type-argument 2)))
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch temporary-file-directory '(change) 3))
|
||||
'(wrong-type-argument 3)))
|
||||
;; The upper directory of a file must exist.
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile1 '(change attribute-change) #'ignore))
|
||||
`(file-notify-error
|
||||
"Directory does not exist" ,file-notify--test-tmpfile)))
|
||||
;; Check error handling.
|
||||
(should-error (file-notify-add-watch 1 2 3 4)
|
||||
:type 'wrong-number-of-arguments)
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch 1 2 3))
|
||||
'(wrong-type-argument 1)))
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch temporary-file-directory 2 3))
|
||||
'(wrong-type-argument 2)))
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch temporary-file-directory '(change) 3))
|
||||
'(wrong-type-argument 3)))
|
||||
;; The upper directory of a file must exist.
|
||||
(should
|
||||
(equal (should-error
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile1
|
||||
'(change attribute-change) #'ignore))
|
||||
`(file-notify-error
|
||||
"Directory does not exist" ,file-notify--test-tmpfile)))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup))
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
||||
(file-notify--deftest-remote file-notify-test01-add-watch
|
||||
"Check `file-notify-add-watch' for remote files.")
|
||||
|
@ -288,28 +340,25 @@ and the event to `file-notify--test-events'."
|
|||
(expand-file-name
|
||||
(make-temp-name "file-notify-test") temporary-file-directory))
|
||||
|
||||
(defmacro file-notify--wait-for-events (timeout until)
|
||||
"Wait for and return file notification events until form UNTIL is true.
|
||||
TIMEOUT is the maximum time to wait for, in seconds."
|
||||
`(with-timeout (,timeout (ignore))
|
||||
(while (null ,until)
|
||||
(read-event nil nil file-notify--test-read-event-timeout))))
|
||||
|
||||
(defun file-notify--test-with-events-check (events)
|
||||
"Check whether received events match one of the EVENTS alternatives."
|
||||
(let (result)
|
||||
(dolist (elt events result)
|
||||
(setq result
|
||||
(or result
|
||||
(equal elt (mapcar #'cadr file-notify--test-events)))))))
|
||||
(if (eq (car elt) :random)
|
||||
(equal (sort (cdr elt) 'string-lessp)
|
||||
(sort (mapcar #'cadr file-notify--test-events)
|
||||
'string-lessp))
|
||||
(equal elt (mapcar #'cadr file-notify--test-events))))))))
|
||||
|
||||
(defun file-notify--test-with-events-explainer (events)
|
||||
"Explain why `file-notify--test-with-events-check' fails."
|
||||
(if (null (cdr events))
|
||||
(format "Received events `%s' do not match expected events `%s'"
|
||||
(format "Received events do not match expected events\n%s\n%s"
|
||||
(mapcar #'cadr file-notify--test-events) (car events))
|
||||
(format
|
||||
"Received events `%s' do not match any sequence of expected events `%s'"
|
||||
"Received events do not match any sequence of expected events\n%s\n%s"
|
||||
(mapcar #'cadr file-notify--test-events) events)))
|
||||
|
||||
(put 'file-notify--test-with-events-check 'ert-explainer
|
||||
|
@ -318,11 +367,20 @@ TIMEOUT is the maximum time to wait for, in seconds."
|
|||
(defmacro file-notify--test-with-events (events &rest body)
|
||||
"Run BODY collecting events and then compare with EVENTS.
|
||||
EVENTS is either a simple list of events, or a list of lists of
|
||||
events, which represent different possible results. Don't wait
|
||||
longer than timeout seconds for the events to be delivered."
|
||||
events, which represent different possible results. The first
|
||||
event of a list could be the pseudo event `:random', which is
|
||||
just an indicator for comparison.
|
||||
|
||||
Don't wait longer than timeout seconds for the events to be
|
||||
delivered."
|
||||
(declare (indent 1))
|
||||
`(let* ((events (if (consp (car ,events)) ,events (list ,events)))
|
||||
(max-length (apply 'max (mapcar 'length events)))
|
||||
(max-length
|
||||
(apply
|
||||
'max
|
||||
(mapcar
|
||||
(lambda (x) (length (if (eq (car x) :random) (cdr x) x)))
|
||||
events)))
|
||||
create-lockfiles)
|
||||
;; Flush pending events.
|
||||
(file-notify--wait-for-events
|
||||
|
@ -540,7 +598,10 @@ longer than timeout seconds for the events to be delivered."
|
|||
(set-file-times file-notify--test-tmpfile '(0 0))
|
||||
(read-event nil nil file-notify--test-read-event-timeout)
|
||||
(delete-file file-notify--test-tmpfile))
|
||||
(file-notify-rm-watch file-notify--test-desc)))
|
||||
(file-notify-rm-watch file-notify--test-desc))
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
@ -556,6 +617,7 @@ longer than timeout seconds for the events to be delivered."
|
|||
(ert-deftest file-notify-test03-autorevert ()
|
||||
"Check autorevert via file notification."
|
||||
(skip-unless (file-notify--test-local-enabled))
|
||||
|
||||
;; `auto-revert-buffers' runs every 5". And we must wait, until the
|
||||
;; file has been reverted.
|
||||
(let ((timeout (if (file-remote-p temporary-file-directory) 60 10))
|
||||
|
@ -563,7 +625,6 @@ longer than timeout seconds for the events to be delivered."
|
|||
(unwind-protect
|
||||
(progn
|
||||
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
|
||||
|
||||
(write-region
|
||||
"any text" nil file-notify--test-tmpfile nil 'no-message)
|
||||
(setq buf (find-file-noselect file-notify--test-tmpfile))
|
||||
|
@ -625,7 +686,10 @@ longer than timeout seconds for the events to be delivered."
|
|||
(string-match
|
||||
(format-message "Reverting buffer `%s'." (buffer-name buf))
|
||||
(buffer-string))))
|
||||
(should (string-match "foo bla" (buffer-string)))))
|
||||
(should (string-match "foo bla" (buffer-string))))
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(with-current-buffer "*Messages*" (widen))
|
||||
|
@ -646,14 +710,16 @@ longer than timeout seconds for the events to be delivered."
|
|||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile
|
||||
'(change) #'file-notify--test-event-handler)))
|
||||
file-notify--test-tmpfile '(change) #'ignore)))
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
;; After calling `file-notify-rm-watch', the descriptor is not
|
||||
;; valid anymore.
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
(should-not (file-notify-valid-p file-notify--test-desc))
|
||||
(delete-file file-notify--test-tmpfile))
|
||||
(delete-file file-notify--test-tmpfile)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup))
|
||||
|
@ -689,7 +755,10 @@ longer than timeout seconds for the events to be delivered."
|
|||
(delete-file file-notify--test-tmpfile))
|
||||
;; After deleting the file, the descriptor is not valid anymore.
|
||||
(should-not (file-notify-valid-p file-notify--test-desc))
|
||||
(file-notify-rm-watch file-notify--test-desc))
|
||||
(file-notify-rm-watch file-notify--test-desc)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup))
|
||||
|
@ -724,7 +793,10 @@ longer than timeout seconds for the events to be delivered."
|
|||
(delete-directory temporary-file-directory t))
|
||||
;; After deleting the parent directory, the descriptor must
|
||||
;; not be valid anymore.
|
||||
(should-not (file-notify-valid-p file-notify--test-desc)))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc))
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
@ -744,8 +816,7 @@ longer than timeout seconds for the events to be delivered."
|
|||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile
|
||||
'(change) #'file-notify--test-event-handler)))
|
||||
file-notify--test-tmpfile '(change) #'ignore)))
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
;; After removing the watch, the descriptor must not be valid
|
||||
;; anymore.
|
||||
|
@ -753,7 +824,11 @@ longer than timeout seconds for the events to be delivered."
|
|||
(file-notify--wait-for-events
|
||||
(file-notify--test-timeout)
|
||||
(not (file-notify-valid-p file-notify--test-desc)))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc)))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc))
|
||||
(delete-directory file-notify--test-tmpfile t)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup))
|
||||
|
@ -766,8 +841,7 @@ longer than timeout seconds for the events to be delivered."
|
|||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile
|
||||
'(change) #'file-notify--test-event-handler)))
|
||||
file-notify--test-tmpfile '(change) #'ignore)))
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
;; After deleting the directory, the descriptor must not be
|
||||
;; valid anymore.
|
||||
|
@ -775,7 +849,10 @@ longer than timeout seconds for the events to be delivered."
|
|||
(file-notify--wait-for-events
|
||||
(file-notify--test-timeout)
|
||||
(not (file-notify-valid-p file-notify--test-desc)))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc)))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc))
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
@ -787,8 +864,6 @@ longer than timeout seconds for the events to be delivered."
|
|||
"Check that events are not dropped."
|
||||
:tags '(:expensive-test)
|
||||
(skip-unless (file-notify--test-local-enabled))
|
||||
;; Under cygwin events arrive in random order. Impossible to define a test.
|
||||
(skip-unless (not (eq system-type 'cygwin)))
|
||||
|
||||
(should
|
||||
(setq file-notify--test-tmpfile
|
||||
|
@ -827,6 +902,12 @@ longer than timeout seconds for the events to be delivered."
|
|||
(let (r)
|
||||
(dotimes (_i n r)
|
||||
(setq r (append '(deleted renamed) r)))))
|
||||
;; cygwin fires `changed' and `deleted' events, sometimes
|
||||
;; in random order.
|
||||
((eq system-type 'cygwin)
|
||||
(let ((r '(:random)))
|
||||
(dotimes (_i n r)
|
||||
(setq r (append r '(changed deleted))))))
|
||||
(t (make-list n 'renamed)))
|
||||
(let ((source-file-list source-file-list)
|
||||
(target-file-list target-file-list))
|
||||
|
@ -836,7 +917,11 @@ longer than timeout seconds for the events to be delivered."
|
|||
(file-notify--test-with-events (make-list n 'deleted)
|
||||
(dolist (file target-file-list)
|
||||
(read-event nil nil file-notify--test-read-event-timeout)
|
||||
(delete-file file) file-notify--test-read-event-timeout)))
|
||||
(delete-file file) file-notify--test-read-event-timeout))
|
||||
(delete-directory file-notify--test-tmpfile)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
@ -885,44 +970,49 @@ longer than timeout seconds for the events to be delivered."
|
|||
(save-buffer))))
|
||||
;; After saving the buffer, the descriptor is still valid.
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
(delete-file file-notify--test-tmpfile))
|
||||
(delete-file file-notify--test-tmpfile)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup))
|
||||
|
||||
(unwind-protect
|
||||
(progn
|
||||
;; It doesn't work for kqueue, because we don't use an
|
||||
;; implicit directory monitor.
|
||||
(unless (string-equal (file-notify--test-library) "kqueue")
|
||||
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
|
||||
(write-region
|
||||
"any text" nil file-notify--test-tmpfile nil 'no-message)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile
|
||||
'(change) #'file-notify--test-event-handler)))
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
(file-notify--test-with-events
|
||||
;; It doesn't work for kqueue, because we don't use an implicit
|
||||
;; directory monitor.
|
||||
(unless (string-equal (file-notify--test-library) "kqueue")
|
||||
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
|
||||
(write-region
|
||||
"any text" nil file-notify--test-tmpfile nil 'no-message)
|
||||
(should
|
||||
(setq file-notify--test-desc
|
||||
(file-notify-add-watch
|
||||
file-notify--test-tmpfile
|
||||
'(change) #'file-notify--test-event-handler)))
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
(file-notify--test-with-events
|
||||
(cond
|
||||
;; On Cygwin we only get the `changed' event.
|
||||
((eq system-type 'cygwin) '(changed))
|
||||
(t '(renamed created changed)))
|
||||
;; The file is renamed when creating a backup. It shall
|
||||
;; still be watched.
|
||||
(with-temp-buffer
|
||||
(let ((buffer-file-name file-notify--test-tmpfile)
|
||||
(make-backup-files t)
|
||||
(backup-by-copying nil)
|
||||
(backup-by-copying-when-mismatch nil)
|
||||
(kept-new-versions 1)
|
||||
(delete-old-versions t))
|
||||
(insert "another text")
|
||||
(save-buffer))))
|
||||
;; After saving the buffer, the descriptor is still valid.
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
(delete-file file-notify--test-tmpfile)))
|
||||
;; The file is renamed when creating a backup. It shall
|
||||
;; still be watched.
|
||||
(with-temp-buffer
|
||||
(let ((buffer-file-name file-notify--test-tmpfile)
|
||||
(make-backup-files t)
|
||||
(backup-by-copying nil)
|
||||
(backup-by-copying-when-mismatch nil)
|
||||
(kept-new-versions 1)
|
||||
(delete-old-versions t))
|
||||
(insert "another text")
|
||||
(save-buffer))))
|
||||
;; After saving the buffer, the descriptor is still valid.
|
||||
(should (file-notify-valid-p file-notify--test-desc))
|
||||
(delete-file file-notify--test-tmpfile)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
@ -995,6 +1085,7 @@ the file watch."
|
|||
;; Otherwise, both monitors report the
|
||||
;; `changed' event.
|
||||
(t '(changed changed)))
|
||||
|
||||
;; Just the directory monitor.
|
||||
(cond
|
||||
;; In kqueue, there is an additional `changed'
|
||||
|
@ -1003,6 +1094,9 @@ the file watch."
|
|||
'(changed created changed))
|
||||
(t '(created changed))))
|
||||
events)))
|
||||
;; gvfs-monitor-dir returns the events in random order.
|
||||
(when (string-equal "gvfs-monitor-dir" (file-notify--test-library))
|
||||
(setq events (cons :random events)))
|
||||
|
||||
;; Run the test.
|
||||
(file-notify--test-with-events events
|
||||
|
@ -1021,9 +1115,7 @@ the file watch."
|
|||
;; directory and the file monitor. The `stopped' event is
|
||||
;; from the file monitor. It's undecided in which order the
|
||||
;; the directory and the file monitor are triggered.
|
||||
(file-notify--test-with-events
|
||||
'((deleted deleted stopped)
|
||||
(deleted stopped deleted))
|
||||
(file-notify--test-with-events '(:random deleted deleted stopped)
|
||||
(delete-file file-notify--test-tmpfile1))
|
||||
(should (file-notify-valid-p file-notify--test-desc1))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc2))
|
||||
|
@ -1053,7 +1145,10 @@ the file watch."
|
|||
(t '(deleted stopped))))))
|
||||
(delete-directory file-notify--test-tmpfile 'recursive))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc1))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc2)))
|
||||
(should-not (file-notify-valid-p file-notify--test-desc2))
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
@ -1094,7 +1189,10 @@ the file watch."
|
|||
(dolist (desc descs)
|
||||
(file-notify-rm-watch desc))
|
||||
;; Remove directories.
|
||||
(delete-directory file-notify--test-tmpfile 'recursive))
|
||||
(delete-directory file-notify--test-tmpfile 'recursive)
|
||||
|
||||
;; The environment shall be cleaned up.
|
||||
(file-notify--test-cleanup-p))
|
||||
|
||||
;; Cleanup.
|
||||
(file-notify--test-cleanup)))
|
||||
|
|
|
@ -146,10 +146,13 @@
|
|||
:host "localhost"
|
||||
:nowait t
|
||||
:family 'ipv4
|
||||
:service port)))
|
||||
:service port))
|
||||
(times 0))
|
||||
(should (eq (process-status proc) 'connect))
|
||||
(while (eq (process-status proc) 'connect)
|
||||
(while (and (eq (process-status proc) 'connect)
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should-not (eq (process-status proc) 'connect))
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(process-send-string proc "echo foo")
|
||||
(sleep-for 0.1)
|
||||
|
@ -174,24 +177,26 @@
|
|||
(let ((server (make-tls-server 44332))
|
||||
(times 0)
|
||||
proc status)
|
||||
(sleep-for 1)
|
||||
(with-current-buffer (process-buffer server)
|
||||
(message "gnutls-serv: %s" (buffer-string)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(sleep-for 1)
|
||||
(with-current-buffer (process-buffer server)
|
||||
(message "gnutls-serv: %s" (buffer-string)))
|
||||
|
||||
;; It takes a while for gnutls-serv to start.
|
||||
(while (and (null (ignore-errors
|
||||
(setq proc (make-network-process
|
||||
:name "bar"
|
||||
:buffer (generate-new-buffer "*foo*")
|
||||
:host "localhost"
|
||||
:service 44332))))
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should proc)
|
||||
(gnutls-negotiate :process proc
|
||||
:type 'gnutls-x509pki
|
||||
:hostname "localhost")
|
||||
(delete-process server)
|
||||
;; It takes a while for gnutls-serv to start.
|
||||
(while (and (null (ignore-errors
|
||||
(setq proc (make-network-process
|
||||
:name "bar"
|
||||
:buffer (generate-new-buffer "*foo*")
|
||||
:host "localhost"
|
||||
:service 44332))))
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should proc)
|
||||
(gnutls-negotiate :process proc
|
||||
:type 'gnutls-x509pki
|
||||
:hostname "localhost"))
|
||||
(if (process-live-p server) (delete-process server)))
|
||||
(setq status (gnutls-peer-status proc))
|
||||
(should (consp status))
|
||||
(delete-process proc)
|
||||
|
@ -210,28 +215,33 @@
|
|||
(let ((server (make-tls-server 44331))
|
||||
(times 0)
|
||||
proc status)
|
||||
(sleep-for 1)
|
||||
(with-current-buffer (process-buffer server)
|
||||
(message "gnutls-serv: %s" (buffer-string)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(sleep-for 1)
|
||||
(with-current-buffer (process-buffer server)
|
||||
(message "gnutls-serv: %s" (buffer-string)))
|
||||
|
||||
;; It takes a while for gnutls-serv to start.
|
||||
(while (and (null (ignore-errors
|
||||
(setq proc (make-network-process
|
||||
:name "bar"
|
||||
:buffer (generate-new-buffer "*foo*")
|
||||
:nowait t
|
||||
:tls-parameters
|
||||
(cons 'gnutls-x509pki
|
||||
(gnutls-boot-parameters
|
||||
:hostname "localhost"))
|
||||
:host "localhost"
|
||||
:service 44331))))
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should proc)
|
||||
(while (eq (process-status proc) 'connect)
|
||||
(sit-for 0.1))
|
||||
(delete-process server)
|
||||
;; It takes a while for gnutls-serv to start.
|
||||
(while (and (null (ignore-errors
|
||||
(setq proc (make-network-process
|
||||
:name "bar"
|
||||
:buffer (generate-new-buffer "*foo*")
|
||||
:nowait t
|
||||
:tls-parameters
|
||||
(cons 'gnutls-x509pki
|
||||
(gnutls-boot-parameters
|
||||
:hostname "localhost"))
|
||||
:host "localhost"
|
||||
:service 44331))))
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should proc)
|
||||
(setq times 0)
|
||||
(while (and (eq (process-status proc) 'connect)
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should-not (eq (process-status proc) 'connect)))
|
||||
(if (process-live-p server) (delete-process server)))
|
||||
(setq status (gnutls-peer-status proc))
|
||||
(should (consp status))
|
||||
(delete-process proc)
|
||||
|
@ -248,29 +258,31 @@
|
|||
(let ((server (make-tls-server 44333))
|
||||
(times 0)
|
||||
proc status)
|
||||
(sleep-for 1)
|
||||
(with-current-buffer (process-buffer server)
|
||||
(message "gnutls-serv: %s" (buffer-string)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(sleep-for 1)
|
||||
(with-current-buffer (process-buffer server)
|
||||
(message "gnutls-serv: %s" (buffer-string)))
|
||||
|
||||
;; It takes a while for gnutls-serv to start.
|
||||
(while (and (null (ignore-errors
|
||||
(setq proc (make-network-process
|
||||
:name "bar"
|
||||
:buffer (generate-new-buffer "*foo*")
|
||||
:family 'ipv6
|
||||
:nowait t
|
||||
:tls-parameters
|
||||
(cons 'gnutls-x509pki
|
||||
(gnutls-boot-parameters
|
||||
:hostname "localhost"))
|
||||
:host "::1"
|
||||
:service 44333))))
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should proc)
|
||||
(while (eq (process-status proc) 'connect)
|
||||
(sit-for 0.1))
|
||||
(delete-process server)
|
||||
;; It takes a while for gnutls-serv to start.
|
||||
(while (and (null (ignore-errors
|
||||
(setq proc (make-network-process
|
||||
:name "bar"
|
||||
:buffer (generate-new-buffer "*foo*")
|
||||
:family 'ipv6
|
||||
:nowait t
|
||||
:tls-parameters
|
||||
(cons 'gnutls-x509pki
|
||||
(gnutls-boot-parameters
|
||||
:hostname "localhost"))
|
||||
:host "::1"
|
||||
:service 44333))))
|
||||
(< (setq times (1+ times)) 10))
|
||||
(sit-for 0.1))
|
||||
(should proc)
|
||||
(while (eq (process-status proc) 'connect)
|
||||
(sit-for 0.1)))
|
||||
(if (process-live-p server) (delete-process server)))
|
||||
(setq status (gnutls-peer-status proc))
|
||||
(should (consp status))
|
||||
(delete-process proc)
|
||||
|
|
Loading…
Add table
Reference in a new issue