greghendershott / racket-mode

Emacs major and minor modes for Racket: edit, REPL, check-syntax, debug, profile, packages, and more.
https://www.racket-mode.com/
GNU General Public License v3.0
683 stars 93 forks source link

`racket-xp-rename` could use future history #696

Closed leungbk closed 10 months ago

leungbk commented 10 months ago

Given the file

#lang racket

(define (hello _)
  (let ([x 1])
    x))

If I have point on an occurrence of x and proceed to racket-xp-rename, it would be nice if, similar to some other Emacs interfaces, pressing M-n on the initial renaming prompt would use "future history" to suggest x. (In this kind of situation, I often find myself wanting to rename the variable to something similar to the existing name, so having M-n fill in the existing name would allow me to make small edits to get my desired new name, obviating the need to type out the new name in full.)