"Provide a mechanism for semantic tag management.
Argument START, END, and LENGTH specify the bounds of the change."
(setq semantic-unmatched-syntax-cache-check t)
- (let ((inhibit-point-motion-hooks t)
- )
- (save-match-data
- (run-hook-with-args 'semantic-change-functions start end length)
- )))
+ (save-match-data
+ (run-hook-with-args 'semantic-change-functions start end length)
+ ))
(defun semantic-changes-in-region (start end &optional buffer)
"Find change overlays which exist in whole or in part between START and END.
PRE-LEN is used in the after mode for the length of the changed text."
(when (and after (not undo-in-progress))
(let* ((field (overlay-get ol 'srecode))
- (inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t)
- )
+ (inhibit-modification-hooks t))
;; Sometimes a field is deleted, but we might still get a stray
;; event. Let's just ignore those events.
(when (slot-boundp field 'overlay)
;; I tried `combine-after-change-calls', but it did not have
;; the effect I wanted.
(let ((start (point)))
- (let ((inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t)
- )
+ (let ((inhibit-modification-hooks t))
(srecode--insert-into-buffer template dictionary)
)
;; Now call those after change functions.
"\\(" dabbrev--abbrev-char-regexp "\\)"))
(pattern2 (concat (regexp-quote abbrev)
"\\(\\(" dabbrev--abbrev-char-regexp "\\)+\\)"))
- ;; This makes it possible to find matches in minibuffer prompts
- ;; even when they are "inviolable".
- (inhibit-point-motion-hooks t)
found-string result)
;; Limited search.
(save-restriction
(save-excursion
(with-syntax-table erc-button-syntax-table
(let ((buffer-read-only nil)
- (inhibit-point-motion-hooks t)
(inhibit-field-text-motion t)
(alist erc-button-alist)
regexp)
buffer is used. `erc-display-line-1' is used to display STRING.
If STRING is nil, the function does nothing."
- (let ((inhibit-point-motion-hooks t)
- new-bufs)
+ (let (new-bufs)
(dolist (buf (cond
((bufferp buffer) (list buffer))
((listp buffer) buffer)
"Execute a series of Eshell commands in FILE, passing ARGS.
Comments begin with `#'."
(let ((orig (point))
- (here (point-max))
- (inhibit-point-motion-hooks t))
+ (here (point-max)))
(goto-char (point-max))
(with-silent-modifications
;; FIXME: Why not use a temporary buffer and avoid this
(defun eshell-smart-scroll-window (wind _start)
"Scroll the given Eshell window WIND accordingly."
(unless eshell-currently-handling-window
- (let ((inhibit-point-motion-hooks t)
- (eshell-currently-handling-window t))
+ (let ((eshell-currently-handling-window t))
(with-selected-window wind
(eshell-smart-redisplay)))))
(save-restriction
(goto-char beg)
(narrow-to-region beg end)
- (let ((inhibit-point-motion-hooks t)
- (args (list t))
+ (let ((args (list t))
delim)
(with-silent-modifications
(remove-text-properties (point-min) (point-max)
;; Since parsing relies partly on buffer-local state
;; (e.g. that of `eshell-parse-argument-hook'), we need to
;; perform the parsing in the Eshell buffer.
- (let ((begin (point)) end
- (inhibit-point-motion-hooks t))
+ (let ((begin (point)) end)
(with-silent-modifications
(insert reg)
(setq end (point))
;; Note that the input string does not include its terminal newline.
(let ((proc-running-p (and (eshell-head-process)
(not queue-p)))
- (inhibit-point-motion-hooks t)
(inhibit-modification-hooks t))
(unless (and proc-running-p
(not (eq (process-status
This is done after all necessary filtering has been done."
(let ((oprocbuf (if process (process-buffer process)
(current-buffer)))
- (inhibit-point-motion-hooks t)
(inhibit-modification-hooks t))
(when (and string oprocbuf (buffer-name oprocbuf))
(with-current-buffer oprocbuf
(file-name-nondirectory file)))))
(list file fmt)))
(let (value size old-undo)
- ;; Record only one undo entry for the insertion. Inhibit point-motion and
- ;; modification hooks as with `insert-file-contents'.
- (let ((inhibit-point-motion-hooks t)
- (inhibit-modification-hooks t))
+ ;; Record only one undo entry for the insertion.
+ ;; Inhibit modification hooks as with `insert-file-contents'.
+ (let ((inhibit-modification-hooks t))
;; Don't bind `buffer-undo-list' to t here to assert that
;; `insert-file-contents' may record whether the buffer was unmodified
;; before.
(let ((i 0)
(here (point))
there
- (cnt 0)
- (inhibit-point-motion-hooks t))
+ (cnt 0))
(if (zerop arg)
(setq cnt 1)
(let ((i (length forms--markers))
(here (point))
there
- (cnt 0)
- (inhibit-point-motion-hooks t))
+ (cnt 0))
(if (zerop arg)
(setq cnt 1)
`(with-current-buffer gnus-article-buffer
(save-restriction
(let ((inhibit-read-only t)
- (inhibit-point-motion-hooks t)
(case-fold-search t))
(article-narrow-to-head)
,@forms))))
(let ((inhibit-read-only t)
(case-fold-search t)
(max (1+ (length gnus-sorted-header-list)))
- (inhibit-point-motion-hooks t)
(cur (current-buffer))
ignored visible beg)
(save-excursion
(not gnus-show-all-headers))
(save-excursion
(save-restriction
- (let ((inhibit-read-only t)
- (inhibit-point-motion-hooks t))
+ (let ((inhibit-read-only t))
(article-narrow-to-head)
(dolist (elem gnus-boring-article-headers)
(goto-char (point-min))
"Decode all MIME-encoded words in the article."
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-with-article-buffer
- (let ((inhibit-point-motion-hooks t)
- (mail-parse-charset gnus-newsgroup-charset)
+ (let ((mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-ignored-charsets)))
"Decode charset-encoded text in the article.
If PROMPT (the prefix), prompt for a coding system to use."
(interactive "P" gnus-article-mode)
- (let ((inhibit-point-motion-hooks t) (case-fold-search t)
+ (let ((case-fold-search t)
(inhibit-read-only t)
(mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets
(defun article-decode-encoded-words ()
"Remove encoded-word encoding from headers."
- (let ((inhibit-point-motion-hooks t)
- (mail-parse-charset gnus-newsgroup-charset)
+ (let ((mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets
(save-excursion (condition-case nil
(set-buffer gnus-summary-buffer)
(defun article-decode-group-name ()
"Decode group names in Newsgroups, Followup-To and Xref headers."
- (let ((inhibit-point-motion-hooks t)
- (inhibit-read-only t)
+ (let ((inhibit-read-only t)
(method (gnus-find-method-for-group gnus-newsgroup-name))
regexp)
(when (and (or gnus-group-name-charset-method-alist
Mail-Reply-To: and Mail-Followup-To:."
(when gnus-use-idna
(save-restriction
- (let ((inhibit-point-motion-hooks t)
- (inhibit-read-only t))
+ (let ((inhibit-read-only t))
(article-narrow-to-head)
(goto-char (point-min))
(while (re-search-forward "@[^ \t\n\r,>]*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t)
"Remove list identifiers from the Subject header.
The `gnus-list-identifiers' variable specifies what to do."
(interactive nil gnus-article-mode)
- (let ((inhibit-point-motion-hooks t)
- (regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
+ (let ((regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
(inhibit-read-only t))
(when regexp
(save-excursion
(interactive nil gnus-article-mode)
(save-excursion
(save-restriction
- (let ((inhibit-point-motion-hooks t))
- (when (gnus-parameter-banner gnus-newsgroup-name)
- (article-really-strip-banner
- (gnus-parameter-banner gnus-newsgroup-name)))
- (when gnus-article-address-banner-alist
- ;; Note that the From header is decoded here, so it is
- ;; required that the *-extract-address-components function
- ;; supports non-ASCII text.
- (let ((from (save-restriction
- (widen)
- (article-narrow-to-head)
- (mail-fetch-field "from"))))
- (when (and from
- (setq from
- (cadr (funcall gnus-extract-address-components
- from))))
- (catch 'found
- (dolist (pair gnus-article-address-banner-alist)
- (when (string-match (car pair) from)
- (throw 'found
- (article-really-strip-banner (cdr pair)))))))))))))
+ (when (gnus-parameter-banner gnus-newsgroup-name)
+ (article-really-strip-banner
+ (gnus-parameter-banner gnus-newsgroup-name)))
+ (when gnus-article-address-banner-alist
+ ;; Note that the From header is decoded here, so it is
+ ;; required that the *-extract-address-components function
+ ;; supports non-ASCII text.
+ (let ((from (save-restriction
+ (widen)
+ (article-narrow-to-head)
+ (mail-fetch-field "from"))))
+ (when (and from
+ (setq from
+ (cadr (funcall gnus-extract-address-components
+ from))))
+ (catch 'found
+ (dolist (pair gnus-article-address-banner-alist)
+ (when (string-match (car pair) from)
+ (throw 'found
+ (article-really-strip-banner (cdr pair))))))))))))
(defun article-really-strip-banner (banner)
"Strip the banner specified by the argument."
(save-excursion
(save-restriction
- (let ((inhibit-point-motion-hooks t)
- (gnus-signature-limit nil)
+ (let ((gnus-signature-limit nil)
(inhibit-read-only t))
(article-goto-body)
(cond
"Remove all blank lines from the beginning of the article."
(interactive nil gnus-article-mode)
(save-excursion
- (let ((inhibit-point-motion-hooks t)
- (inhibit-read-only t))
+ (let ((inhibit-read-only t))
(when (article-goto-body)
(while (and (not (eobp))
(looking-at "[ \t]*$"))
"Replace consecutive blank lines with one empty line."
(interactive nil gnus-article-mode)
(save-excursion
- (let ((inhibit-point-motion-hooks t)
- (inhibit-read-only t))
+ (let ((inhibit-read-only t))
;; First make all blank lines empty.
(article-goto-body)
(while (re-search-forward "^[ \t]+$" nil t)
"Remove all white space from the beginning of the lines in the article."
(interactive nil gnus-article-mode)
(save-excursion
- (let ((inhibit-point-motion-hooks t)
- (inhibit-read-only t))
+ (let ((inhibit-read-only t))
(article-goto-body)
(while (re-search-forward "^[ \t]+" nil t)
(replace-match "" t t)))))
"Remove all white space from the end of the lines in the article."
(interactive nil gnus-article-mode)
(save-excursion
- (let ((inhibit-point-motion-hooks t)
- (inhibit-read-only t))
+ (let ((inhibit-read-only t))
(article-goto-body)
(while (re-search-forward "[ \t]+$" nil t)
(replace-match "" t t)))))
"Strip all blank lines."
(interactive nil gnus-article-mode)
(save-excursion
- (let ((inhibit-point-motion-hooks t)
- (inhibit-read-only t))
+ (let ((inhibit-read-only t))
(article-goto-body)
(while (re-search-forward "^[ \t]*\n" nil t)
(replace-match "" t t)))))
(defun gnus-article-narrow-to-signature ()
"Narrow to the signature; return t if a signature is found, else nil."
- (let ((inhibit-point-motion-hooks t))
- (when (gnus-article-search-signature)
- (forward-line 1)
- ;; Check whether we have some limits to what we consider
- ;; to be a signature.
- (let ((limits (if (listp gnus-signature-limit) gnus-signature-limit
- (list gnus-signature-limit)))
- limit limited)
- (while (setq limit (pop limits))
- (if (or (and (integerp limit)
- (< (- (point-max) (point)) limit))
- (and (floatp limit)
- (< (count-lines (point) (point-max)) limit))
- (and (functionp limit)
- (funcall limit))
- (and (stringp limit)
- (not (re-search-forward limit nil t))))
- () ; This limit did not succeed.
- (setq limited t
- limits nil)))
- (unless limited
- (narrow-to-region (point) (point-max))
- t)))))
+ (when (gnus-article-search-signature)
+ (forward-line 1)
+ ;; Check whether we have some limits to what we consider
+ ;; to be a signature.
+ (let ((limits (if (listp gnus-signature-limit) gnus-signature-limit
+ (list gnus-signature-limit)))
+ limit limited)
+ (while (setq limit (pop limits))
+ (if (or (and (integerp limit)
+ (< (- (point-max) (point)) limit))
+ (and (floatp limit)
+ (< (count-lines (point) (point-max)) limit))
+ (and (functionp limit)
+ (funcall limit))
+ (and (stringp limit)
+ (not (re-search-forward limit nil t))))
+ () ; This limit did not succeed.
+ (setq limited t
+ limits nil)))
+ (unless limited
+ (narrow-to-region (point) (point-max))
+ t))))
(defun gnus-article-search-signature ()
"Search the current buffer for the signature separator.
(defun gnus-article-show-hidden-text (type &optional _dummy)
"Show all hidden text of type TYPE.
Originally it is hide instead of DUMMY."
- (let ((inhibit-read-only t)
- (inhibit-point-motion-hooks t))
+ (let ((inhibit-read-only t))
(gnus-remove-text-properties-when
'article-type type
(point-min) (point-max)
(interactive (list 'ut t) gnus-article-mode)
(let* ((case-fold-search t)
(inhibit-read-only t)
- (inhibit-point-motion-hooks t)
(visible-date (mail-fetch-field "Date"))
pos date bface eface)
(save-excursion
(insert-buffer-substring gnus-original-article-buffer)
(setq items (split-string sig))
(message-narrow-to-head)
- (let ((inhibit-point-motion-hooks t)
- (case-fold-search t))
+ (let ((case-fold-search t))
;; Don't verify multiple headers.
(setq headers (mapconcat (lambda (header)
(concat header ": "
(boundp 'gnus-article-boring-faces)
(symbol-value 'gnus-article-boring-faces))
(save-excursion
- (let ((inhibit-point-motion-hooks t))
- (catch 'only-boring
- (while (re-search-forward "\\b\\w\\w" nil t)
- (forward-char -1)
- (when (not (seq-intersection
- (gnus-faces-at (point))
- (symbol-value 'gnus-article-boring-faces)
- #'eq))
- (throw 'only-boring nil)))
- (throw 'only-boring t))))))
+ (catch 'only-boring
+ (while (re-search-forward "\\b\\w\\w" nil t)
+ (forward-char -1)
+ (when (not (seq-intersection
+ (gnus-faces-at (point))
+ (symbol-value 'gnus-article-boring-faces)
+ #'eq))
+ (throw 'only-boring nil)))
+ (throw 'only-boring t)))))
(defun gnus-article-refer-article ()
"Read article specified by message-id around point."
`gnus-signature-separator' using the face `gnus-signature'."
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-with-article-buffer
- (let ((inhibit-point-motion-hooks t))
- (save-restriction
- (when (and gnus-signature-face
- (gnus-article-narrow-to-signature))
- (overlay-put (make-overlay (point-min) (point-max) nil t)
- 'face gnus-signature-face)
- (widen)
- (gnus-article-search-signature)
- (let ((start (match-beginning 0))
- (end (set-marker (make-marker) (1+ (match-end 0)))))
- (gnus-article-add-button start (1- end) 'gnus-signature-toggle
- end)))))))
+ (save-restriction
+ (when (and gnus-signature-face
+ (gnus-article-narrow-to-signature))
+ (overlay-put (make-overlay (point-min) (point-max) nil t)
+ 'face gnus-signature-face)
+ (widen)
+ (gnus-article-search-signature)
+ (let ((start (match-beginning 0))
+ (end (set-marker (make-marker) (1+ (match-end 0)))))
+ (gnus-article-add-button start (1- end) 'gnus-signature-toggle
+ end))))))
(defun gnus-button-in-region-p (b e prop)
"Say whether PROP exists in the region."
specified by `gnus-button-alist'."
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-with-article-buffer
- (let ((inhibit-point-motion-hooks t)
- (case-fold-search t)
+ (let ((case-fold-search t)
(alist gnus-button-alist)
beg entry regexp)
;; We skip the headers.
(defun gnus-signature-toggle (end)
(gnus-with-article-buffer
- (let ((inhibit-point-motion-hooks t))
- (if (text-property-any end (point-max) 'article-type 'signature)
- (progn
- (gnus-delete-wash-type 'signature)
- (gnus-remove-text-properties-when
- 'article-type 'signature end (point-max)
- (cons 'article-type (cons 'signature
- gnus-hidden-properties))))
- (gnus-add-wash-type 'signature)
- (gnus-add-text-properties-when
- 'article-type nil end (point-max)
- (cons 'article-type (cons 'signature
- gnus-hidden-properties)))))
+ (if (text-property-any end (point-max) 'article-type 'signature)
+ (progn
+ (gnus-delete-wash-type 'signature)
+ (gnus-remove-text-properties-when
+ 'article-type 'signature end (point-max)
+ (cons 'article-type (cons 'signature
+ gnus-hidden-properties))))
+ (gnus-add-wash-type 'signature)
+ (gnus-add-text-properties-when
+ 'article-type nil end (point-max)
+ (cons 'article-type (cons 'signature
+ gnus-hidden-properties))))
(let ((gnus-article-mime-handle-alist-1 gnus-article-mime-handle-alist))
(gnus-set-mode-line 'article))))
(save-excursion
(let* ((marker (car marker-and-entry))
(entry (cadr marker-and-entry))
- (regexp (car entry))
- (inhibit-point-motion-hooks t))
+ (regexp (car entry)))
(goto-char marker)
;; This is obviously true, or something bad is happening :)
;; But we need it to have the match-data
(let ((buffer-read-only nil)
(alist gnus-cite-prefix-alist)
(faces gnus-cite-face-list)
- (inhibit-point-motion-hooks t)
face entry prefix skip numbers number face-alist)
;; Loop through citation prefixes.
(while alist
(interactive "P" gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(let ((buffer-read-only nil)
- (inhibit-point-motion-hooks t)
(marks (gnus-dissect-cited-text))
(adaptive-fill-mode nil)
(fill-column (if width (prefix-numeric-value width) fill-column)))
(with-current-buffer gnus-article-buffer
(let ((buffer-read-only nil)
marks
- (inhibit-point-motion-hooks t)
(props (nconc (list 'article-type 'cite)
gnus-hidden-properties))
(point (point-min))
(start (cadr args))
(hidden
(text-property-any beg (1- end) 'article-type 'cite))
- (inhibit-point-motion-hooks t)
buffer-read-only)
(when (or (null arg)
(zerop arg)
(let ((start (point))
(atts gnus-cite-attribution-alist)
(buffer-read-only nil)
- (inhibit-point-motion-hooks t)
(hidden 0)
total)
(goto-char (point-max))
(defun gnus-cite-parse-wrapper ()
;; Wrap chopped gnus-cite-parse.
(article-goto-body)
- (let ((inhibit-point-motion-hooks t))
- (save-excursion
- (gnus-cite-parse-attributions))
- (save-excursion
- (gnus-cite-parse))
- (save-excursion
- (gnus-cite-connect-attributions))))
+ (save-excursion
+ (gnus-cite-parse-attributions))
+ (save-excursion
+ (gnus-cite-parse))
+ (save-excursion
+ (gnus-cite-connect-attributions)))
(defun gnus-cite-parse ()
;; Parse and connect citation prefixes and attribution lines.
(defun gnus-cite-add-face (number prefix face)
;; At line NUMBER, ignore PREFIX and add FACE to the rest of the line.
(when face
- (let ((inhibit-point-motion-hooks t)
- from to overlay)
+ (let (from to overlay)
(goto-char (point-min))
(when (zerop (forward-line (1- number)))
(forward-char (length prefix))
(gnus-cite-parse-maybe nil t)
(let ((buffer-read-only nil)
(numbers (cdr (assoc prefix gnus-cite-prefix-alist)))
- (inhibit-point-motion-hooks t)
number)
(while numbers
(setq number (car numbers)
(let ((real-name (car address))
(mail-address (cadr address))
(mark (point-marker))
- (inhibit-point-motion-hooks t)
(case-fold-search t))
(save-restriction
(article-narrow-to-head)
(and best-point (gnus-group-group-name))))
;; Is there something like an after-point-motion-hook?
+;; FIXME: There's `cursor-sensor-mode's `cursor-sensor-functions' property.
;; (inhibit-point-motion-hooks?). Is there a tool-bar-update function?
;; (defun gnus-group-menu-bar-update ()
(save-excursion
(save-restriction
(message-narrow-to-head)
- (let* ((inhibit-point-motion-hooks t)
- (case-fold-search t)
+ (let* ((case-fold-search t)
(ct (message-fetch-field "Content-Type" t))
(ctl (and ct (mail-header-parse-content-type ct))))
(if (and ctl (not (string-search "/" (car ctl))))
(widen)
(article-narrow-to-head)
(let* ((inhibit-read-only t)
- (inhibit-point-motion-hooks t)
(hidden (if (numberp arg)
(>= arg 0)
(or
(require 'message)
(save-excursion
(save-restriction
- (let ((inhibit-point-motion-hooks t))
- (nnheader-narrow-to-headers)
- (message-fetch-field field)))))
+ (nnheader-narrow-to-headers)
+ (message-fetch-field field))))
(defun gnus-fetch-original-field (field)
"Fetch FIELD from the original version of the current article."
The buffer is expected to be narrowed to just the header of the message;
see `message-narrow-to-headers-or-head'."
- (let* ((inhibit-point-motion-hooks t)
- (value (mail-fetch-field header nil (not first))))
+ (let* ((value (mail-fetch-field header nil (not first))))
(when value
(while (string-match "\n[\t ]+" value)
(setq value (replace-match " " t t value)))
(let ((cur (current-buffer))
from subject date
references message-id follow-to
- (inhibit-point-motion-hooks t)
(message-this-is-mail t)
gnus-warning)
(save-restriction
(let ((cur (current-buffer))
from subject date reply-to mrt mct
references message-id follow-to
- (inhibit-point-motion-hooks t)
(message-this-is-news t)
followup-to distribution newsgroups gnus-warning posted-to)
(save-restriction
(let ((regexps (if (stringp message-hidden-headers)
(list message-hidden-headers)
message-hidden-headers))
- (inhibit-point-motion-hooks t)
(inhibit-modification-hooks t)
end-of-headers)
(when regexps
"Set up a minibuffer for `minibuffer-electric-default-mode'.
The prompt and initial input should already have been inserted."
(let ((regexps minibuffer-default-in-prompt-regexps)
- (match nil)
- (inhibit-point-motion-hooks t))
+ (match nil))
(save-excursion
(save-restriction
;; Narrow to only the prompt.
;; Clean up from any previous go.
(goto-address-unfontify (or start (point-min)) (or end (point-max)))
(save-excursion
- (let ((inhibit-point-motion-hooks t))
+ (goto-char (or start (point-min)))
+ (when (or (eq t goto-address-fontify-maximum-size)
+ (< (- (or end (point-max)) (point))
+ goto-address-fontify-maximum-size))
+ (while (re-search-forward goto-address-url-regexp end t)
+ (let* ((s (match-beginning 0))
+ (e (match-end 0))
+ this-overlay)
+ (when (or (not goto-address-prog-mode)
+ ;; This tests for both comment and string
+ ;; syntax.
+ (nth 8 (syntax-ppss)))
+ (setq this-overlay (make-overlay s e))
+ (and goto-address-fontify-p
+ (overlay-put this-overlay 'face goto-address-url-face))
+ (overlay-put this-overlay 'evaporate t)
+ (overlay-put this-overlay
+ 'mouse-face goto-address-url-mouse-face)
+ (overlay-put this-overlay 'follow-link t)
+ (overlay-put this-overlay
+ 'help-echo "mouse-2, C-c RET: follow URL")
+ (overlay-put this-overlay
+ 'keymap goto-address-highlight-keymap)
+ (overlay-put this-overlay 'goto-address t))))
(goto-char (or start (point-min)))
- (when (or (eq t goto-address-fontify-maximum-size)
- (< (- (or end (point-max)) (point))
- goto-address-fontify-maximum-size))
- (while (re-search-forward goto-address-url-regexp end t)
- (let* ((s (match-beginning 0))
- (e (match-end 0))
- this-overlay)
- (when (or (not goto-address-prog-mode)
- ;; This tests for both comment and string
- ;; syntax.
- (nth 8 (syntax-ppss)))
- (setq this-overlay (make-overlay s e))
- (and goto-address-fontify-p
- (overlay-put this-overlay 'face goto-address-url-face))
- (overlay-put this-overlay 'evaporate t)
- (overlay-put this-overlay
- 'mouse-face goto-address-url-mouse-face)
- (overlay-put this-overlay 'follow-link t)
- (overlay-put this-overlay
- 'help-echo "mouse-2, C-c RET: follow URL")
- (overlay-put this-overlay
- 'keymap goto-address-highlight-keymap)
- (overlay-put this-overlay 'goto-address t))))
- (goto-char (or start (point-min)))
- (while (re-search-forward goto-address-mail-regexp end t)
- (let* ((s (match-beginning 0))
- (e (match-end 0))
- this-overlay)
- (when (or (not goto-address-prog-mode)
- ;; This tests for both comment and string
- ;; syntax.
- (nth 8 (syntax-ppss)))
- (setq this-overlay (make-overlay s e))
- (and goto-address-fontify-p
- (overlay-put this-overlay 'face goto-address-mail-face))
- (overlay-put this-overlay 'evaporate t)
- (overlay-put this-overlay 'mouse-face
- goto-address-mail-mouse-face)
- (overlay-put this-overlay 'follow-link t)
- (overlay-put this-overlay
- 'help-echo "mouse-2, C-c RET: mail this address")
- (overlay-put this-overlay
- 'keymap goto-address-highlight-keymap)
- (overlay-put this-overlay 'goto-address t))))))))
+ (while (re-search-forward goto-address-mail-regexp end t)
+ (let* ((s (match-beginning 0))
+ (e (match-end 0))
+ this-overlay)
+ (when (or (not goto-address-prog-mode)
+ ;; This tests for both comment and string
+ ;; syntax.
+ (nth 8 (syntax-ppss)))
+ (setq this-overlay (make-overlay s e))
+ (and goto-address-fontify-p
+ (overlay-put this-overlay 'face goto-address-mail-face))
+ (overlay-put this-overlay 'evaporate t)
+ (overlay-put this-overlay 'mouse-face
+ goto-address-mail-mouse-face)
+ (overlay-put this-overlay 'follow-link t)
+ (overlay-put this-overlay
+ 'help-echo "mouse-2, C-c RET: mail this address")
+ (overlay-put this-overlay
+ 'keymap goto-address-highlight-keymap)
+ (overlay-put this-overlay 'goto-address t)))))))
(defun goto-address-fontify-region (start end)
"Fontify URLs and e-mail addresses in the given region."
(overlay-put ov 'before-string
(propertize " " 'display `((margin left-margin) ,str)))
(overlay-put ov 'linum-str str))))
- ;; Text may contain those nasty intangible properties, but that
- ;; shouldn't prevent us from counting those lines.
- (let ((inhibit-point-motion-hooks t))
- (forward-line))
+ (forward-line)
(setq line (1+ line)))
(when (display-graphic-p)
(setq width (ceiling
(insert s)))
(defun zone-shift-left ()
- (let ((inhibit-point-motion-hooks t)
- s)
+ (let (s)
(while (not (eobp))
(unless (eolp)
(setq s (buffer-substring (point) (1+ (point))))
(defun zone-shift-right ()
(goto-char (point-max))
- (let ((inhibit-point-motion-hooks t)
- s)
+ (let (s)
(while (not (bobp))
(unless (bolp)
(setq s (buffer-substring (1- (point)) (point)))
(defun zone-fill-out-screen (width height)
(let ((start (window-start))
- (line (make-string width 32))
- (inhibit-point-motion-hooks t))
+ (line (make-string width 32)))
(goto-char start)
;; fill out rectangular ws block
(while (progn (end-of-line)
(setq c (point))
(move-to-column 9)
(setq col (cons (buffer-substring (point) c) col))
-; (let ((inhibit-point-motion-hooks t))
- (end-of-line 0);)
+ (end-of-line 0)
(forward-char -10))
(let ((life-patterns (vector
(if (and col (search-forward "@" max t))
(declare (debug t))
`(save-excursion
(save-match-data
- (let ((inhibit-point-motion-hooks t)
- (deactivate-mark nil))
+ (let ((deactivate-mark nil))
(progn ,@forms)))))
(defmacro vhdl-prepare-search-2 (&rest body)
"Enable case insensitive search, switch to syntax table that includes `_',
-arrange to ignore `intangible' overlays, then execute BODY, and finally restore
-the old environment. Used for consistent searching."
+then execute BODY, and finally restore the old environment.
+Used for consistent searching."
(declare (debug t))
- `(let ((case-fold-search t) ; case insensitive search
- (inhibit-point-motion-hooks t))
+ `(let ((case-fold-search t)) ; case insensitive search
;; use extended syntax table
(with-syntax-table vhdl-mode-ext-syntax-table
;; execute BODY safely
;; In a writable buffer, enable undoing read-only text that is
;; so because of text properties.
(inhibit-read-only t)
- ;; Don't let `intangible' properties interfere with undo.
- (inhibit-point-motion-hooks t)
;; We use oldlist only to check for EQ. ++kfs
(oldlist buffer-undo-list)
(did-apply nil)
;;;###autoload
(defun enriched-encode (from to orig-buf)
(if enriched-verbose (message "Enriched: encoding document..."))
- (let ((inhibit-read-only t)
- (inhibit-point-motion-hooks t))
+ (let ((inhibit-read-only t))
(save-restriction
(narrow-to-region from to)
(delete-to-left-margin)
(defun flyspell-word-search-backward (word bound &optional ignore-case)
(save-excursion
(let* ((r '())
- (inhibit-point-motion-hooks t)
(flyspell-not-casechars (flyspell-get-not-casechars))
(bound (if (and bound
(> bound (point-min)))
(defun flyspell-word-search-forward (word bound)
(save-excursion
(let* ((r '())
- (inhibit-point-motion-hooks t)
(flyspell-not-casechars (flyspell-get-not-casechars))
(bound (if (and bound
(< bound (point-max)))
"Point has entered a cell.
Refresh the menu bar."
;; Avoid calling point-motion-hooks recursively.
- (let ((inhibit-point-motion-hooks t))
- (force-mode-line-update)
- (pcase dir
- ('left
- (setq table-mode-indicator nil)
- (run-hooks 'table-point-left-cell-hook))
- ('entered
- (setq table-mode-indicator t)
- (table--warn-incompatibility)
- (run-hooks 'table-point-entered-cell-hook)))))
+ (force-mode-line-update)
+ (pcase dir
+ ('left
+ (setq table-mode-indicator nil)
+ (run-hooks 'table-point-left-cell-hook))
+ ('entered
+ (setq table-mode-indicator t)
+ (table--warn-incompatibility)
+ (run-hooks 'table-point-entered-cell-hook))))
(defun table--warn-incompatibility ()
"If called from interactive operation warn the know incompatibilities.
;; have files annotated with -*- LaTeX -*- (e.g. because they received
;; them from someone using AUCTeX).
;; FIXME: Turn them into autoloads so that AUCTeX can override them
-;; with it's own autoloads? Or maybe rely on `major-mode-remap-alist'?
+;; with its own autoloads? Or maybe rely on `major-mode-remap-alist'?
;;;###autoload (defalias 'TeX-mode #'tex-mode)
;;;###autoload (defalias 'plain-TeX-mode #'plain-tex-mode)
;;;###autoload (defalias 'LaTeX-mode #'latex-mode)