all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#42867: 28.0.50; Wring pair-mode in m4 and similar modes
       [not found] <20200814195814.kw6xfj6sfumt22bx.ref@Ergus>
@ 2020-08-14 19:58 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-10-16 15:24   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-14 19:58 UTC (permalink / raw)
  To: 42867

--text follows this line--

Using emacs to edit an m4 file I see that there is an issue recognizing
the corresponding pairs in some cases like when using "case".

For example:

```
[
case $word in
	i?86)
             something ;;
         bla)
             bla ;;
  esac
]
```

all the commands like forward-list or modes like show-paren-mode
highlight the parentesis after i?86 as the closing for the first
one. While the really closing one looks unpaired.

Try

emacs -Q file.m4
M-x show-paren-mode
yank the example code and go to [.
And see

In GNU Emacs 28.0.50 (build 17, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3)
  of 2020-08-12 built on Ergus
Repository revision: fd6058b8fb07329bdd7d36cd05f4be1c5c691f9f
Repository branch: master
System Description: Arch Linux

Recent messages:
next-line: End of buffer [6 times]
Current locus from *grep*
Mark saved where search started
Show-Paren mode enabled
Making completion list...
Quit
Type "q" in help window to restore its previous buffer.
Making completion list...
completing-read-default: Command attempted to use minibuffer while in minibuffer
funcall-interactively: End of buffer

Configured using:
  'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2

Important settings:
   value of $LANG: en_US.UTF-8
   locale-coding-system: utf-8-unix

Major mode: m4

Minor modes in effect:
   show-paren-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils cl-extra pp cl-print ibuf-ext
ibuffer ibuffer-loaddefs help-fns radix-tree help-mode cus-start
cus-load paren misearch multi-isearch find-dired dired dired-loaddefs
ffap url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map seq url-vars thingatpt
grep compile comint ansi-color ring vc-git diff-mode easymenu easy-mmode
cl-loaddefs cl-lib m4-mode term/tmux term/xterm xterm byte-opt gv
bytecomp byte-compile cconv tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 102679 15950)
  (symbols 48 9862 1)
  (strings 32 29160 1933)
  (string-bytes 1 868059)
  (vectors 16 13716)
  (vector-slots 8 153782 8256)
  (floats 8 36 675)
  (intervals 56 1332 0)
  (buffers 992 15))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#42867: 28.0.50; Wring pair-mode in m4 and similar modes
  2020-08-14 19:58 ` bug#42867: 28.0.50; Wring pair-mode in m4 and similar modes Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-10-16 15:24   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16 15:24 UTC (permalink / raw)
  To: Ergus; +Cc: 42867

Ergus <spacibba@aol.com> writes:

> Using emacs to edit an m4 file I see that there is an issue recognizing
> the corresponding pairs in some cases like when using "case".
>
> For example:
>
> ```
> [
> case $word in
> 	i?86)
>             something ;;
>         bla)
>             bla ;;
>  esac
> ]
> ```

The problem is that "bla)" has a closing-paren character, and the
Emacs's sexp machinery doesn't seem to take into account what the
closing paren character is in these circumstances -- just that there's a
closing paren?

You see this all over the place in Emacs, but fortunately not many
languages use closing-parens like that.

Does anybody know whether there's any convenient way to fix the problem
here in m4-mode?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-16 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20200814195814.kw6xfj6sfumt22bx.ref@Ergus>
2020-08-14 19:58 ` bug#42867: 28.0.50; Wring pair-mode in m4 and similar modes Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-10-16 15:24   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.